[英]Geckodriver has suddenly started to fail
Driver: geckodriver 0.19.1.驱动程序:geckodriver 0.19.1。
OS Name: Microsoft Windows 10 Pro for Workstations Version: 10.0.17134 Build 17134.操作系统名称:Microsoft Windows 10 Pro for Workstations 版本:10.0.17134 Build 17134。
Firefox: 63.0 (64-bit).火狐:63.0(64 位)。
Running tests using TestNG version 6.14.0.使用 TestNG 6.14.0 版运行测试。
This was working fine until this morning.这一直工作到今天早上。 There are no perceivable Windows updates.
没有可察觉的 Windows 更新。
Today, the browser flashes open & disappears again.今天,浏览器闪烁打开并再次消失。 The following output is displayed:
显示以下输出:
1540896320791 geckodriver INFO geckodriver 0.19.1
1540896320798 geckodriver INFO Listening on 127.0.0.1:21199
1540896321526 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\SStaple\\AppData\\Local\\Temp\\rust_mozprofile.3QimwYbs08Pl"
1540896322004 Marionette DEBUG Received observer notification profile-after-change
1540896322106 Marionette DEBUG Received observer notification toplevel-window-ready
1540896322129 Marionette DEBUG Received observer notification command-line-startup
1540896322130 Marionette DEBUG Received observer notification nsPref:changed
1540896322130 Marionette DEBUG Init aborted (running=false, enabled=true, finalUIStartup=false)
1540896322284 Marionette DEBUG Received observer notification toplevel-window-ready
1540896323003 Marionette DEBUG Received observer notification sessionstore-windows-restored
1540896323003 Marionette DEBUG Waiting for delayed startup...
1540896323080 Marionette DEBUG Setting recommended pref app.update.disabledForTesting to true
1540896323081 Marionette DEBUG Setting recommended pref security.turn_off_all_security_so_that_viruses_can_take_over_this_computer to true
1540896323082 Marionette DEBUG Setting recommended pref toolkit.cosmeticAnimations.enabled to false
1540896323083 Marionette DEBUG Setting recommended pref datareporting.policy.dataSubmissionPolicyAccepted to false
1540896323083 Marionette DEBUG Setting recommended pref dom.disable_beforeunload to true
1540896323117 Marionette INFO Listening on port 51662
1540896323117 Marionette DEBUG Remote service is active
1540896323562 Marionette DEBUG Accepted connection 0 from 127.0.0.1:51667
1540896323566 Marionette TRACE 0 -> [0,1,"newSession",{"acceptInsecureCerts":true,"browserName":"firefox","capabilities":{"desiredCapabilities":{"acceptInsecureCerts":true,"browserName":"firefox"}}}]
1540896323566 Marionette TRACE 0 <- [1,1,{"error":"unknown command","message":"newSession","stacktrace":"WebDriverError@chrome://marionette/content/error.js:178: ... et@chrome://marionette/content/server.js:245:8\n_onJSONObjectReady/<@chrome://marionette/content/transport.js:490:9\n"},null]
Oct 30, 2018 10:45:23 AM org.openqa.selenium.remote.ErrorCodes toStatus
INFO: HTTP Status: '404' -> incorrect JSON status mapping for 'unknown error' (500 expected)
crossBrowserFramework.Driver error code: 1540893399 Error getting firefox driver. C:\Development\Alloy-Test\web-client\src\drivers\geckodriver.exe could not be found.
org.openqa.selenium.WebDriverException: newSession
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'SSTAPLE', ip: '172.16.190.147', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_151'
Driver info: driver.version: Driver
remote stacktrace: WebDriverError@chrome://marionette/content/error.js:178:5
UnknownCommandError@chrome://marionette/content/error.js:472:5
despatch@chrome://marionette/content/server.js:290:13
execute@chrome://marionette/content/server.js:271:11
onPacket/<@chrome://marionette/content/server.js:246:15
onPacket@chrome://marionette/content/server.js:245:8
_onJSONObjectReady/<@chrome://marionette/content/transport.js:490:9
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
at crossBrowserFramework.Driver.getFirefoxDriver(Driver.java:114)
at crossBrowserFramework.Driver.initialise(Driver.java:61)
at crossBrowserFramework.CrossBrowserTest.initialiseDriver(CrossBrowserTest.java:598)
at crossBrowserFramework.CrossBrowserTest.beforeSuite(CrossBrowserTest.java:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:451)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:401)
at org.testng.SuiteRunner.run(SuiteRunner.java:364)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1127)
at org.testng.TestNG.runSuites(TestNG.java:1039)
at org.testng.TestNG.run(TestNG.java:1007)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
I can't tell when Firefox last updated itself, but it may be the culprit.我不知道 Firefox 上次更新是什么时候,但它可能是罪魁祸首。 Any ideas?
有任何想法吗?
latest gecko driver is v0.23.0, try to update it.最新的 gecko 驱动程序是 v0.23.0,尝试更新它。
List of versions can be found: https://github.com/mozilla/geckodriver/releases可以找到版本列表: https : //github.com/mozilla/geckodriver/releases
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.