-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: can't access dead object" if the frame is removed from under us #614
Comments
We currently only check for valid chrome windows, but not for content windows. So it means that you have to wait for https://bugzilla.mozilla.org/show_bug.cgi?id=1349861 being fixed. |
I fixed this problem with |
You fixed it because you explicitly switched away from the non-existent browsing context. With the upcoming fix in Marionette the failure you would see without your change, would only change to a So it means leave your change in and you will be fine. |
FF 53.0 The |
Firefox 53.0: A coding exception was thrown and uncaught in a Task. Full message: TypeError: can't access dead object |
Me too comments are currently not helpful. We know about this problem. To track the status of the Marionette integration please watch https://bugzilla.mozilla.org/show_bug.cgi?id=1349861, or wait until this issue gets closed. Thanks. |
@Satan
A coding exception was thrown and uncaught in a Task.
Full message: TypeError: can't access dead object
Full stack: ***@***.***://gre/modules/Finder.jsm:457:1
***@***.***://gre/modules/FinderIterator.jsm:496:11
***@***.***://gre/modules/Task.jsm:319:42
FWIW this doesn’t originate from Marionette/geckodriver, so it’s
unrelated to the problem described here. You can safely ignore this
error.
|
I have encountered a use case where the expected fix (changing to NoSuchWindowError) is not enough. I am using WebDriverWait to wait for a Dojo UI to render. I switch to the content frame and then wait for a certain element to become clickable; I know it is only drawn and enabled at the end of the rendering. But while the rendering is happening, the content frame gets reloaded fully - yet the frame with the name still exists. I would expect the wait to succeed, and it does with Chrome, but it fails with Geckodriver. I have a workaround (thanks to Florent B. on stackoverflow), a custom condition which switches frame every time. But I think the standard wait should still work. Details: http://stackoverflow.com/questions/44005034/cant-access-dead-object-in-geckodriver/ |
I think that I will work on https://bugzilla.mozilla.org/show_bug.cgi?id=1349861 next, just to make the error message webdriver conform. @ramendik it would help us if you can provide a minimized testcase for this, and also attach a trace level log. As best file a new issue for this, which would be dependent on this. Thanks. |
@whimboo the code I use is at the stackoverflow link. But unfortunately, the Web UI I am testing is not public and I am not able to reimplement the problem - just don't know how to code the Web page. The page would need to have a content frame and to refresh it dynamically. I can try to collect a trace log in my existing environment if that would help. |
Please do so, and really file a new issue given that it is different to this one. Thanks. |
Hi folks, Just wondering if this was fixed? I'm using geckodriver 0.21.0 and Firefox 61 and in some cases after using a frame - the page gets reloaded, I get the "System.InvalidOperationException : TypeError: can't access dead object" error? Thanks! |
@alexlazarciuc do you have a code example which works publicly and we can use to reproduce it? Thanks. |
Was this resolved? I'm able to reproduce this issue. |
@kathagcam can you please provide a trace log? As it looks like the referenced bug in Bugzilla is fixed but the problem might still be existent. Please see https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/TraceLogs.html in how to create one. Then please upload it as attachment to this issue. Thanks. |
The issue is still actual, here is the trace log of the Java test mentioned in the oiriginal post. |
@barancev do you also have the corresponding HTML snippet which this test uses? That would be helpful. |
https://github.com/SeleniumHQ/selenium/tree/master/common/src/web/frame_switching_tests |
Thanks! I can reproduce and filed https://bugzilla.mozilla.org/show_bug.cgi?id=1493108 to get the missing "browser context" check implemented. |
Driver.SwitchTo().DefaultContent() before the offending command worked for me. thanks. |
Hi Guys, Driver.SwitchTo().DefaultContent() is not working in FF 72.0.2. Is there any workaround here |
This worked for me: WebUI.delay(2) |
any update on this? |
This is fixed now in Firefox 82, which will become beta soon. It would be great if anyone can verify that. Thanks a lot. |
@whimboo I tested on Firefox 83 (release version), geckodriver 0.28.0, MacOS 11.0.1, Selenium 3.141.0. In Firefox 81 & geckodriver 0.27.0, I can still reproduce the bug. Seems like the bug is partly fixed in Firefox 83? If I don't switch to default content before switching to iframe, it will give me another error:
I assume that we need more fix? For now, i use |
@jackblk please file a new issue for that, and please attach a trace log and if possible a minimized test case. Thanks. |
Firefox Version
55.0a1 (2017-04-06) (64-bit)
geckodriver 0.15
Platform
Windows 7
Steps to reproduce
Java Selenium test FrameSwitchingTest.testShouldNotBeAbleToDoAnythingTheFrameIsDeletedFromUnderUs, the main part is:
NoSuchFrameException is expected, but the trace is:
The text was updated successfully, but these errors were encountered: