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
Electron 4.0.2 remote.getCurrentWindow() returns null inside webview preload script #16558
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines. |
Hello ! |
Hello ! The code of the file webview-preload.js:
has been changed like below:
And this gives the expected result. I would like to know if this resolves the issue asked previously? |
Hey Kenzaal. |
I've faced the same issue! |
Hi! We're students of the University of Paris 8 in France. the output given is like below:
We have tried some of the solutions found from certain Github pages that deal with that kind of problems, unfortunately, it doesn't work for us. We would like some help in order to start to deal with this bug as it should be. Thank you in advance. |
Hi, |
Any update on this? This is a major blocker to upgrade electron for us. PS: happening for mac as well on the latest version of electron 4.1.4 |
I have the same issue - remote.getCurrentWindow() always return null, after update to Electron 1.8.x to 4.x.x. Have not found a solution yet. |
@grozdanovgg We have found a workaround.
|
@harryi3t, thanks for the suggested workaround. I actually used another one - Still, this approach works in that specific case, it is not general solution. The bug with remote.getCurrentWindow() still remains... |
I cannot reproduce it with Electron 4.2.12. |
remote.BrowserWindow.fromId(currentWindowId) returns null: Steps to reproduce:
|
I am facing this issue on Electron 8.3.4 and none of the suggested workaround solved this issue. I need help please. |
In case it helps anyone, I needed to do this: https://stackoverflow.com/questions/37884130/electron-remote-is-undefined/63612780#63612780
|
Ubuntu 16.04
Expected Behavior
require('electron').remote.getCurrentWindow() returns BrowserWindow object
Actual behavior
require('electron').remote.getCurrentWindow() returns null
To Reproduce
https://github.com/kaniseo/electron-getCurrentWindow-bug
Instructions on reproduction in the readme file.
The text was updated successfully, but these errors were encountered: