Closed LoganDark closed 2 years ago
Hi @LoganDark, did you find a workaround for the problem yet? I'm running into the same error.
Hi @LoganDark, did you find a workaround for the problem yet? I'm running into the same error.
I wish
@pcharisius @LoganDark Try with something like this:
await install(REACT_DEVELOPER_TOOLS, {
loadExtensionOptions: {
allowFileAccess: true
},
forceDownload: true
});
@pcharisius @LoganDark Try with something like this:
await install(REACT_DEVELOPER_TOOLS, { loadExtensionOptions: { allowFileAccess: true }, forceDownload: true });
At least it gets this far now:
(node:14856) ExtensionLoadWarning: Warnings loading extension at C:\Users\LoganDark\AppData\Roaming\<censored>\extensions\fmkadmapgofadopljbjfkapdkoienihi:
Unrecognized manifest key 'browser_action'.
Unrecognized manifest key 'minimum_chrome_version'.
Unrecognized manifest key 'update_url'.
Cannot load extension with file or directory name _metadata. Filenames starting with "_" are reserved for use by the system.
(Use `electron --trace-warnings ...` to show where the warning was created)
@LoganDark These mesages are normal, are warnings. Now you can use react dev tool, if you open dev tools you will see the component tab
@LoganDark These mesages are normal, are warnings.
Now you can use react dev tool, if you open dev tools you will see the component tab
Nope. Every time I open devtools, I get this:
(node:21480) electron: Failed to load URL: chrome-extension://idfgllamndddgpeogaeoaiekkiafajcb/main.html with error: ERR_BLOCKED_BY_CLIENT
[21480:0121/074655.475:ERROR:CONSOLE(1)] "Ignoring unauthorized client request from null", source: devtools://devtools/bundled/models/extensions/extensions.js (1)
and react devtools doesn't load.
I had that error and it was related to allowFileAccess
property.
Are you sure you have updated your code properly?
I had that error and it was related to
allowFileAccess
property.
Are you sure you have updated your code properly?
Yes, here's the code
const {default: install, REACT_DEVELOPER_TOOLS} = require('electron-devtools-installer')
await install(REACT_DEVELOPER_TOOLS, {
loadExtensionOptions: {
allowFileAccess: true
},
forceDownload: true
})
why are you using require instead import?
Your problem is documented here: loadExtension
The problem was that I was using a custom session. Since react-devtools-installer doesn't let you choose the session, the custom session wasn't getting the devtools.
Solution was to unset session
and partition
in webpreferences
I'm not really sure what the issue is here, and since I'm using Electron Forge I can't pass trace-warnings to electron. :(
Is this an incorrect usage of electron-devtools-installer?
Removing the
await install(...)
line causes the error to go away, and logging the output of it just printsReact Developer Tools
, as if the install was successful.