Mozilla Firefox 68.2.0esr浏览器使用GeckoDriver和Selenium崩溃 [英] Mozilla Firefox 68.2.0esr browser is crashing using GeckoDriver and Selenium

查看:124
本文介绍了Mozilla Firefox 68.2.0esr浏览器使用GeckoDriver和Selenium崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过硒启动Firefox浏览器,但不幸的是,浏览器启动后立即关闭.我无法从日志文件中进行解释.

I was trying to launch Firefox browser through selenium, but unfortunately browser is getting closed immediately after it launches. I couldn't interpret from the log file.

以下是日志文件条目:

1582121786461   mozrunner::runner       INFO    Running command: "/usr/bin/firefox" "-marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile.d4XupquDfaWC"
1582121787117   addons.webextension.screenshots@mozilla.org     WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1582121787117   addons.webextension.screenshots@mozilla.org     WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1582121787118   addons.webextension.screenshots@mozilla.org     WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1582121787118   addons.webextension.screenshots@mozilla.org     WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
JavaScript error: resource:///modules/sessionstore/SessionStore.jsm, line 1325: uncaught exception: 2147746065
1582121789421   Marionette      INFO    Listening on port 33105
1582121789488   Marionette      WARN    TLS certificate errors will be ignored for this session
19:46:29.537 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C
19:46:29.559 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session 1420379c-5cc3-444a-8309-0492333a3c5f (org.openqa.selenium.firefox.GeckoDriverService)
1582121794637   Marionette      WARN    TimedPromise timed out after 5000 ms: stacktrace:
bail@chrome://marionette/content/sync.js:237:64
Fatal: no entropy gathering module detected
Redirecting call to abort() to mozalloc_abort


###!!! [Parent][MessageChannel] Error: (msgtype=0x1E008F,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv

A content process crashed and MOZ_CRASHREPORTER_SHUTDOWN is set, shutting down
JavaScript error: resource:///modules/sessionstore/SessionFile.jsm, line 376: Error: _initWorker called too early! Please read the session file from disk first.
[Parent 423702, Gecko_IOThread] WARNING: pipe error (82): Connection reset by peer: file /home/abuild/rpmbuild/BUILD/firefox-68.2.0/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 358
1582121795636   Marionette      INFO    Stopped listening on port 33105

以下是浏览器/库的版本:

Here are the versions of Browser/libraries:

  • Firefox版本:68.2.0esr
  • Geckodriver版本:0.24
  • 硒版本:3.141.59

我尝试使用不同版本的Gecko驱动程序和Selenium,但没有任何效果.请让我知道对此的任何解决方案.

I have tried with different versions of Gecko driver and Selenium, but nothing worked. Please let me know any solution for this.

推荐答案

此错误消息...

Fatal: no entropy gathering module detected 
Redirecting call to abort() to mozalloc_abort
.
A content process crashed and MOZ_CRASHREPORTER_SHUTDOWN is set, shutting down 
JavaScript error: resource:///modules/sessionstore/SessionFile.jsm, line 376: 
Error: _initWorker called too early! Please read the session file from disk first. 
[Parent 423702, Gecko_IOThread] WARNING: pipe error (82): Connection reset by peer: file /home/abuild/rpmbuild/BUILD/firefox-68.2.0/ipc/chromium/src/chrome/common/ipc_channel_posix.cc

...表示在创建会话时内容进程崩溃了,并且出现了内核恐慌.

...implies that a content process crashed while creating the session and there was a kernel panic.

有关您的代码试用和 Trace 级别日志的更多信息,将有助于我们以更好的方式分析问题.但是,以前使用 4.9.x内核可以观察到此问题.有时还会发现此问题,并损坏了 urandom/随机

A bit of more information with respect to your code trials and Trace level logs would have helped us to analyze the issue in a better way. However, this issue was earlier observed with 4.9.x kernels. At times this issue was also observed with corrupted urandom / random

但是,看来您的主要问题是所使用的二进制文件版本之间的不兼容性:

However, it seems your main issue is the incompatibility between the version of the binaries you are using as follows:

  • 您正在使用 GeckoDriver v0.24.0 2019年1月29日,比现在大一年了.
  • 您正在使用 Firefox v68.2.0esr .
  • 您不知道您的 JDK版本.
  • You are using GeckoDriver v0.24.0 of Jan 29, 2019, which is more then a year older.
  • You are using Firefox v68.2.0esr.
  • Your JDK version is unknown to us.

根据受支持的平台中的文档在二进制文件之间有些不匹配,例如 Firefoxen 部分提到:

As per the documentation in Supported platforms there seems to be some mismatch among the binaries as Firefoxen section mentions:

在Firefox 57及更高版本中,支持是最好的,尽管通常Firefox版本越新,它们的错误修复和功能越多,体验就越好.某些功能仅在最新的Firefox版本中可用,我们强烈建议将最新的 Firefox Nightly 与geckodriver一起使用.由于Firefox 53不再支持Firefox中的Windows XP,因此我们不支持该平台.

Support is best in Firefox 57 and greater, although generally the more recent the Firefox version, the better the experience as they have more bug fixes and features. Some features will only be available in the most recent Firefox versions, and we strongly advise using the latest Firefox Nightly with geckodriver. Since Windows XP support in Firefox was dropped with Firefox 53, we do not support this platform.

> 注意 :从0.26.0版本开始,geckodriver能够连接到Android设备,并控制基于GeckoView的软件包(例如Firefox Preview,又名Fenix或Firefox Reality).但它仍支持Fennec最高68 ESR的版本,这是Mozilla上次正式支持的版本.


解决方案

确保:

  • JDK 已升级到当前级别JDK 8u341 .
  • 已升级到当前级别版本3.141.59 .
  • GeckoDriver 已升级到 GeckoDriver v0.26.0级.
  • Firefox 已升级到当前的 Firefox v72.0 级别.
  • GeckoDriver存在于所需位置.
  • GeckoDriver对非root用户具有可执行权限.
  • 如果您的基本 Web客户端版本太旧,请通过来卸载. Revo Uninstaller 并安装最新版本的 Web客户端 GA和发行版.
  • 进行系统重启.
  • 以非root用户身份执行 Test .
  • 始终在 tearDown(){} 方法中调用 driver.quit()以关闭&优雅地销毁 WebDriver Web Client 实例.
  • JDK is upgraded to current levels JDK 8u341.
  • Selenium is upgraded to current levels Version 3.141.59.
  • GeckoDriver is upgraded to GeckoDriver v0.26.0 level.
  • Firefox is upgraded to current Firefox v72.0 levels.
  • GeckoDriver is present in the desired location.
  • GeckoDriver is having executable permission for non-root users.
  • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
  • Take a System Reboot.
  • Execute your Test as a non-root user.
  • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

根据与 GeckoDriver Firefox浏览器一起使用时的最佳做法,请遵循以下兼容性图表:

As per best practices while working with GeckoDriver, Selenium and Firefox Browser follow the below compatibility chart:

这篇关于Mozilla Firefox 68.2.0esr浏览器使用GeckoDriver和Selenium崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆