electron / electron-quick-start

Clone to try a simple Electron app
https://electronjs.org/docs/latest/tutorial/quick-start
Creative Commons Zero v1.0 Universal
11.12k stars 4.92k forks source link

exited with signal SIGTRAP #554

Open taylortreece opened 2 years ago

taylortreece commented 2 years ago

Hello, I have tried cloning this repo along with manually following the docs, and I am getting this error when running npm start:

/home/taylor/dev/electron-quick-start/node_modules/electron/dist/electron exited with signal SIGTRAP

I have traced the file only to find that electron within the dist directory is a file that cannot be read by vscode since it is a binary file or something of the sort. Does anyone know what this might be? I have googled around and posted to StackOverflow, but I have no idea how to resolve this. Any guidance would be appreciated. Thanks!

erickzhao commented 2 years ago

Hi @taylortreece, happy American thanksgiving! 🦃

This might have been a regression found in Electron 16 specifically for Linux: https://github.com/electron/electron/issues/31885

Do you still encounter the bug if you downgrade to Electron 15? You can manually do that in package.json or just check out the 15-x-y branch in this repo.

itbj commented 2 years ago

Hello, I have tried cloning this repo along with manually following the docs, and I am getting this error when running npm start:

/home/taylor/dev/electron-quick-start/node_modules/electron/dist/electron exited with signal SIGTRAP

I have traced the file only to find that electron within the dist directory is a file that cannot be read by vscode since it is a binary file or something of the sort. Does anyone know what this might be? I have googled around and posted to StackOverflow, but I have no idea how to resolve this. Any guidance would be appreciated. Thanks!

1.  Xserver setup ok, for example export DISPLAY=127.0.0.1:0.0
2. start WSL as Administrator.
2.  cd /tmp/electron-quick-start/node_modules/electron/dist
3.  sudo chown root chrome-sandbox
    sudo chmod 4755 chrome-sandbox
4.  npm start
5.  the x-windows should be displayed and some alarms in shell.

electron-app

lukewlms commented 7 months ago

In my case this was fixed by updating the "main" entry in package.json:

"main": "main.js",

immengzi commented 2 months ago

https://stackoverflow.com/questions/70060941/electron-not-starting-properly-due-to-sigtrap