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

The SUID sandbox helper binary was found, but is not configured correctly #4

Open
mslinn opened this issue Jul 2, 2019 · 9 comments

Comments

@mslinn
Copy link

mslinn commented Jul 2, 2019

Seems the installation instructions should have mentioned the need for setting up chrome-sandbox properly. I'm running on WSL and get this.

$ sudo chown root node_modules/electron/dist/chrome-sandbox
$ sudo chmod 4755 node_modules/electron/dist/chrome-sandbox
$ npm start

> [email protected] start /mnt/c/work/experiments/node/videodownloader
> electron .

[1790:0702/081142.951857:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that node_modules/electron/dist/chrome-sandbox is owned by root and has mode 4755.
@mayeaux
Copy link
Owner

mayeaux commented Jul 2, 2019

Sorry seems to be something specific to WSL which I haven't come across. Were you able to get it to work?

@mslinn
Copy link
Author

mslinn commented Jul 2, 2019

No. Gave up.

@mayeaux
Copy link
Owner

mayeaux commented Jul 2, 2019

Yeah sorry about that I hadn't heard of such a thing before. Sounds like it's new to Electron 5.0+ as well.

This seems to have the fix in there somewhere: electron/electron#17972 Can't really test it myself as I can't replicate it as I'm on OS X but if you find something that works I'm happy to merge a pull request! :)

@mslinn
Copy link
Author

mslinn commented Jul 2, 2019

I'm no longer listening to this thread. Good luck!

@mayeaux mayeaux changed the title FATAL:setuid_sandbox_host.cc The SUID sandbox helper binary was found, but is not configured correctly Jul 2, 2019
@ubaid-desynova
Copy link

I found the easiest way is to install electron on Windows then start it from WSL.

Steps:

Make sure you have Node.js & npm installed on your Windows machine (you can remove them afterwards) Open cmd.exe, move to your project directory and run npm install electron --save-dev. This will install the Windows version of the prebuilt Electron binary instead of the Linux one, which would occur if you try to install from WSL. (This is the actual trick) Enter Bash on Ubuntu on Windows, move to your project directory then run ./node_modules/.bin/electron (or use an npm script) to launch your Electron app Though, I'm not sure this is very convenient, it seems to work well.

I hope this will help people encoutering the same issue in the future!

Ref: electron-userland/electron-prebuilt#260

@mayeaux
Copy link
Owner

mayeaux commented Dec 17, 2019

Thank you @ubaid-desynova ! @mslinn Maybe this will solve your problem?

@kerwanp
Copy link

kerwanp commented Jan 25, 2020

Here is an other solution to avoid installing Node and NPM to your host machine:

  • Uninstall electron npm uninstall electron
  • Change npm config platform export npm_config_platform=win32
  • Install electron npm install electron
  • Unset the environment variable unset npm_config_platform

@mayeaux
Copy link
Owner

mayeaux commented Jan 26, 2020

Thanks @kerwanp ! I'm gonna leave this issue open just so people can find your solution more easily if they run into this.

@abdulsalamalmahdi
Copy link

@kerwanp thank you very much I abandoned learning about Elecron becasue of this. thanks to you I am back at it again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants