Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module './i18n/strings/en-us.json', app cannot start #19153

Closed
haasn opened this issue Sep 24, 2021 · 11 comments
Closed

Error: Cannot find module './i18n/strings/en-us.json', app cannot start #19153

haasn opened this issue Sep 24, 2021 · 11 comments
Labels
A-Electron O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Critical Prevents work, causes data loss and/or has no workaround T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter Z-Platform-Specific

Comments

@haasn
Copy link

haasn commented Sep 24, 2021

Steps to reproduce

  1. Execute element

What did you expect?

  • Element shows up as usual.

What happened?

λ element
/home/nand/.config/Element exists: yes
/home/nand/.config/Riot exists: no
No update_base_url is defined: auto update is disabled
Fetching translation json for locale: en_EN
Changing application language to en-us
Fetching translation json for locale: en-us
Could not fetch translation json for locale: 'en-us' Error: Cannot find module './i18n/strings/en-us.json'
Require stack:
- /usr/share/io.element.element/resources/app.asar/lib/language-helper.js
- /usr/share/io.element.element/resources/app.asar/lib/tray.js
- /usr/share/io.element.element/resources/app.asar/lib/electron-main.js
- 
    at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
    at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
    at Module._load (internal/modules/cjs/loader.js:732:27)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at AppLocalization.fetchTranslationJson (/usr/share/io.element.element/resources/app.asar/lib/language-helper.js:76:20)
    at /usr/share/io.element.element/resources/app.asar/lib/language-helper.js:89:39
    at Array.forEach (<anonymous>)
    at AppLocalization.setAppLocale (/usr/share/io.element.element/resources/app.asar/lib/language-helper.js:88:17) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/share/io.element.element/resources/app.asar/lib/language-helper.js',
    '/usr/share/io.element.element/resources/app.asar/lib/tray.js',
    '/usr/share/io.element.element/resources/app.asar/lib/electron-main.js',
    undefined
  ]
}
Resetting the UI components after locale change
Resetting the UI components after locale change

No further progress is reported, the app gets stuck in this state - no window is ever shown.

Additional notes

I also tried the 1.8.4 element package from the tumbleweed system repos, with the exact same result. The last known working version was 1.8.2.

Operating system

openSuSE Tumbleweed

Application version

1.8.5-1.suse.tw.taw

How did you install the app?

https://github.com/taw00/element-rpm

Homeserver

matrix.org

Have you submitted a rageshake?

No

@haasn haasn added the T-Defect label Sep 24, 2021
@germain-gg germain-gg added A-Electron O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Critical Prevents work, causes data loss and/or has no workaround labels Sep 24, 2021
@novocaine
Copy link
Contributor

I think the errors in the log might be a red-herring as I've seen that error reported in other issues from Linux users e.g. here where the app must have launched in order for the user to reach the point they did element-hq/element-desktop#863

@novocaine
Copy link
Contributor

Possibly related to #19169

@haasn
Copy link
Author

haasn commented Sep 27, 2021

Possibly related to #19169

Good chance of that. If I start element a second time (while the first instance is already "stuck"), I also get a white window, so that might be what the Ubuntu users are reporting.

@novocaine
Copy link
Contributor

Note that #19169 is an issue with glibc in Ubuntu (https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1944468) - possibly SuSE is also affected, but hard to tell unless you can capture a core dump as the reporter of that issue did

@haasn
Copy link
Author

haasn commented Sep 28, 2021

I don't get a core dump, as the process, in my case, does not crash. (I think I was misled by the second comment in that issue, which sounds more like my issue and less like the OP's)

I'd love to provide more info using gdb, but I can't find a package for element's debug symbols in either the official repos or the repo I got element from.

@novocaine
Copy link
Contributor

If there's no crash, gdb won't help :/

Nightly builds have been updated to Electron 13.5 - updating to that is definitely worth a try, but I don't think https://github.com/taw00/element-rpm builds nightlies so you would either have to build develop yourself or wait for the next release.

Not sure if related, but one of the comments in the glibc thread says a blank window is a symptom https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1944468/comments/27

@novocaine
Copy link
Contributor

@haasn did you have any luck after updating Element?

@novocaine novocaine added the X-Needs-Info This issue is blocked awaiting information from the reporter label Oct 28, 2021
@barathrm
Copy link

FWIW, the latest version as published on taw's repo (taw00/element-rpm#49) fixes the not being able to start at all issue. I still see the locale and "module not found" messages, but they're not fatal anymore, or they never were.

@novocaine
Copy link
Contributor

Okay, given that's the OP's installation source I'll close this, just ping if it's not closed

@haasn
Copy link
Author

haasn commented Oct 29, 2021

@haasn did you have any luck after updating Element?

Conforming that it works now, thanks.

@sci-42ver
Copy link

sci-42ver commented Jun 5, 2024

If someone still has this problem, it seems to be because they need the proxy (e.g. they can't access the matrix homeserver). Otherwise they may still use en-us instead of using en.

By element-desktop --enable-logging we can find where we are stuck. Then if we are stuck at something like FetchHttpApi, then we can use element-desktop --proxy-server=socks5://127.0.0.1:port to solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Electron O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Critical Prevents work, causes data loss and/or has no workaround T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter Z-Platform-Specific
Projects
None yet
Development

No branches or pull requests

5 participants