Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Rllyyy opened this issue Apr 28, 2022 · 14 comments
Open

Comments

@Rllyyy
Copy link

Rllyyy commented Apr 28, 2022

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
@shensven
Copy link

+1

@Nicholaiii
Copy link

This seemingly is independent of the tool installed. Happens for me using vue dev tools.

@Nantris
Copy link

Nantris commented May 29, 2022

@Rllyyy do you see any problems resulting from these errors?

@Rllyyy
Copy link
Author

Rllyyy commented 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.

@Coldplayer1995
Copy link

I have the same issues with my react version. "react": "^18.1.0",
"react-dom": "^18.1.0",
"react-redux": "^8.0.2",
"react-router-dom": "5.2.0",

Also it is showing No store found, but obviously there is one.

@Nantris
Copy link

Nantris commented Jun 9, 2022

@Coldplayer1995 in development or in production? This issue doesn't affect our redux-devtools in development, so it would be surprising if it did for you.

@orpheus
Copy link

orpheus commented Jun 10, 2022

Same/similar issue. Getting a light spam of logs even though the Component tab works for react-dev-tools.

[43019:0610/115709.104244:ERROR:CONSOLE(160)] "Electron sandbox_bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (160)
[43019:0610/115709.104287:ERROR:CONSOLE(160)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (160)
[43019:0610/115709.212558:ERROR:CONSOLE(1)] "Extension server error: Object not found: <top>", source: devtools://devtools/bundled/models/extensions/extensions.js (1)
[43019:0610/115709.212758:ERROR:CONSOLE(1)] "Extension server error: Object not found: <top>", source: devtools://devtools/bundled/models/extensions/extensions.js (1)
[43019:0610/115710.734290:ERROR:CONSOLE(1)] "Extension server error: Object not found: <top>", source: devtools://devtools/bundled/models/extensions/extensions.js (1)
[43019:0610/115718.697043:ERROR:CONSOLE(160)] "Electron sandbox_bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (160)
[43019:0610/115718.697093:ERROR:CONSOLE(160)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (160)

Usage

import installExtension, {  REACT_DEVELOPER_TOOLS } from 'electron-devtools-installer'

app.whenReady().then(() => {
  installExtension(REACT_DEVELOPER_TOOLS).
    then((name) => console.log(`Added Extension:  ${name}`)).
    catch((err) => console.log('An error occurred: ', err))
})

Versions

Using electron-forge

... devdeps
    "@electron-forge/cli": "^6.0.0-beta.63",
    "@electron-forge/maker-deb": "^6.0.0-beta.63",
    "@electron-forge/maker-rpm": "^6.0.0-beta.63",
    "@electron-forge/maker-squirrel": "^6.0.0-beta.63",
    "@electron-forge/maker-zip": "^6.0.0-beta.63",
    "@electron-forge/plugin-webpack": "6.0.0-beta.63",
    "electron": "19.0.3",
    "electron-devtools-installer": "^3.2.0",
...deps
    "electron-squirrel-startup": "^1.0.0",
    "react": "^18.1.0",
    "react-dom": "^18.1.0",

@Coldplayer1995
Copy link

@slapbox I am using reduxjs/toolkit
"@reduxjs/toolkit": "^1.8.2",

Added Extension: React Developer Tools
[32108:0615/105323.045:ERROR:CONSOLE(160)] "Electron sandbox_bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (160)
[32108:0615/105323.045:ERROR:CONSOLE(160)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (160)

Also my store.js
export default configureStore({
reducer: {
user: userReducer,
console: consoleReducer,
devices: deviceReducer,
networkInterface: networkInterfaceReducer
},
devTools: true,
})
See attached empty state:

image

@Zyles
Copy link

Zyles commented Jul 5, 2022

I copy pasted the readme and get same error with VUEJS_DEVTOOLS.

@BasixKOR
Copy link

We use our custom webpack configuration and can confirm this bug.

@edemagbenyo
Copy link

@Coldplayer1995 have you got any luck with this issue?

@Coldplayer1995
Copy link

The redux is working but those devtools nope, as you can see I have empty state where in fact the state is not empty :)

@hayden-pan
Copy link

[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

@afbelardi
Copy link

Has anyone found a solution for this error? Still getting the same one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests