Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React DevTools and Redux DevTools tabs sometimes not appearing Electron@9.0.0 #23662

Closed
3 tasks done
mashafomasha opened this issue May 19, 2020 · 93 comments
Closed
3 tasks done

Comments

@mashafomasha
Copy link

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • v9.0.0
  • Operating System:
    • macOS 10.15.4
  • Last Known Working Electron version:
    • 8.2.0

Expected Behavior

In our project we are loading ReactDevTool and ReduxDevTools.

app.on('ready', async () => {
    await session.defaultSession.loadExtension(
        path_to_devtools
    );
});

In the terminal for version 9.0.0 we see warnings:

(node:59148) ExtensionLoadWarning: Warnings loading extension at path_to_ext: 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:59148) ExtensionLoadWarning: Warnings loading extension at path_to_ext: 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:59148) ExtensionLoadWarning: Warnings loading extension at path_to_ext: 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.
(node:59148) ExtensionLoadWarning: Warnings loading extension at path_to_ext: 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.

And both extensions don't work.

Actual Behavior

No warnings in the terminal and working extensions.

@nornagon nornagon self-assigned this May 19, 2020
@ChALkeR
Copy link
Contributor

ChALkeR commented May 19, 2020

While there do seem to be timing issues, the specific issue described here is hinted in the warning.

Cannot load extension with file or directory name _metadata

Just remove _metadata directory from the extension dir contents.
Upd: that seems to not actually block the load despite the error message. It still should be removed afaik.

@nornagon
Copy link
Member

Looks like this might be due to the extension's use of the browserAction API, which Electron doesn't support.

@nornagon
Copy link
Member

On my machine, using the current version of React DevTools:

$ sha256sum fmkadmapgofadopljbjfkapdkoienihi.crx
85805f29722f77cbff7d4f3d2d26f4c9e592fbd7b779a0ade04967ef76bca271  fmkadmapgofadopljbjfkapdkoienihi.crx

I'm able to get the extension working by wrapping the calls to browserAction APIs in try{...}catch(_){}.

I'll look into providing stubs for those APIs so that React DevTools will load correctly.

@nornagon
Copy link
Member

Hm, on closer inspection, I think the browserAction issue is a red herring.

It seems like opening the devtools early during pageload is more likely to result in the devtools tab not appearing, while waiting a few seconds after pageload before opening devtools seems to result in the tabs appearing fairly reliably.

@ChALkeR
Copy link
Contributor

ChALkeR commented May 19, 2020

It seems like opening the devtools early during pageload is more likely to result in the devtools tab not appearing, while waiting a few seconds after pageload before opening devtools seems to result in the tabs appearing fairly reliably.

+1 to that, that's the exact timing issues that I experience with react devtools extension.

Closing and reopening devtools also helps.

@ChALkeR
Copy link
Contributor

ChALkeR commented May 19, 2020

@nornagon What is also interesting here is that

app.on("web-contents-created", (event, contents) => {
  console.log(contents.history)
})

behaves differently, and logs one more web contents instance in the scenario when react devtools tab does not appear, with 'chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/_generated_background_page.html'.

@nornagon
Copy link
Member

@ChALkeR here's what i observe from web-contents-created:

in a successful situation:

'chrome-extension://gjmkhpefabifmeccfcddcpnbjgdkncjf/_generated_background_page.html'
'devtools://devtools/bundled/devtools_app.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/@d471bad5c023b7dedfe772ab25426861170b2dd3/&can_dock=true&toolbarColor=rgba(223,223,223,1)&textColor=rgba(0,0,0,1)&experiments=true'

in a failing situation:

'devtools://devtools/bundled/devtools_app.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/@d471bad5c023b7dedfe772ab25426861170b2dd3/&can_dock=true&toolbarColor=rgba(223,223,223,1)&textColor=rgba(0,0,0,1)&experiments=true'
'chrome-extension://gjmkhpefabifmeccfcddcpnbjgdkncjf/_generated_background_page.html'

This would seem to indicate that the issue occurs when the extension's background page hasn't loaded when devtools is opened.

@nornagon
Copy link
Member

nornagon commented May 19, 2020

I was able to reproduce the above behavior in Chrome.

  1. Install Chrome Canary
  2. Install the React Devtools extension in Chrome Canary
  3. Quit Chrome Canary
  4. Launch Chrome Canary with the following command to launch & begin loading a page immediately:
$ /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary https://reactjs.org/
  1. As soon as the window opens, press Cmd+Shift+I to open devtools

The React Devtools tabs will be missing. Closing and reopening the devtools causes the React Devtools tab to appear. This behavior matches what I observe in Electron.

@ChALkeR
Copy link
Contributor

ChALkeR commented May 19, 2020

@nornagon In a successful situation, I don't see the extra webcontents at all. Here is the code:

const { BrowserWindow, app, ...electron } = require('electron')
const path = require('path')
console.log(`Electron: ${process.versions.electron}`)
app.on("web-contents-created", (event, contents) => {
  console.log(contents.history)
})
app.on('ready', async () => {
  const window = new BrowserWindow({
    webPreferences: {
      webSecurity: true,
      contextIsolation: true,
      nodeIntegration: false,
      nativeWindowOpen: true,
      enableRemoteModule: false,
      sandbox: true,
      partition: 'persist:tmp',
    }
  })
  const rd = path.join(__dirname, 'react-devtools')
  window.webContents.session.loadExtension(rd)
  window.loadURL('https://reactjs.org/')
  window.openDevTools({mode:'detach'})
  window.show()
})

Adding a delay await new Promise(resolve => setTimeout(resolve, 5000)) does make it appear though.

Perhaps that's a separate bug with web-contents-created event missing in some cases?

@nornagon
Copy link
Member

nornagon commented May 19, 2020

Here's my repro code:

const { app, session, BrowserWindow } = require('electron');
const path = require('path');

(async () => {
  await app.whenReady()
  await session.defaultSession.loadExtension(path.join(__dirname, 'react-devtools-extension'))

  const bw = new BrowserWindow({webPreferences: {sandbox: true}})
  bw.loadURL('https://reactjs.org')
})()
app.on("web-contents-created", (event, contents) => {
  console.log(contents.history)
})

@ChALkeR
Copy link
Contributor

ChALkeR commented May 19, 2020

@nornagon modifying your code and adding one line:

const { app, session, BrowserWindow } = require('electron');
const path = require('path');

(async () => {
  await app.whenReady()
  await session.defaultSession.loadExtension(path.join(__dirname, 'react-devtools-extension'))

  const bw = new BrowserWindow({webPreferences: {sandbox: true}})
  bw.loadURL('https://reactjs.org')
  bw.openDevTools() // this line was added, note no delay
})()
app.on("web-contents-created", (event, contents) => {
  console.log(contents.history)
})

I observe that:

  • most of the times, the extension is loaded after the devtools and there are three web-contents-created events, in the following order (and React tab does not appear):
    1. []
    2. ['devtools://devtools/bundled/devtools_app.html?...'],
    3. ['chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/_generated_background_page.html'],
  • but sometimes (~10% perhaps), there are just two (and React tab appears and works.):
    1. [],
    2. ['devtools://devtools/bundled/devtools_app.html?...'].

upd: fixed order

Does this have to do something with the extension, or is this likely to be a bug in web-contents-created?

Upd: seems related to extension loading somehow, and not to the event. This code also produces different output in those scenarios (2 vs 3 webContents), 2 when react devtools works, 3 when not.

  setTimeout(() => {
    const all = webContents.getAllWebContents()
    console.log(Date.now(), all.length, all.map(x => x.history))
  }, 5000)

@GitNomster
Copy link

Same problem with Vue devtools.

Unrecognized manifest key 'browser_action'. Unrecognized manifest key 'update_url'.
Permission 'contextMenus' 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.

@mashafomasha
Copy link
Author

Does this have to do something with the extension, or is this likely to be a bug in web-contents-created?

Those extensions worked with electron@8.2.0 and we didn't observe any errors and warning at startup time with version 8.2.0 )

@nornagon
Copy link
Member

The implementation of extensions in Electron changed drastically with 9.x: #21814

@nornagon
Copy link
Member

@ChALkeR I have observed some situations in which the WebContents are created in this order:

  1. []
  2. devtools://devtools/bundled/devtools_app.html/...
  3. chrome-extension://gjmkhpefabifmeccfcddcpnbjgdkncjf/_generated_background_page.html

and the devtools tabs do appear and function correctly. So I suspect there's also an element of timing from the loaded web page sending a message to the extension.

Given that this is reproducible in Chrome, I've filed a bug upstream: https://bugs.chromium.org/p/chromium/issues/detail?id=1085215

@nornagon
Copy link
Member

NB. to folks finding this issue, the warnings about "unrecognized manifest key", "permission malformed" and the _metadata directory are just that: warnings. They are not the cause of this issue.

@nornagon nornagon changed the title React DevTools and Redux DevTools not working Electron@9.0.0 React DevTools and Redux DevTools tabs sometimes not appearing Electron@9.0.0 May 20, 2020
@idanwork
Copy link

Does this have to do something with the extension, or is this likely to be a bug in web-contents-created?

Those extensions worked with electron@8.2.0 and we didn't observe any errors and warning at startup time with version 8.2.0 )

For me react-dev-tools was working properly also on 8.3.0 and stopped loading on 9.0.0

@nornagon
Copy link
Member

@idanwork a workaround for now is to close and re-open devtools.

@ChALkeR
Copy link
Contributor

ChALkeR commented May 21, 2020

@nornagon

Re: webContents -- it still confuses me why a situation where everything works can have either 2 or 3 webContents instances. Something doesn't seem right, even if that's not directly related to this issue.

Re:

a workaround for now is to close and re-open devtools.

It looks to me that there might be some other problems.
My guess would be that perhaps extensions do not work in 9.0 when the page was loaded over file:// protocol, but I did not recheck, will do so shortly.

@ChALkeR
Copy link
Contributor

ChALkeR commented May 21, 2020

@nornagon I confirmed that extensions don't work with file:// urls.

E.g., using the code from #23662 (comment), on https://example.com (which doesn't have React) there is no "React" tab (as expected), but a content script is there:
Screenshot_20200521_235253

On file:// url there is no content script:
Screenshot_20200521_235544

react-devtools has this in manifest.json:

"permissions": [ "file:///*", "http://*/*", "https://*/*" ],

Chrome behaves the same, but it has an Allow access to file URLs switch (the fileAccess flag) on extension page at chrome://extensions/, which enables the extension to run on file:// urls (which can be verified on Content scripts tab).

Any hint how to do that in Electron?

This seems to be the main problem here and is not timing-related.
Those extensions worked on file:// protocols in Electron 8.

@NatanCieplinski
Copy link

Same with VueJS Devtools.

ExtensionLoadWarning: Warnings loading extension at /Users/natancieplinski/Library/Application Support/Electron/extensions/nhdogjmejiglipccpnnnanhbledajbpd: Unrecognized manifest key 'browser_action'. Unrecognized manifest key 'update_url'. Permission 'contextMenus' 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.

Electron version: 9.0.0
System: MacOS 10.15.4

@nornagon
Copy link
Member

See also facebook/react#19002

@ChALkeR
Copy link
Contributor

ChALkeR commented Jun 1, 2020

@nornagon Even without react-devtools, with spec/fixtures/extensions/chrome-api extension, it appears as a content script if loaded over https:// but does not appear if loaded over file://.

Should I open a new issue for that to unclutter this one? As this apparently is a combination of problems, not a single problem.

@nornagon
Copy link
Member

nornagon commented Jun 1, 2020

@ChALkeR supporting extensions on file:// urls is a separate thing, yes. Would be great to open a new issue for that.

@btzsoft
Copy link

btzsoft commented Jun 6, 2020

any ideas how to fix this?

@nornagon
Copy link
Member

nornagon commented Feb 8, 2021

Watch the PR.

@jackple
Copy link

jackple commented Feb 23, 2021

electron version: 11.3.0

session.defaultSession.loadExtension(
'/Users/xxx/Library/Application Support/Google/Chrome/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/4.10.1_7', 
{ allowFileAccess: true }
)
(node:53645) ExtensionLoadWarning: Warnings loading extension at /Users/xxx/Library/Application Support/Google/Chrome/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/4.10.1_7: Unrecognized manifest key 'browser_action'. Unrecognized manifest key 'minimum_chrome_version'. Unrecognized manifest key 'update_url'. Manifest contains a differential_fingerprint key that will be overridden on extension update. Cannot load extension with file or directory name _metadata. Filenames starting with "_" are reserved for use by the system. 

still have this problem
@nornagon

@jorgercg
Copy link

@jackple @nornagon Electron 11.3.0, same error message as jackple but, in my case, the redux dev tools works!!!!

@chenzhutian
Copy link

@jackple @jorgercg @nornagon Electron 11.3.0, can show the devtool but cannot work. Keep showing these:

[68436:0225/133113.440320:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.", source: chrome-extension://pehaphboominjhffloabhpjbifgmkfoh/main.html (0)
[68436:0225/133113.447737:ERROR:CONSOLE(36402)] "Uncaught Error: Attempting to use a disconnected port object", source: chrome-extension://pehaphboominjhffloabhpjbifgmkfoh/build/main.js (36402)
[68436:0225/133113.470348:ERROR:CONSOLE(36402)] "Uncaught Error: Attempting to use a disconnected port object", source: chrome-extension://pehaphboominjhffloabhpjbifgmkfoh/build/main.js (36402)
[68436:0225/133119.394824:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.", source: chrome-extension://lmhkpmbekcpmknklioeibfkpmmfibljd/devpanel.html (0)
[68436:0225/133123.735275:ERROR:CONSOLE(36402)] "Uncaught Error: Attempting to use a disconnected port object", source: chrome-extension://pehaphboominjhffloabhpjbifgmkfoh/build/main.js (36402)

@colining
Copy link

Electron 11.3.0 same error but it's work

@colining
Copy link

colining commented Feb 28, 2021

If you have this problem
update the electron version > 11.3.0 && code like this in main.dev.ts

app.whenReady().then(async () => {
  await session.defaultSession.loadExtension(
    reactDevToolsPath,
    { allowFileAccess: true }   //this is the key line
    )
}).then(createWindow).catch(console.log);

@petef19
Copy link

petef19 commented Feb 28, 2021

Testing on Electron 11.3.0 on Win 10 x64

When building the Ng app just w/ Ng serve to see that NgRx store works in general, the store works in brower.

Running Electron 11.3.0 with

app.on('ready', async() =>
{
    const ext_fp = path.join('E:/__cache/Chrome/default/Extensions/lmhkpmbekcpmknklioeibfkpmmfibljd/2.17.0_0');
    await session.defaultSession.loadExtension(ext_fp, {allowFileAccess: true}).then(createWindow).catch(console.log);
});

the NgRx store does not work in Chrome 87.0.4280.141 browser, same error message Store cannot be found

Console logs these errors:

(node:97252) ExtensionLoadWarning: Warnings loading extension at E:\__cache\Chrome\default\Extensions\lmhkpmbekcpmknklioeibfkpmmfibljd\2.17.0_0: 
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.

how is this working for you guys ? Anybody here on Win 10 ?

@dperetti
Copy link

dperetti commented Mar 5, 2021

No joy for me. 😞
Electron 11.3 / 12.0 . OSX
Nothing shows up despite Added Extension: React Developer Tools

ExtensionLoadWarning: Warnings loading extension at /Users/dom/Library/Application Support/ACME/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

@RobbieTheWagner
Copy link

@dperetti everything works for me on OSX for Ember Inspector. How are you loading the extension?

@radoslavkarlik
Copy link

radoslavkarlik commented Mar 17, 2021

DevTools tabs work for me even without the { allowFileAccess: true } option but I still get the warnings about unrecognized manifest keys.

@Lan-Hekary
Copy link

Same Problem as @radoslavk
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.

@nornagon
Copy link
Member

Those warnings are ignorable, Electron does not support the features to which those manifest keys relate.

@jeremyong
Copy link

"Ignorable warnings" are, in mind a bug since users will be inexorably trained to ignore warnings.

@petef19
Copy link

petef19 commented Apr 9, 2021

I finally was able to get Redux DevTools working on Electron 12.0.2 by loading the extension directly - using the electron-devtools-installer package v3.1.1 did NOT work.

Win 10x64

facebook-github-bot pushed a commit to facebook/flipper that referenced this issue Apr 15, 2021
Summary:
When trying to run some React component performance profiles, the updates registered made absolutely no sense (components rerendering without any parent or other cause causing them to render etc). That turned out to be caused by having an outdated version of the React devTools in Flipper.

Sadly the newer version of the React DevTools didn't work with our current Electron version anymore. Some horrible hacking is needed to work around that.

To help with updating the tools in the future (they are by default cached forever on the local machine), I've introduced the `FLIPPER_UPDATE_DEV_TOOLS` variable.

The plugin loading work around is inspired by electron/electron#23662 (comment)

Reviewed By: passy

Differential Revision: D27685981

fbshipit-source-id: c35e49aff9b2457b63122eeee0d5c042ddd3b08b
@torgeadelin
Copy link

This is still happening on electron 11.0.1...
Anybody has a fix that actually works?

@barretron
Copy link

barretron commented Jun 25, 2021

There are 3 devtools-related issues that I've run into simultanously:

  1. Extensions break when the disable-site-isolation-trials flag is set [Bug]: appendSwitch(disable-site-isolation-trials) breaks devtools extensions #29052
  2. Extensions don't work with pages loaded from the file:// protocol in Electron 9.x Extensions don't work with file:// protocol since 9.0.0 #24011
  3. Race condition where extensions don't load correctly if the devtools window is opened too quickly after the BrowserWindow opens (this issue)

Assuming your issue is the race condition and not the other 2, delaying openDevTools by 5 seconds fixes the issue for me:

win.webContents.once('did-finish-load', () => {
  setTimeout(() => {
    if (win && !win.isDestroyed()) {
      win.webContents.openDevTools();
    }
  }, 5000);
});

@devowit
Copy link

devowit commented Aug 8, 2021

Still not able to load react devtools with electron 10.1.1...

@martpie
Copy link

martpie commented Aug 8, 2021

Make sure you use allowFileAccess in order to load redux or react extensions (and probably any other ones)

example:

https://github.com/martpie/museeks/blob/853b700663b7b6f49214925b16f05363df9df28f/src/main/modules/devtools.ts#L16-L21

@devowit
Copy link

devowit commented Aug 8, 2021

my code in main.ts:


import installExtension, { REACT_DEVELOPER_TOOLS } from 'electron-devtools-installer';
import { app, BrowserWindow } from 'electron';
app.whenReady().then(() => {
  installExtension(REACT_DEVELOPER_TOOLS, { loadExtensionOptions: { allowFileAccess: true } })
      .then((name) => console.log(`Added Extension:  ${name}`))
      .catch((err) => console.log('An error occurred: ', err));
});

Initially I get this output:

ExtensionLoadWarning: Warnings loading extension at C:\Users\Username\AppData\Roaming\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.
Added Extension: React Developer Tools

then, when I open the developer tools, I get

[23308:0808/123437.005:ERROR:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'instance' of undefined", source: devtools://devtools/bundled/devtools_app.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/@472e51ed20308c1f3cbd8706286e998fe511b4e/&can_dock=true&toolbarColor=rgba(223,223,223,1)&textColor=rgba(0,0,0,1)&experiments=true (1)

and in the developer tools console, I get:

Download the React DevTools for a better development experience: https://fb.me/react-devtoolsYou might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq

from renderer.bundle.js:205648

@alanscandrett
Copy link

alanscandrett commented Sep 23, 2021

electron version: 11.3.0

session.defaultSession.loadExtension(
'/Users/xxx/Library/Application Support/Google/Chrome/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/4.10.1_7', 
{ allowFileAccess: true }
)
(node:53645) ExtensionLoadWarning: Warnings loading extension at /Users/xxx/Library/Application Support/Google/Chrome/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/4.10.1_7: Unrecognized manifest key 'browser_action'. Unrecognized manifest key 'minimum_chrome_version'. Unrecognized manifest key 'update_url'. Manifest contains a differential_fingerprint key that will be overridden on extension update. Cannot load extension with file or directory name _metadata. Filenames starting with "_" are reserved for use by the system. 

still have this problem
@nornagon

If you have this problem
update the electron version > 11.3.0 && code like this in main.dev.ts

app.whenReady().then(async () => {
  await session.defaultSession.loadExtension(
    reactDevToolsPath,
    { allowFileAccess: true }   //this is the key line
    )
}).then(createWindow).catch(console.log);

This resolved it for me.
My steps:

  1. Ensure you are using the Beta Vue Devtools if using vue3 (ljjemllljcmogpfapbkkighbhhppjdbg)
  2. Add allow file access
app.whenReady().then(async () => {
  await session.defaultSession.loadExtension(vueDevToolsPath, { allowFileAccess: true })
  createWindow()
  app.on('activate', function () {
    if (BrowserWindow.getAllWindows().length === 0) createWindow()
  })
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests