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

element-desktop on linux won't start if user is not in /etc/passwd #2046

Open
stunivention opened this issue Dec 19, 2024 · 2 comments
Open
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 Z-Linux Z-Platform-Specific Z-Upstream

Comments

@stunivention
Copy link

Steps to reproduce

Used element-desktop as Snap on Ubunut 22.04 for months without problem, but was unable to start since some update a few weeks ago (around version 1.11.86).

I can reproduce the issue on Ubuntu 22.04 and 24.04 using the latest version provided as .deb package from element.io (version 1.11.89) or Snap (version 1.11.88).

"element-desktop" simply doesn't start. Starting on the commandline gives:

/usr/share/libdrm/amdgpu.ids: No such file or directory
A JavaScript error occurred in the main process
Uncaught Exception:
SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_get_passwd returned ENOENT (no such file or directory)
    at Object.userInfo (node:os:365:11)
    at file:///snap/element-desktop/119/opt/Element/resources/app.asar/node_modules/atomically/dist/constants.js:10:29
    at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
    at async node:electron/js2c/browser_init:2:129567
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:137:5)
Gtk-Message: 08:32:40.075: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.
[54394:1219/083240.282753:ERROR:zygote_host_impl_linux.cc(279)] Failed to adjust OOM score of renderer with pid 54507: Permission denied (13)
[54394:1219/083240.307017:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.Secret.Service.ReadAlias: object_path= /org/freedesktop/secrets: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.1218" (uid=1020 pid=54394 comm="/snap/element-desktop/119/opt/Element/element-desk" label="snap.element-desktop.element-desktop (enforce)") interface="org.freedesktop.Secret.Service" member="ReadAlias" error name="(unset)" requested_reply="0" destination="org.freedesktop.secrets" (uid=1020 pid=14155 comm="/usr/bin/gnome-keyring-daemon --foreground --compo" label="unconfined")
/usr/share/libdrm/amdgpu.ids: No such file or directory
/usr/share/libdrm/amdgpu.ids: No such file or directory
/usr/share/libdrm/amdgpu.ids: No such file or directory

I searched a bit and found similar issues like this one: microsoft/vscode#204178

Main issue seems to be that element-desktop expects that the user has an entry in /etc/passwd, while I'm logged in with an account which is defined in a LDAP directory server. So the user is not in /etc/passwd, but correctly listed for example by "getent passwd".

As a workaround I can add the user to /etc/passwd manually and start element-desktop.

Outcome

What did you expect?

element-desktop starts

What happened instead?

element-desktop is stucked and no window appears

Operating system

Ubuntu 24.04

Application version

1.11.89

How did you install the app?

deb package from https://element.io/download#linux

Homeserver

matrix.log

Will you send logs?

No

@dosubot dosubot bot added O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Dec 19, 2024
@t3chguy
Copy link
Member

t3chguy commented Dec 19, 2024

Looks to be upstream issue with https://github.com/sindresorhus/electron-store

 ~/W/element-desktop   develop  yarn why atomically                                                   Thu Dec 19 09:19:40 2024
yarn why v1.22.22
[1/4] 🤔  Why do we have the module "atomically"...?
[2/4] 🚚  Initialising dependency graph...
warning Resolution field "@types/[email protected]" is incompatible with requested version "@types/node@^17.0.36"
warning Resolution field "@types/[email protected]" is incompatible with requested version "@types/node@^20.9.0"
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "[email protected]"
info Reasons this module exists
   - "electron-store#conf" depends on it
   - Hoisted from "electron-store#conf#atomically"
info Disk size without dependencies: "180KB"
info Disk size with unique dependencies: "420KB"
info Disk size with transitive dependencies: "420KB"
info Number of shared dependencies: 2
✨  Done in 0.18s.

@t3chguy t3chguy transferred this issue from element-hq/element-web Dec 19, 2024
@dosubot dosubot bot added A-Electron S-Critical Prevents work, causes data loss and/or has no workaround labels Dec 19, 2024
@t3chguy
Copy link
Member

t3chguy commented Dec 19, 2024

Looks like that is the built-in way for Node to get your UID/GID
image
https://nodejs.org/api/os.html#osuserinfooptions

@MidhunSureshR MidhunSureshR removed the S-Major Severely degrades major functionality or product features, with no satisfactory workaround label Dec 19, 2024
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 Z-Linux Z-Platform-Specific Z-Upstream
Projects
None yet
Development

No branches or pull requests

3 participants