You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[3937:0131/003107.790938:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
Linux manjaro 4.20.3-1-MANJARO. No sudo. Regular user. No containerization.
Running sudo sysctl kernel.unprivileged_userns_clone=1 makes [email protected] work. But I don't believe that stable electron@5 version will require users to modify the system settings in order to allow electron@v5 based apps starting.
I understand it's probably due to the sandboxing enabled by default without testing sandboxing support by the system. Besides, there might be needed a way to detect at the app level whether sandboxing supported by the system, method like app.isSandboxingSupported(). So there would be a way to inform app user with the respective message and recommendations.
I'm able to start chromium-71.0.3578.98-3 on that system. Here is the console output:
[15156:15156:0131/095653.119829:ERROR:sandbox_linux.cc(364)] InitializeSandbox() called with multiple threads in process gpu-process.
[15126:15126:0131/095653.252765:ERROR:x11_input_method_context_impl_gtk.cc(144)] Not implemented reached in virtual void libgtkui::X11InputMethodContextImplGtk::SetSurroundingText(const base::string16 &, const gfx::Range &)
Console output remains the same regardless of the kernel.unprivileged_userns_clone value.
On Wed, Jan 30, 2019 at 22:58 Vladimir Yakovlev ***@***.***> wrote:
I'm able to start chromium-71.0.3578.98-3 on that system. Here is the
console output:
[15156:15156:0131/095653.119829:ERROR:sandbox_linux.cc(364)] InitializeSandbox() called with multiple threads in process gpu-process.
[15126:15126:0131/095653.252765:ERROR:x11_input_method_context_impl_gtk.cc(144)] Not implemented reached in virtual void libgtkui::X11InputMethodContextImplGtk::SetSurroundingText(const base::string16 &, const gfx::Range &)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16631 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKjANlWk0yoDoOt2RPqwX74-GQN6CPIks5vIpP7gaJpZM4abHxK>
.
Manjaro Linux goes with kernel.unprivileged_userns_clone disabled by default. But even if a user has intentionally disabled that option having it enabled by default, I think that any electron app still should be able to start.
@nornagon by the way if I run chromium-71.0.3578.98-3 like this chromium --disable-setuid-sandbox I get the error same as in original message:
[3138:3138:0131/102333.898710:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
Trace/breakpoint trap (core dumped)
And it starts well with --no-sandbox option added chromium --no-sandbox --disable-setuid-sandbox.
Arch Linux and distributives based on it are quite popular on desktop and [email protected] fails there since user namespaces sandboxing is forced. User namespaces sandboxing can only be enabled on those systems by manual kernel.unprivileged_userns_clone option tweaking (root/sudo access rights required). So I'd imagine electron to try user namespaces sandbox first and fallback to setuid sandbox if the primary option is unsupported by the system.
Just tried v5.0.0-beta.6 and I confirm that setuid sandbox works for me now.
For those who use electron-builder the simplest way to run chmod 4755 ./dist/linux-unpacked/chrome-sandbox before packaging is doing that in after-pack script, something to this one.
Activity
nornagon commentedon Jan 30, 2019
Are you running electron inside docker?
vladimiry commentedon Jan 31, 2019
I'm not running it insider docker. But there will be a need to run it on Travis CI (e2e tests in headless mode).
MarshallOfSound commentedon Jan 31, 2019
@vladimiry What machine / environment are you currently running this on to get this error.
OS? Is it containerized? OS Version? User Permisions? Running as sudo? Etc.
As much info as you can provide about your environment would be incredibly helpful
vladimiry commentedon Jan 31, 2019
Linux manjaro 4.20.3-1-MANJARO. No sudo. Regular user. No containerization.
Running
sudo sysctl kernel.unprivileged_userns_clone=1makes [email protected] work. But I don't believe that stable electron@5 version will require users to modify the system settings in order to allow electron@v5 based apps starting.I understand it's probably due to the sandboxing enabled by default without testing sandboxing support by the system. Besides, there might be needed a way to detect at the app level whether sandboxing supported by the system, method like
app.isSandboxingSupported(). So there would be a way to inform app user with the respective message and recommendations.MarshallOfSound commentedon Jan 31, 2019
@vladimiry Can you confirm that chromium runs on that system with no extra configuration.
vladimiry commentedon Jan 31, 2019
I'm able to start chromium-71.0.3578.98-3 on that system. Here is the console output:
Console output remains the same regardless of the
kernel.unprivileged_userns_clonevalue.nornagon commentedon Jan 31, 2019
vladimiry commentedon Jan 31, 2019
It seems to be including the following patches https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/chromium
Manjaro Linux goes with
kernel.unprivileged_userns_clonedisabled by default. But even if a user has intentionally disabled that option having it enabled by default, I think that any electron app still should be able to start.vladimiry commentedon Jan 31, 2019
@nornagon by the way if I run chromium-71.0.3578.98-3 like this
chromium --disable-setuid-sandboxI get the error same as in original message:And it starts well with
--no-sandboxoption addedchromium --no-sandbox --disable-setuid-sandbox.MarshallOfSound commentedon Jan 31, 2019
@nornagon looks like it uses the setuid sandbox. https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/chromium#n190
vladimiry commentedon Jan 31, 2019
nornagon commentedon Jan 31, 2019
Interesting. The setuid sandbox has been deprecated for a long time in Chromium, see e.g. https://chromium.googlesource.com/chromium/src/+/HEAD/docs/linux_suid_sandbox.md, and hasn't ever been supported in Electron to my knowledge. But according to https://chromium.googlesource.com/chromium/src/+/HEAD/docs/linux_sandboxing.md#sandbox-types-summary it's still maintained. Perhaps we should consider supporting it in Electron.
vladimiry commentedon Jan 31, 2019
Arch Linux and distributives based on it are quite popular on desktop and [email protected] fails there since user namespaces sandboxing is forced. User namespaces sandboxing can only be enabled on those systems by manual
kernel.unprivileged_userns_cloneoption tweaking (root/sudo access rights required). So I'd imagine electron to try user namespaces sandbox first and fallback to setuid sandbox if the primary option is unsupported by the system.sebakerckhof commentedon Feb 13, 2019
I'm seeing the same issue on Debian 9.5
vladimiry commentedon Mar 25, 2019
Just tried v5.0.0-beta.6 and I confirm that setuid sandbox works for me now.
For those who use electron-builder the simplest way to run
chmod 4755 ./dist/linux-unpacked/chrome-sandboxbefore packaging is doing that in after-pack script, something to this one.