Closed maheshdaniin closed 1 year ago
The failure here is:
JavaScript error: chrome://remote/content/server/WebSocketHandshake.sys.mjs, line 168: Error: The handshake request has incorrect Origin header http://127.0.0.1:64282/
You will have to make sure that the client sets the correct value for the origin header or doesn't provide it at all.
1685720357260 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "--marionette" "-headless" "-allow-origins" "-no-sand ... s" "localhost" "-foreground" "-no-remote" "-profile" "/var/folders/8d/wg845lkj6q54nvg5hfglhbjh0000gq/T/rust_mozprofile4GVRD6"
I just noticed that --allow-origins
has been specified here which is not a supported argument at all for Firefox. Similar to other argument which might have been used but are cut-off. The options for our CDP / BiDi implementation in Firefox are --remote-allow-hosts
and --remote-allow-origins
.
I think that we can close this issue as invalid due to the configuration mistake. If that's not the case please let me know and we can reopen.
@whimboo is that not the latest document link? https://firefox-source-docs.mozilla.org/testing/geckodriver/Flags.html
Yes, but those are the flags for geckodriver and not for Firefox.
@whimboo so in our tests, we use geckodriver to interact with firefox.. and geco driver is passing those flag while starting up firefox
Not sure which geckodriver version you are using but it never forwarded those arguments directly but rewrites them to the ones I mentioned yesterday.
Please help us fixing following issue with firefox driver when working with AXE core
Caused by: org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://127.0.0.1:64282/devtools/browser/021787c4-2daa-47cc-987a-8901c8ac82dd Build info: version: '4.0.0', revision: '3a21814679' System info: host: 'MacBook-Pro.local', ip: 'xxx.xxx.xx.xx', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.3.1', java.version: '17.0.5' Driver info: driver.version: RemoteWebDriver at org.openqa.selenium.remote.http.netty.NettyWebSocket.(NettyWebSocket.java:104)
at org.openqa.selenium.remote.http.netty.NettyWebSocket.lambda$create$3(NettyWebSocket.java:137)
at org.openqa.selenium.remote.http.netty.NettyClient.openSocket(NettyClient.java:127)
at org.openqa.selenium.devtools.Connection.(Connection.java:77)
at org.openqa.selenium.firefox.FirefoxDriver.maybeGetDevTools(FirefoxDriver.java:359)
at org.openqa.selenium.remote.RemoteWebDriver.close(RemoteWebDriver.java:441)
at com.deque.html.axecore.extensions.WebDriverExtensions.closeAboutBlank(WebDriverExtensions.java:146)
at com.deque.html.axecore.selenium.AxeBuilder.analyzePost43x(AxeBuilder.java:782)
at com.deque.html.axecore.selenium.AxeBuilder.analyzeRawContext(AxeBuilder.java:652)
at com.deque.html.axecore.selenium.AxeBuilder.analyze(AxeBuilder.java:624)
at xx.xxx.xx.xxx.accessibility.AccessibilityWrapper.checkPageForAccessibility(AccessibilityWrapper.java:73)
at xx.xxx.xx.xxx.accessibility.BrowserListener.afterGet(BrowserListener.java:23)
... 68 more
complete log : -
5720356999 geckodriver INFO Listening on 127.0.0.1:57438 1685720357260 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "--marionette" "-headless" "-allow-origins" "-no-sand ... s" "localhost" "-foreground" "-no-remote" "-profile" "/var/folders/8d/wg845lkj6q54nvg5hfglhbjh0000gq/T/rust_mozprofile4GVRD6" *** You are running in headless mode. console.warn: services.settings: Ignoring preference override of remote settings server console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment 1685720358375 Marionette INFO Marionette enabled 1685720358517 Marionette INFO Listening on port 59507 console.error: "Warning: unrecognized command line flag -allow-origins\n" console.error: "Warning: unrecognized command line flag -disable-dev-shm-usage\n" console.error: "Warning: unrecognized command line flag -remote-allow-hosts\n" Read port: 59507 WebDriver BiDi listening on ws://127.0.0.1:64282 [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /var/folders/8d/wg845lkj6q54nvg5hfglhbjh0000gq/T/rust_mozprofile4GVRD6/search.json.mozlz4", (void 0))) DevTools listening on ws://127.0.0.1:64282/devtools/browser/021787c4-2daa-47cc-987a-8901c8ac82dd Jun 02, 2023 4:39:20 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: W3C 1685720362480 RemoteAgent INFO Perform WebSocket upgrade for incoming connection from 127.0.0.1:59534 JavaScript error: chrome://remote/content/server/WebSocketHandshake.sys.mjs, line 168: Error: The handshake request has incorrect Origin header http://127.0.0.1:64282 Jun 02, 2023 4:39:22 PM org.openqa.selenium.remote.http.WebSocket$Listener onError WARNING: Invalid Status code=400 text=Bad Request java.io.IOException: Invalid Status code=400 text=Bad Request at org.asynchttpclient.netty.handler.WebSocketHandler.abort(WebSocketHandler.java:92) at org.asynchttpclient.netty.handler.WebSocketHandler.handleRead(WebSocketHandler.java:118) at org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelRead(AsyncHttpClientHandler.java:78) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:311) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:432) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:833)
Jun 02, 2023 4:39:22 PM org.openqa.selenium.support.events.EventFiringDecorator callListenerMethod WARNING: null java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.openqa.selenium.support.events.EventFiringDecorator.callListenerMethod(EventFiringDecorator.java:311) at org.openqa.selenium.support.events.EventFiringDecorator.fireAfterEvents(EventFiringDecorator.java:252) at org.openqa.selenium.support.events.EventFiringDecorator.lambda$afterCall$1(EventFiringDecorator.java:177) at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4204) at org.openqa.selenium.support.events.EventFiringDecorator.afterCall(EventFiringDecorator.java:177) at org.openqa.selenium.support.decorators.DefaultDecorated.afterCall(DefaultDecorated.java:53) at org.openqa.selenium.support.decorators.WebDriverDecorator.lambda$createProxy$0(WebDriverDecorator.java:295) at jdk.proxy2/jdk.proxy2.$Proxy43.get(Unknown Source) at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:172) at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:981) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:879) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:867) at xx.xxx.xx.domain.component.ui.stepLib.UiStepLib.navigateToxxxxPage(UiStepLib.java:40) at xx.xx.xx.domain.component.ui.stepLib.UiStepLib$ByteBuddy$fuDTSiIN.navigateToxxxxPage$accessor$1Lht6Qop(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:504) at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:484) at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:458) at net.thucydides.core.steps.StepInterceptor.runOrSkipMethod(StepInterceptor.java:210) at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:197) at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:85) at net.thucydides.core.steps.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:51) at xx.xxx.xx.domain.component.ui.stepLib.UiStepLib$ByteBuddy$fuDTSiIN.navigateToxxxxPage(Unknown Source) at xx.xxx.xx.domain.component.ui.steps.StepDefinitions.iOpenGoogle(StepDefinitions.java:29) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at io.cucumber.java.Invoker.doInvoke(Invoker.java:66) at io.cucumber.java.Invoker.invoke(Invoker.java:24) at io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47) at io.cucumber.java.JavaStepDefinition.execute(JavaStepDefinition.java:29) at io.cucumber.core.runner.CoreStepDefinition.execute(CoreStepDefinition.java:66) at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:63) at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10) at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:92) at io.cucumber.core.runner.TestStep.run(TestStep.java:64) at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:51) at io.cucumber.core.runner.TestCase.run(TestCase.java:104) at io.cucumber.core.runner.Runner.runPickle(Runner.java:73) at io.cucumber.core.runtime.Runtime.lambda$execute$5(Runtime.java:110) at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:117) at io.cucumber.core.runtime.Runtime.lambda$execute$6(Runtime.java:110) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at io.cucumber.core.runtime.Runtime$SameThreadExecutorService.execute(Runtime.java:233) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123) at io.cucumber.core.runtime.Runtime.lambda$run$2(Runtime.java:86) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.stream.SliceOps$1$1.accept(SliceOps.java:200) at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602) at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at io.cucumber.core.runtime.Runtime.run(Runtime.java:87) at net.serenitybdd.cucumber.cli.Main.run(Main.java:27) at net.serenitybdd.cucumber.cli.Main.main(Main.java:18) Caused by: org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://127.0.0.1:64282/devtools/browser/021787c4-2daa-47cc-987a-8901c8ac82dd Build info: version: '4.0.0', revision: '3a21814679' System info: host: 'MacBook-Pro.local', ip: 'xxx.xxxx.xx.xx', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.3.1', java.version: '17.0.5' Driver info: driver.version: RemoteWebDriver at org.openqa.selenium.remote.http.netty.NettyWebSocket.(NettyWebSocket.java:104)
at org.openqa.selenium.remote.http.netty.NettyWebSocket.lambda$create$3(NettyWebSocket.java:137)
at org.openqa.selenium.remote.http.netty.NettyClient.openSocket(NettyClient.java:127)
at org.openqa.selenium.devtools.Connection.(Connection.java:77)
at org.openqa.selenium.firefox.FirefoxDriver.maybeGetDevTools(FirefoxDriver.java:359)
at org.openqa.selenium.remote.RemoteWebDriver.close(RemoteWebDriver.java:441)
at com.deque.html.axecore.extensions.WebDriverExtensions.closeAboutBlank(WebDriverExtensions.java:146)
at com.deque.html.axecore.selenium.AxeBuilder.analyzePost43x(AxeBuilder.java:782)
at com.deque.html.axecore.selenium.AxeBuilder.analyzeRawContext(AxeBuilder.java:652)
at com.deque.html.axecore.selenium.AxeBuilder.analyze(AxeBuilder.java:624)
at xx.xxx.xx.xxx.accessibility.AccessibilityWrapper.checkPageForAccessibility(AccessibilityWrapper.java:73)
at xx.xxx.xx.xxx.accessibility.BrowserListener.afterGet(BrowserListener.java:23)
... 68 more