reduxjs / redux-devtools

DevTools for Redux with hot reloading, action replay, and customizable UI
http://youtube.com/watch?v=xsSnOQynTHs
MIT License
13.99k stars 1.16k forks source link

Electron State Always Undefined #1407

Closed framerate closed 1 year ago

framerate commented 1 year ago

Hoping someone can point me in a direction. I'm working on a legacy product update and have a few older dependencies I can't currently upgrade. Might be related.... But its an electron app and I've spent about 5 hours trying everything I can find on multiple computers. Here is what I see in app: image

I initialize the tools like this with latest electron-devtools-installer

// install extensions for development
  // debug tools
  if (isDev) {
    const extensions = [
      REDUX_DEVTOOLS,
      // 'cjmaipngmabglflfeepmdiffcijhjlbb', // Reselect Developer Tools
    ]

    extensions.forEach((p) => {
      installExtension(p, process.env.FORCE_EXTENSION_DOWNLOAD === 'true')
        .then((name) => log.info(`Added Extension:  ${name}`))
        .catch(Sentry.captureException)
    })
  }

Relevant logs:

[1] (node:9390) ExtensionLoadWarning: Warnings loading extension at /home/justin/.config/doomtrooper/extensions/lmhkpmbekcpmknklioeibfkpmmfibljd:
[1]   Manifest version 2 is deprecated, and support will be removed in 2023. See https://developer.chrome.com/blog/mv2-transition/ for more details.
[1]   Permission 'notifications' is unknown or URL pattern is malformed.
[1]   Permission 'contextMenus' is unknown or URL pattern is malformed.
[1]
[1] 11:51:13.385 › Added Extension:  Redux DevTools

Relevant package.json entries:

"react": "^16.14.0",
    "react-dnd": "10.0.2",
    "react-dnd-html5-backend": "10.0.2",
    "react-dom": "^16.14.0",
    "react-hot-loader": "^4.13.1",
    "react-process-string": "^1.2.0",
    "react-redux": "^7.2.9",
    "react-router": "^5.3.4",
    "react-router-dom": "^5.3.4",
    "react-spring": "^8.0.27",
    "react-tooltip": "^4.2.21",
    "react-typist": "^2.0.5",
    "react-use": "^17.4.0",
    "recharts": "^1.8.6",
    "redux": "^4.2.1",
    "redux-freeze": "^0.1.7",
    "redux-logger": "^3.0.6",
    "redux-saga": "^1.1.3",
    "redux-thunk": "^2.4.2",

I've read all github/stackoverflows I can find, I've tried installing less devtools, installing at a different time in the chain, updating electron. No matter what I do, I can't get devtools.

If anyone has a suggestion to help me stop pulling my hair out, I'd apprecate it <3

framerate commented 1 year ago

Note I saw a thread about clearing IndexDB for redux-devtools but maybe it doesn't seem to work inside electron unless someone knows more than me!

framerate commented 1 year ago

I was able to fix this but upgrading to redux-toolkit instead of redux, which I do NOT feel is a solution but I'll leave the note here for the next person working on a legacy project.

Good luck

hrivks commented 5 months ago

Ran into this as well. Managed to fix this by changing "matches": [ "\u003Call_urls>" ], to "matches": [ "<all_urls>" ], in the manifest.json. Weird the unicode sequence doesn't work on Electron 🤷‍♂️