Description
React version: react-devtools v4.9.0
Steps To Reproduce
- On debian, install react-devtools as a dev dependency in your project or globally
- try and run npx react-devtools or just react-devtools
The current behavior
The command fails silently and nothing happens.
The expected behavior
React DevTools should start and connect to app.
I am not sure this is the right place to post this, but since I know how to fix this issue and I think other people might face it, I'm opening this thread to also post the solution.
I run into this issue on Linux (debian bullseye with kernel 5.7.0). The main problem is connected to Electron (afaik since version 5) not being able to launch without binary being owned by root and chmod 4755. The issue is with the new sandbox and the priviledges it requires to launch.
There is also another workaround I found some months ago on the dedicated thread from Electron's GH (since this is a common issue for Linux users of all Electron applications) that works for every packaged Electron app and binary.
Instead of modifying the electron binary permissions, you can instead tweak an option of your running kernel by doing:
sudo sysctl kernel.unprivileged_userns_clone=1
Then your Electron apps will launch, and thus so will React DevTools.
Feel free to close this if it isn't relevant here (since not really an issue with devtools itself, rather with Electron x Debian), but I haven't found anything regarding this matter and I think someone might encounter this issue in the future (hoping I'm not totaly mistaken about this to begin with 😄)