MarshallOfSound / electron-devtools-installer

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

Unable to Install React Devtools #182

Open luxifr opened 3 years ago

luxifr commented 3 years ago

I've tried installing React Devtools in my main.js as described in the readme:

const {
  default: installExtension,
  REACT_DEVELOPER_TOOLS,
} = require('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))
  createWindow()
})

However, when starting my application, the devtools don't get installed but instead I get this console output:

(node:17712) ExtensionLoadWarning: Warnings loading extension at C:\Users\myusername\AppData\Roaming\myapp\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)
Added Extension:  React Developer Tools

I'm a bit at a loss on what to do... I've already removed the whole application folder in AppData to no avail.

BlackHole1 commented 3 years ago

see: https://github.com/MarshallOfSound/electron-devtools-installer/issues/165

Lothindir commented 3 years ago

You'll have to manually delete those keys from manifest.json and the folder _metadata.

seankovacs commented 3 years ago

What worked for me is installing the package directly from git (e.g yarn add git+https://github.com/MarshallOfSound/electron-devtools-installer.git) and initializing it in code this way: await installExtension(extensions, { loadExtensionOptions: { allowFileAccess: true }, forceDownload: false });

The key for me was the forceDownload: false. With true, it wasn't working as I suspect something was failing during download?

londek commented 3 years ago

What worked for me is installing the package directly from git (e.g yarn add git+https://github.com/MarshallOfSound/electron-devtools-installer.git) and initializing it in code this way: await installExtension(extensions, { loadExtensionOptions: { allowFileAccess: true }, forceDownload: false });

The key for me was the forceDownload: false. With true, it wasn't working as I suspect something was failing during download?

Approved, this needs fix