-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
Need a way to run with --no-sandbox by default #18265
Comments
This is not something that would be easy to support, or something that is good for the security of the Electron ecosystem as a whole. The decision was made and discussed in #15760. Any issues users are having with the SUID sandbox on linux can be fixed by either correctly configuring the OS or ensuring the permissions of the I'd recommend reading through #17972 For snapcraft issues, this PR to the snapcraft maker should handle those: electron-userland/electron-installer-snap#22 The stack trace in https://github.com/burtonator/polar-bookshelf/issues/947 looks like it might be a separate issue though, so raising that as a new issue would be helpful. In particular any information about any PPAPI plugins in use, or things like trying to use the chrome PDF viewer. |
@MarshallOfSound Since there is already |
Because that's not possible, the choice on what and how to sandbox is done way before a users app code ever runs. A programatic option to disable sandbox is useless |
This is rediculous, I'm forced to downgrade from Electron 5.0 because of no solutions when on WSL > Cypress 3.5 which forces Electron use 5.0. Have to downgrade to 3.4. Now I'm on the older 2.0 electron just to make my tests to work FYI this is problematic on WSL as well... All WSL users who uses the new Cypress.io 3.5 will run into this issue with NO WORKAROUND at all.
|
Is it also possible to have an environment variable override, in situations where directly plugging into CLI is not possible? |
It might be useful if the electron app itself is run in another jail that disables |
The following seems to work for me: // run this at early startup, before app.on('ready')
app.commandLine.appendSwitch('--no-sandbox') |
On some Linux distributions the `electron:serve` task won't work without the `--no-sandbox` flag. see: electron/electron#18265 electron/electron#15760 electron/electron#17972
I've been searching for a solution to the snapcraft sandbox issues for many hours now. I see that electron-userland/electron-installer-snap#22 was implemented, but I don't understand how it fixes the issue. My snap builds still all get rejected during automatic review with
How are we supposed to fix this issue? |
There should be an environment variable in addition to the Use cases:
|
@tarruda Is there a way to add this option only for Linux (and not for other builds ?) |
|
I want to publish an electron app to Steam, and when launched through the Steam Linux Runtime, it takes a good minute or two before either closes or shows a blank screen. The only fix I've found is to set the I tried both If this is true, afaik you can already achieve this using const win = new BrowserWindow({
webPreferences: {
sandbox: false,
},
}) On another note, this comment mentions:
So it's also possible that |
Problem Description
5.0 implemented sandbox by default but a ton of our users are reporting issues.
See:
https://github.com/burtonator/polar-bookshelf/issues/947
https://github.com/burtonator/polar-bookshelf/issues/891
For a stack traces and other errors.
It looks like --no-sandbox fixes it but if I construct the browser window with sandbox: false that doesn't fix the problem.
Proposed Solution
Some way to disable the sandbox by default and/or restore the old behavior.
The text was updated successfully, but these errors were encountered: