Running as root without --no-sandbox is not supported

After starting with resin-electronjs I’ve since updated to electron 5 since I was having some issues with UI elements. Unfortunately now I’m running into some issues with my container it appears. I’ve resolved several issues along the way but now I am absolutely stuck on this error message:

10.07.19 16:31:11 (-0500) app [45:0710/213111.584824:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

I’ve done a bit of research and tried several solutions, including setting the no sandbox flag via electron:

app.commandLine.appendSwitch(’–no-sandbox’);

Has anyone managed to get an electron 5 app running here?

1 Like

We have asked internally to see if anyone has tried this yet, and we will post back here if we have anything :+1:

Thanks for the info either way, and if you do happen to solve it in the meantime, please do update us, it would be very welcomed.

Rich

1 Like

You can try adding --no-sandbox after electron here https://github.com/balena-io/resin-electronjs/blob/master/app/start.sh#L21 .

2 Likes

Or create a user and run your app with it.

1 Like

–no-sandbox

Thanks so much @zvin (and you too @richbayliss) - that did work. I’m a little disappointed that electron wouldn’t handle that switch but this is fine for now. I’ll also look at creating a separate non root user to run the application which seems like the objectively better approach.

You guys are awesome.

Se soluciona haciendo la instalación como usuario local. Por ejemplo, se le dan los permisos sudo chmod u+x fichero.appimage y después el programa para poder abrirlo hacer lo siguiente: ./fichero.appimage --no-sandbox
Y así se soluciona.