MarshallOfSound / electron-devtools-installer

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

Uncaught TypeError: Cannot read property 'displayName' of null #93

Closed kingpalethe closed 4 years ago

kingpalethe commented 5 years ago

I'm getting this error on a fresh install, using React devtools

backend.js:9159 Uncaught TypeError: Cannot read property 'displayName' of null
    at getDisplayName (backend.js:9159)
    at getDataFiber (backend.js:9880)
    at enqueueMount (backend.js:10137)
    at mountFiber (backend.js:10225)
    at backend.js:10285
    at Set.forEach (<anonymous>)
    at Object.walkTree (backend.js:10283)
    at backend.js:8534
    at <anonymous>:52:32
    at Array.map (<anonymous>)

Seems likely it is related to this issue: https://github.com/facebook/react-devtools/issues/1168

This is my current package.json

  "dependencies": {
    "@babel/plugin-proposal-class-properties": "^7.1.0",
    "@fortawesome/fontawesome-free": "^5.4.2",
    "bootstrap": "^4.1.3",
    "get-video-id": "^3.1.0",
    "jquery": "^3.3.1",
    "lodash": "^4.17.11",
    "react": "^16.6.0",
    "react-dom": "^16.6.0",
    "react-toastify": "^4.4.0",
    "reactstrap": "^6.5.0",
    "source-map-support": "^0.5.9",
    "ytdl-core": "^0.26.3"
  },
  "devDependencies": {
    "@babel/preset-react": "^7.0.0",
    "electron": "2.0.7",
    "electron-builder": "^20.28.1",
    "electron-devtools-installer": "^2.2.4",
    "electron-webpack": "^2.1.2",
    "webpack": "^4.16.5"
itzsaga commented 5 years ago

I ran into this as well. Not truly an issue with this package but people might search and find it.

To solve this for now react and react-dom need to be 16.5.2. So npm install react@16.5.2 react-dom@16.5.2 or yarn add react@16.5.2 react-dom@16.5.2.

Once the above-mentioned issue is resolved hopefully this shouldn't be an issue anymore.

Pandawan commented 5 years ago

Strange, I am getting this error even with react and react-dom as 16.5.2.

EDIT: I was able to fix this by clearing the electron cache/data. (Go to userData folder, and delete everything).

alxmiron commented 5 years ago

I also fall into this issue with react, react-doc: v16.6.1, electron: v2.0.13, electron-devtools-installer: v2.2.4. With electron: v2.0.11 there was no such problem. React devtools are not working now because of that

DeedleFake commented 5 years ago

EDIT: I was able to fix this by clearing the electron cache/data. (Go to userData folder, and delete everything).

I was able to fix it by deleting just the extensions directory inside userData. It incorrectly claimed an error happened when it was installing the React devtools on the next launch, but it worked on the second launch just fine. Seems to happen every time.

mstarski commented 5 years ago

EDIT: I was able to fix this by clearing the electron cache/data. (Go to userData folder, and delete everything).

I was able to fix it by deleting just the extensions directory inside userData. It incorrectly claimed an error happened when it was installing the React devtools on the next launch, but it worked on the second launch just fine. Seems to happen every time.

Worked for me, thank you.

MarshallOfSound commented 4 years ago

This was a temporary bug in react devtools itself, fixed upstream and therefore closing here