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

fix: Cannot read property 'BrowserWindow' of undefined issue when ins… #226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JasonLiSZ
Copy link

…tall devtron

As the methods of: electron.remote.BrowserWindow.getDevToolsExtensions was obsolete, this fix is trying to locate get/add/remove extension methods in [session] instead of BrowserWindow.

…tall devtron

As the methods of: electron.remote.BrowserWindow.getDevToolsExtensions was obsolete, this fix is trying to locate get/add/remove extension methods in [session] instead of BrowserWindow.
@raviSussol
Copy link

raviSussol commented Apr 10, 2021

@JasonLiSZ Is this pr fix working for you for the latest version of the electron (i.e. 12 or higher)? I tried to copy your changes to the devtron repo and started and loaded locally. When I tried to install in the Console tab of the devtool then throws another error: Cannot read property 'defaultSession' of undefined. I suspect that if you try to require the whole electron object in the api.js file and try log in the console then you'll see some of the main module objects are not there (i.e undefined) [remote, session]. Thats why it has been throwing for BrowserWindow undefined at first place despite having the method getDevToolsExtensions is deprecated though.

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

Successfully merging this pull request may close these issues.

2 participants