Reputation: 624
I tried to build an example electron
app, using vuejs 3
. I am on Debian Buster, running node
version v10.15.1
.
I followed more or less the description given in https://github.com/nklayman/vue-cli-plugin-electron-builder:
vue --version
3.6.3
vue create frontend
cd frontend/
npm run serve //everything is fine
vue add electron-builder
npx vue-cli-service electron:serve
dist_electron/index.js
was successfully compiled, but after the message INFO Launching Electron...
, nothing did happen.
Maybe I think that my electron
installation is broken:
./node_modules/electron/dist/electron --version
[29769:0426/003034.548566: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 /home/info/frontend/node_modules/electron/dist/chrome-sandbox is owned by root and has mode 4755.
As Cloud Soh Jun Fu suggested, I tried to change permission and ownership:
sudo chown root:root chrome-sandbox
sudo chmod 4755 chrome-sandbox
Now it works as expected, but somehow I do not have a good feeling about it... I mean, I only did some elementary things, for that, I expected to run electron
out of the box...
Any other suggestions?
Upvotes: 3
Views: 1677
Reputation: 181745
There is a recent Electron bug report with this same issue: #17972.
Downgrading to Electron 4.x is one possible solution.
Another workaround is mentioned, which enables "user namespace sandboxing" instead of the "SUID sandbox":
sudo sysctl kernel.unprivileged_userns_clone=1
Supposedly this option is enabled on Ubuntu by default, but not on Arch Linux, and apparently also not on your Debian system. To make the change permanent, you can create /etc/sysctl.d/electron.conf
with the following content:
kernel.unprivileged_userns_clone = 1
Upvotes: 3