通过Selenium使用GeckoDriver Firefox丢弃了浏览上下文 [英] Browsing context has been discarded using GeckoDriver Firefox through Selenium
问题描述
我没有对我的python硒程序进行任何更改,并且3天前它运行良好.现在,当我尝试使用它时,我得到:
I didn't make any changes to my python selenium program and it worked fine 3 days ago. Now when i try to use it i get:
浏览上下文已被丢弃 无法解码木偶的回应
Browsing context has been discarded Failed to decode response from marionette
任何想法可能导致代码外的原因吗? (因为未进行任何更改)
Any idea what could have caused this outside the code? (since no changes were made)
我正在使用firefox和geckodriver.收到这些错误后,我更新了firefox,geckodriver和selenium,但没有帮助.
I'm using firefox and geckodriver. After i got these errors i updated firefox, geckodriver, and selenium, but it didn't help.
推荐答案
此错误消息...
Browsing context has been discarded
.
Failed to decode response from marionette
...表示 GeckoDriver 和牵线木偶之间的通信中断.
...implies that the communication between GeckoDriver and Marionette was broken.
有关以下二进制版本项的更多信息:
Some more information regarding the binary version interms of:
- 硒服务器/客户端
- GeckoDriver
- Firefox
此外,您的代码块和错误堆栈跟踪将为我们提供一些有关发生了什么错误的线索.但是,由于以下多种因素,可能会发生此问题:
Additionally, your code block and the error stack trace would have given us some clues about whats wrong happening. However this issue can happen due to multiple factors as follows:
- 按照在导航请求删除当前浏览上下文时挂起
driver.navigate().back();
当硒的焦点位于<iframe>
内时,会观察到此错误. - 按照在命令执行期间崩溃会导致内部服务器错误:无法解码响应来自木偶" 的问题,也可能是由于 ctypes检查NULL指针取消引用而导致的.
- As per Hang when navigation request removes the current browsing context if you have used
driver.navigate().back();
when Selenium's focus was within an<iframe>
this error is observed. - As per Crash during command execution results in "Internal Server Error: Failed to decode response from marionette" this issue can also occur due to ctypes checks for NULL pointer derefs.
- You can find the Selenium testcase here. Perhaps instead of panicking, it would have been better to handle this more gracefully by clearing any state and returning geckodriver to accept new connections again.
您可以在以下位置找到相关的详细讨论:
You can find a relevant detailed discussion in:
这篇关于通过Selenium使用GeckoDriver Firefox丢弃了浏览上下文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
- As per Hang when navigation request removes the current browsing context if you have used