electron-devtools-installer icon indicating copy to clipboard operation
electron-devtools-installer copied to clipboard

ExtensionLoadWarning for React Devtools

Open tysonnero opened this issue 4 years ago • 21 comments

I'm using https://github.com/electron/electron-quick-start.

I installed electron-devtools-installer and wired it up as per the README: https://github.com/MarshallOfSound/electron-devtools-installer#usage.

When I run the Electron app, I get the following message in the console, and React Devtools never loads in the app/browser.

(node:67218) ExtensionLoadWarning: Warnings loading extension at /Users/tysonnero/Library/Application Support/electron-quick-start/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. 
Added Extension:  React Developer Tools
"electron": "^9.1.1",
"electron-devtools-installer": "^3.1.1"

tysonnero avatar Jul 24 '20 01:07 tysonnero

Seeing the same issue with the same electron and electron-devtools-installer version.

abrunner94 avatar Jul 24 '20 18:07 abrunner94

Same issue, also same electron and electron-devtools-installer version, trying to load VUEJS-DEVTOOLS.

ethankale avatar Jul 28 '20 18:07 ethankale

Hmmm... suggested fix here is to close and reopen devtools? https://github.com/electron/electron/issues/23662

tysonnero avatar Jul 28 '20 18:07 tysonnero

Issue remains after closing & opening the project and rebuilding the entire project with Webpack.

ethankale avatar Jul 29 '20 01:07 ethankale

Loading VUEJS_DEVTOOLS has the same issue. [email protected] and [email protected]

misterpancn avatar Aug 20 '20 02:08 misterpancn

FYI it appears that the extensions still work (at least for me), though this error is an annoyance.

cjones26 avatar Aug 24 '20 19:08 cjones26

Having the same Issue loading VUEJS_DEVTOOLS [email protected], [email protected]

I am using await in the app ready event, no error is thrown. closing and reopening doesn't fix the issue.

Vue also says "Download the Vue Devtools extension for a better development experience:" so it seems it is not loaded

Coding-Kiwi avatar Aug 24 '20 20:08 Coding-Kiwi

:tada: While the warning itself does not cause issues with the extension - https://github.com/electron/electron/issues/23662#issuecomment-631758044, the separate issue with React / Vue Dev Tools tab not appearing can be worked around with simply awaiting the page to load and then opening dev tools, without the need to close and reopen - https://github.com/electron/electron/issues/23662#issuecomment-656756927. Helped me.

midskyey avatar Aug 28 '20 06:08 midskyey

I get the same error with VUEJS_DEVTOOLS.

As others have noted, devtools still works in my app, but the warning is annoying.

mcasto avatar Sep 19 '20 14:09 mcasto

I was facing the same issue. electron has deprecated BrowserWindow.addDevToolsExtension methods. Instead now you are supposed to use session.loadExtension method.

To fix I first tried to manually install my local extension folder (chrome extension), via BrowserWindow.addDevToolsExtension method. And it threw the same error I was facing when using electron-devtools-installer package. Then I tried session.loadExtension and it worked this time.

Note: session.loadExtension only works with non temporary session (either defaultSession or when session partition starts with "persist:")

kksharma1618 avatar Sep 29 '20 18:09 kksharma1618

@kksharma1618 weird, because as you can see here, electron-devools-installer already uses session.loadExtension https://github.com/MarshallOfSound/electron-devtools-installer/blob/master/src/index.js#L80

Coding-Kiwi avatar Sep 30 '20 07:09 Coding-Kiwi

@Coding-Kiwi Could be because I was using non default session.

kksharma1618 avatar Sep 30 '20 10:09 kksharma1618

Seeing this issue on Electron ^10.1.3 with electron-devtools-installer ^3.1.1 as well

(node:53670) ExtensionLoadWarning: Warnings loading extension at /Users/___/Library/Application Support/___/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. 
(node:53670) ExtensionLoadWarning: Warnings loading extension at /Users/___/Library/Application Support/___/extensions/lmhkpmbekcpmknklioeibfkpmmfibljd: Unrecognized manifest key 'commands'. Unrecognized manifest key 'homepage_url'. Unrecognized manifest key 'page_action'. Unrecognized manifest key 'short_name'. Unrecognized manifest key 'update_url'. Permission 'notifications' is unknown or URL pattern is malformed. Permission 'contextMenus' is unknown or URL pattern is malformed. Permission 'tabs' is unknown or URL pattern is malformed. Cannot load extension with file or directory name _metadata. Filenames starting with "_" are reserved for use by the system. 
Added Extension: Redux DevTools
[53670:1001/160735.175209:ERROR:CONSOLE(216)] "Extension server error: Object not found: <top>", source: devtools://devtools/bundled/extensions/extensions.js (216)
[53670:1001/160735.175427:ERROR:CONSOLE(216)] "Extension server error: Object not found: <top>", source: devtools://devtools/bundled/extensions/extensions.js (216)

WolfieZero avatar Oct 01 '20 15:10 WolfieZero

Having the same Issue loading VUEJS_DEVTOOLS [email protected], [email protected]

I am using await in the app ready event, no error is thrown. closing and reopening doesn't fix the issue.

Vue also says "Download the Vue Devtools extension for a better development experience:" so it seems it is not loaded

@Coding-Kiwi if you are still facing this issue, see if this works for you https://github.com/electron/electron/issues/23662#issuecomment-706059013

itsfarseen avatar Oct 09 '20 08:10 itsfarseen

@happycoder97 sadly this also does not fix my problem. I think there is something wrong with vue devtools, other extensions work. (I tried both the regular and the beta one)

Coding-Kiwi avatar Oct 13 '20 08:10 Coding-Kiwi

Having the same issue, any idea how to fix this?

nodegin avatar Oct 28 '20 12:10 nodegin

Seems like this could be related to https://github.com/electron/electron/issues/24011 The problem seems to be when you load file:// urls

Coding-Kiwi avatar Oct 28 '20 14:10 Coding-Kiwi

(node:18122) ExtensionLoadWarning: Warnings loading extension at /Users/yy/Library/Application Support/Electron/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.

"electron": "^11.0.1",
"electron-builder": "^22.3.6",
"electron-devtools-installer": "^3.1.1",

use electron-react-boilerplate

shmilyoo avatar Feb 16 '21 09:02 shmilyoo

For me it was the fact that I was using the file:// protocol, this can be worked around by using allowFileAccess

installExtension(VUEJS3_DEVTOOLS, {
    loadExtensionOptions: {
        allowFileAccess: true,
    },
})

The warning still stays, but the devtools work!

I fiddled around with loading the extension manually. I copied the extension folder from my chrome userdata folder and loaded it like this:

import { session } from 'electron';

let ext_path = path.resolve(".", "extensions", "vue-devtools");
await session.defaultSession.loadExtension(ext_path, {
    allowFileAccess: true
});

I modified the manifest.json inside the extension folder (deleted the browser_action, update_url keys, the "contextMenus" entry in permissions) and deleted the _metadata directory.

This resolves the ExtensionLoadWarning and the devtools still work, but as it is said everywhere the warning has nothing to do with the extension not working, the main issue is most propably allowFileAccess

Coding-Kiwi avatar Jun 13 '21 14:06 Coding-Kiwi

I solved the problem for me for VUEJS3_DEVTOOLS (ljjemllljcmogpfapbkkighbkhhppjdbg, 6.0.0 beta 7) by removing contextMenus in permissions as advised @Coding-Kiwi

antonreshetov avatar Nov 19 '21 07:11 antonreshetov

PSA for anyone who doesn't like the idea of editing extension files/maintaining your own copy of an extension, you can easily suppress the ExtensionLoadWarning messages by overriding stderr. Just be careful nothing else is happening in your app that might need stderr to show you something actually helpful.

Example using await:

const oldError = process.stderr.write;
process.stderr.write = () => null;

await installExtension(VUEJS3_DEVTOOLS)
    .catch(e => console.log(e.toString()));

process.stderr.write = oldError;

Example using then/catch

const oldError = process.stderr.write;
const showStderr = () => process.stderr.write = oldError;
process.stderr.write = () => null;

installExtension(VUEJS3_DEVTOOLS)
    .then(showStderr)
    .catch(e => showStderr() && console.log(e.toString()));

akett avatar May 03 '22 22:05 akett