Electron sandbox_bundle.js script failed to run (react-scripts >=5.0.0)
See original GitHub issueAfter upgrading to react-scripts@5.0.0 the following warning appears, when trying to open the the devtools in electron with electron-devtools-installer (REACT_DEVELOPER_TOOLS):
[1] [20144:0428/213837.341:ERROR:CONSOLE(160)] "Electron sandbox_bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (160)
[1] [20144:0428/213837.341:ERROR:CONSOLE(160)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (160)
Removing the code associated with electron-devtools-installer fixes the problem.
This error was also documented here and here.
Packages:
- React: 17.0.2
- Electron: 17.4.0
- electron-devtools-installer: 3.2.0
- react-scripts: 5.0.1
Issue Analytics
- State:
- Created a year ago
- Reactions:11
- Comments:13
Top Results From Across the Web
[Bug]: Electron sandbox_bundle.js script failed to run #32133
After this you can no longer click on a button. Okay, the reloading issue seems to be react-scripts version but the sandbox error...
Read more >updating react-scripts version from 3.4.0 to 5.0.0 causing Type ...
I am trying to upgrade react-scripts from 3.4.0 to 5.0.0 and it thrown issue when I do 'npm run start', Type Error: Cannot...
Read more >react-scripts-ts - npm
Start using react-scripts-ts in your project by running `npm i react-scripts-ts`. There are 188 other projects in the npm registry using ...
Read more >Electron@13 and Create-React-App | Mike Polinowski
I now used Electron to host local HTML and as a wrapper around a Gatsby.js app. Now I want to use Electron together...
Read more >react-scripts | Yarn - Package Manager
We've also updated our templates to use createRoot and relaxed our check for older versions of Create React App. Migrating from 5.0.0 to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The Components and Profiler tab seem to work fine. As does the app itself. I don’t know if this is related but sometimes the console gets spammed with the following message every time some interacts with the websites ui.
But I can’t 100% reproduce it. Might be related to a manual refresh (F5). Electron continuous to work just fine, but the error also shows up in the Components dev tab.
[5428:0915/205246.655:ERROR:CONSOLE(160)] "Electron sandbox_bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (160) [5428:0915/205246.656:ERROR:CONSOLE(160)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (160) [5428:0915/205256.519:ERROR:CONSOLE(160)] "Electron sandbox_bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (160) [5428:0915/205256.525:ERROR:CONSOLE(160)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (160)I have the same issue.