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

Cannot find module './i18n/strings/en-us.json #21754

Closed
MountainX opened this issue Apr 12, 2022 · 3 comments
Closed

Cannot find module './i18n/strings/en-us.json #21754

MountainX opened this issue Apr 12, 2022 · 3 comments
Labels

Comments

@MountainX
Copy link

Steps to reproduce

  1. Where are you starting? What can you see?

Running element-desktop 1.10.8-2 (https://archlinux.org/packages/community/x86_64/element-desktop/) on Arch Linux KDE. System is fully updated as of today.

I launched element-desktop like this:
/usr/lib/electron17/electron /usr/lib/element/app.asar

  1. I see the following output in the console:

    /home/user/.config/Element exists: yes
    /home/user/.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/lib/element/app.asar/lib/language-helper.js
    • /usr/lib/element/app.asar/lib/tray.js
    • /usr/lib/element/app.asar/lib/electron-main.js
    • /usr/lib/electron17/resources/default_app.asar/main.js
    • at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
      at Function.n._resolveFilename (node:electron/js2c/browser_init:249:1105)
      at Module._load (node:internal/modules/cjs/loader:785:27)
      at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
      at Module.require (node:internal/modules/cjs/loader:1012:19)
      at require (node:internal/modules/cjs/helpers:102:18)
      at AppLocalization.fetchTranslationJson (/usr/lib/element/app.asar/lib/language-helper.js:76:20)
      at /usr/lib/element/app.asar/lib/language-helper.js:89:39
      at Array.forEach ()
      at AppLocalization.setAppLocale (/usr/lib/element/app.asar/lib/language-helper.js:88:17) {
      code: 'MODULE_NOT_FOUND',
      requireStack: [
      '/usr/lib/element/app.asar/lib/language-helper.js',
      '/usr/lib/element/app.asar/lib/tray.js',
      '/usr/lib/element/app.asar/lib/electron-main.js',
      '/usr/lib/electron17/resources/default_app.asar/main.js',
      undefined
      ]
      }
      Resetting the UI components after locale change
      Resetting the UI components after locale change
      [80201:0412/082559.040771:ERROR:vaapi_wrapper.cc(1096)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
      [80201:0412/082559.040944:ERROR:vaapi_wrapper.cc(1043)] FillProfileInfo_Locked failed for va_profile VAProfileH264Main and entrypoint VAEntrypointVLD
      [80201:0412/082559.041017:ERROR:vaapi_wrapper.cc(1096)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
      [80201:0412/082559.041058:ERROR:vaapi_wrapper.cc(1043)] FillProfileInfo_Locked failed for va_profile VAProfileH264High and entrypoint VAEntrypointVLD
      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/lib/element/app.asar/lib/language-helper.js
    • /usr/lib/element/app.asar/lib/tray.js
    • /usr/lib/element/app.asar/lib/electron-main.js
    • /usr/lib/electron17/resources/default_app.asar/main.js
    • at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
      at Function.n._resolveFilename (node:electron/js2c/browser_init:249:1105)
      at Module._load (node:internal/modules/cjs/loader:785:27)
      at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
      at Module.require (node:internal/modules/cjs/loader:1012:19)
      at require (node:internal/modules/cjs/helpers:102:18)
      at AppLocalization.fetchTranslationJson (/usr/lib/element/app.asar/lib/language-helper.js:76:20)
      at /usr/lib/element/app.asar/lib/language-helper.js:89:39
      at Array.forEach ()
      at AppLocalization.setAppLocale (/usr/lib/element/app.asar/lib/language-helper.js:88:17) {
      code: 'MODULE_NOT_FOUND',
      requireStack: [
      '/usr/lib/element/app.asar/lib/language-helper.js',
      '/usr/lib/element/app.asar/lib/tray.js',
      '/usr/lib/element/app.asar/lib/electron-main.js',
      '/usr/lib/electron17/resources/default_app.asar/main.js',
      undefined
      ]
      }
      Resetting the UI components after locale change
      libpng warning: iCCP: known incorrect sRGB profile
      libpng warning: iCCP: known incorrect sRGB profile
      libpng warning: iCCP: known incorrect sRGB profile
      libpng warning: iCCP: known incorrect sRGB profile
      libpng warning: iCCP: known incorrect sRGB profile
      libpng warning: iCCP: known incorrect sRGB profile

Outcome

What did you expect?

No errors shown.

What happened instead?

Multiple errors are listed in the console. Please suggest how to resolve them. Do I need to install some additional packages? or change config settings?

Operating system

Arch Linux

Application version

1.10.8-2, Olm version: 3.2.8

How did you install the app?

pacman

Homeserver

matrix.org

Will you send logs?

No

@dbkr
Copy link
Member

dbkr commented Apr 12, 2022

I don't think I'd expect it to work just giving app.asar as an argument - app.asar is just the code of the desktop app itself. In fact I'm not sure how it even got that far. I'd suggest sticking to the instructions in the README, or if you want to try anything more exotic, you get to keep both pieces. ;)

@dbkr
Copy link
Member

dbkr commented Apr 12, 2022

Oh, I just looked and this is actually how arch launches Element (I'm still slightly surprised it works...) I'm not sure why this would be failing though - it suggests the installation (or build?) has gone wrong somehow. I think this would be one for the arch package maintainers: the Arch package is an unofficial, 3rd party package.

@t3chguy
Copy link
Member

t3chguy commented Apr 13, 2022

Duplicate of element-hq/element-desktop#871

@t3chguy t3chguy closed this as completed Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants