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
TypeError: browsingContext.currentWindowGlobal is null #2112
Comments
Could you please attach a trace-level log from geckodriver? Read more about reporting actionable bugs in our contribution guidelines. |
Sure, I attached them to this message |
It's not clear to me what's happening on this site - maybe you can help. As it looks like an iframe is getting added by the navigation and that you switch to that frame. Then when trying to find an element it fails initially because it is added lazily to the DOM? Surprisingly then the iframe gets destroyed and the find element call fails as expected with So I have two questions:
|
I can actually see the failure when the currently selected frame is removed before taking a screenshot. This is because we inappropriately try to screenshot the child browsing context but not the top-level one as given by the spec. There is bug 1493650 which covers that. Nevertheless I would be still interested to see what's going on for this page and why the iframe is getting removed. |
We have many tests which follow the following pattern
Reading the logs again, after your comment, I think that the problem is indeed in Adding We run the same test also in Chrome and it doesn't have this iframe create/remove/create problem. Switching to the default context will fix the screenshot problem, but it seems the the real problem is the iframe. |
Was able to track it to our frontend framework, which deletes and creates iframe in a very short period of time. Not sure what made the problem more "obvious" in Firefox 113, but it is the problem on our side! Thanks for the help! |
Good to know and thanks for the remaining investigation. Basically all the other commands beside taking a screenshot should work given that those use the correct browsing context check. Only the screenshot command is broken and we are still going to fix that via bug 1493650. |
System
Testcase
Since firefox released v113 we have been having a lot of problems with the test stability. It seems that firefox loses the reference to window object. Our logs are full of the following log messages
TypeError: browsingContext.currentWindowGlobal is null
Code that fails often:
We developed a "workaround" for this issue:
Stacktrace
Trace-level log
The text was updated successfully, but these errors were encountered: