signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.7k stars 2.68k forks source link

Signal won't start if /tmp is mounted `noexec` #6897

Open WhyNotHugo opened 6 months ago

WhyNotHugo commented 6 months ago

Using a supported version?

Overall summary

Signal hangs at startup before the main window is rendered:

App threw an error during load
Error: Error loading shared library /tmp/.org.chromium.Chromium.HiFJHc: Operation not permitted
    at process.func [as dlopen] (node:electron/js2c/node_init:2:2214)
    at Module._extensions..node (node:internal/modules/cjs/loader:1489:18)
    at Object.func [as .node] (node:electron/js2c/node_init:2:2441)
    at Module.load (node:internal/modules/cjs/loader:1214:32)
    at Module._load (node:internal/modules/cjs/loader:1030:12)
    at c._load (node:electron/js2c/node_init:2:13672)
    at Module.require (node:internal/modules/cjs/loader:1242:19)
    at require (node:internal/modules/helpers:176:18)
    at load (/usr/lib/signal-desktop/app.asar/node_modules/@signalapp/libsignal-client/node_modules/node-gyp-build/node-gyp-build.js:22:10)
    at Object.<anonymous> (/usr/lib/signal-desktop/app.asar/node_modules/@signalapp/libsignal-client/Native.js:6:43)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Error loading shared library /tmp/.org.chromium.Chromium.HiFJHc: Operation not permitted
    at process.func [as dlopen] (node:electron/js2c/node_init:2:2214)
    at Module._extensions..node (node:internal/modules/cjs/loader:1489:18)
    at Object.func [as .node] (node:electron/js2c/node_init:2:2441)
    at Module.load (node:internal/modules/cjs/loader:1214:32)
    at Module._load (node:internal/modules/cjs/loader:1030:12)
    at c._load (node:electron/js2c/node_init:2:13672)
    at Module.require (node:internal/modules/cjs/loader:1242:19)
    at require (node:internal/modules/helpers:176:18)
    at load (/usr/lib/signal-desktop/app.asar/node_modules/@signalapp/libsignal-client/node_modules/node-gyp-build/node-gyp-build.js:22:10)
    at Object.<anonymous> (/usr/lib/signal-desktop/app.asar/node_modules/@signalapp/libsignal-client/Native.js:6:43)
[11815:0601/144834.323730:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[11815:0601/144834.323745:ERROR:select_file_dialog_linux_portal.cc(286)] Failed to read portal version property

I'm unsure if the error related to "no file chooser available" is the cause or not. That should be a warning; not a fatal error.

Steps to reproduce

  1. Start signal-desktop

Expected result

It should start.

Actual result

It won't start.

Screenshots

n/a

Signal version

7.10.0

Operating system

Alpine Linux edge

Version of Signal on your phone

unavailable

Link to debug log

No response

jamiebuilds-signal commented 6 months ago

That error looks like some sort of file permissions issue. What method did you use to install Signal? Have you done something to change file permissions?

WhyNotHugo commented 6 months ago

Yeah, it's a permissions issue executing.

Apparently Signal tries to write some binaries into /tmp/ and then execute them, so this doesn't work in /tmp/ is mounted noexec.

I can work around this by mounting /tmp/ without noexec, but that's far from ideal.

Shouldn't binaries be unpacked at install-time, rather than at runtime?

jamiebuilds-signal commented 6 months ago

Unfortunately it is required by the app framework that we are using, so we need those permissions

stale[bot] commented 3 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

WhyNotHugo commented 3 weeks ago

https://nostalebots.xyz