MarshallOfSound / electron-devtools-installer

An easy way to ensure Chrome DevTools extensions into Electron
MIT License
1.11k stars 136 forks source link

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

Open Rllyyy opened 2 years ago

Rllyyy commented 2 years ago

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:

shensven commented 2 years ago

+1

Nicholaiii commented 2 years ago

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

Nantris commented 2 years ago

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

Rllyyy commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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

BasixKOR commented 2 years ago

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

edemagbenyo commented 2 years ago

@Coldplayer1995 have you got any luck with this issue?

Coldplayer1995 commented 2 years ago

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 commented 1 year ago

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

afbelardi commented 1 year ago

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