question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Electron sandbox_bundle.js script failed to run (react-scripts >=5.0.0)

See original GitHub issue

After 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:open
  • Created a year ago
  • Reactions:11
  • Comments:13

github_iconTop GitHub Comments

1reaction
Rllyyycommented, May 29, 2022

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.

[10172:0529/223604.786:ERROR:CONSOLE(0)] "Error in event handler: Error: Cannot remove node "517" because no matching node was found in the Store.
[1]     at chrome-extension://hciokebhlhamdchnahfojjpkegfnafpn/build/main.js:25394:43
[1]     at bridge_Bridge.emit (chrome-extension://hciokebhlhamdchnahfojjpkegfnafpn/build/main.js:23500:22)
[1]     at chrome-extension://hciokebhlhamdchnahfojjpkegfnafpn/build/main.js:23660:12
[1]     at listener (chrome-extension://hciokebhlhamdchnahfojjpkegfnafpn/build/main.js:51574:39)", source: chrome-extension://hciokebhlhamdchnahfojjpkegfnafpn/main.html (0)

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.

0reactions
aaftiocommented, Sep 15, 2022

[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.

  • “electron”: “^20.0.2”
  • “electron-devtools-installer”: “^3.2.0”
  • Windows 11
  • Install “REACT_DEVELOPER_TOOLS”
  • NodeJS: v16.17.0
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found