devtron icon indicating copy to clipboard operation
devtron copied to clipboard

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

Open JasonLiSZ opened this issue 5 years ago • 1 comments

…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.

JasonLiSZ avatar Jan 27 '21 06:01 JasonLiSZ

@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.

raviSussol avatar Apr 10 '21 05:04 raviSussol