当我启动我的java程序时,我收到此错误消息:
1494797744010 geckodriver INFO Listening on 127.0.0.1:5968
1494797744672 geckodriver::marionette INFO Starting browser \\?\C:\Program Files\Mozilla Firefox\firefox.exe with args ["-marionette"]
1494797744951 addons.manager ERROR startup failed: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIFile.create]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: resource://gre/modules/FileUtils.jsm J::a FvialSecUrtiiplts _egrertoDri:r r:e:s oluirncee 70://gre/modul"e s /dAadtdao:n Mnaon]a gSetra.cjks mt,r alcien:e F165i7l:e UNtSi_lEsR_RgOeRt_DNiOrT(_)I@NrIeTsIoAuLrIcZeE:D/:/ gAre/moddduolneMsa/nFaigleerU tiisl sn.ojts mi:n7i0t i<a lFiizleedU
tils_getFile()@resource://gre/modules/FileUtils.jsm:42 < validateBlocklist()@resource://gre/modules/AddonManager.jsm:671 < startup()@resource://gre/modules/AddonManager.jsm:834 < startup()@resource://gre/modules/AddonManager.jsm:3129 < observe()@resource://gre/components/addonManager.js:65
1494797746182 Marionette INFO Listening on port 50911
JavaScript error: resource://gre/modules/AddonManager.jsm, line 2570: NS_ERROR_NOT_INITIALIZED: AddonManager is not initialized
maj 14, 2017 11:35:46 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
程序运行时会出现一些新错误:
JavaScript error: resource://gre/modules/FileUtils.jsm, line 70: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIFile.create]
JavaScript error: resource://app/modules/WindowsJumpLists.jsm, line 403: NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIJumpListShortcut.app]
JavaScript error: resource://app/modules/WindowsJumpLists.jsm, line 403: NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIJumpListShortcut.app]
JavaScript error: https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.pl.LabDolPUOAM.O/m=gapi_iframes,gapi_iframes_style_common/rt=j/sv=1/d=1/ed=1/am=AQ/rs=AGLTcCNgJpGnsPOpCNGmcIvZ9rnqApDcrQ/cb=gapi.loaded_0, line 52: TypeError: a is null
JavaScript error: https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.pl.LabDolPUOAM.O/m=gapi_iframes,gapi_iframes_style_common/rt=j/sv=1/d=1/ed=1/am=AQ/rs=AGLTcCNgJpGnsPOpCNGmcIvZ9rnqApDcrQ/cb=gapi.loaded_0, line 52: TypeError: a is null
最后我获取此信息并且程序停止工作:
1494798016809 Marionette INFO New connections will no longer be accepted
该错误可能是什么原因以及如何解决? 我使用的是Firefox 53.0.2和geckodriver 0.16.1
答案 0 :(得分:1)
以下是您的问题的答案:
1494797744951 addons.manager ERROR startup failed: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE)
的第一组错误是因为您没有配置geckodriver来抑制/忽略控制台上的错误。但它们是无害的,如果不被忽视/压制,你应该和他们一起生活。您看到的第二组错误JavaScript error: resource://gre/modules/FileUtils.jsm
是JavaScript错误,这再次反映您未正确配置geckodriver以忽略或禁止出现在控制台上的JavaScript错误。再一次,它们是无害的,如果不被忽视/压制,你应该和他们一起生活。
您看到New connections will no longer be accepted
的最后一组错误是严重的Marionette
抱怨,这实际上意味着您正在尝试一个geckodriver无法实现的测试步骤。因此,您可能需要更改geckodriver的代码以使用该任务进行处理。
如果这回答你的问题,请告诉我。