Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

[🐛 Bug]: Error while creating session with the driver service #40

Open
@vmassol

Description

@vmassol

What happened?

The XWiki build broke recently on Mac M1 only, due to our TestContainer-based tests all failing. We're using:

  • Latest testcontainers version: 1.18.3
  • Latest Selenium java: 4.10.0
  • Latest seleniarm image: seleniarm/standalone-firefox:latest (currently pointing to 114.0-geckodriver-0.33-20230615)

I've tried various combinations of different versions of TestContainers/Selenium/seleniarm image to no avail.

Not that it works fine on other oses (other than Mac M1) so the issue is mostly likely an incompatibility between the geckdriver version used with seleniarm latest (114.0).

Any idea of what I could do?

Command used to start Selenium Grid with Docker

Done by TestContainers.

Relevant log output

The logs show:


...
14:40:39.990 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 14:40:39.988 INFO [LocalDistributor.newSession] - Session request received by the Distributor: 
14:40:39.990 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT:  [Capabilities {acceptInsecureCerts: true, browserName: firefox, moz:debuggerAddress: true, moz:firefoxOptions: {prefs: {dom.disable_beforeunload: false}}, unhandledPromptBehavior: ignore}]
14:40:40.001 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 14:40:40.000 INFO [DriverService$Builder.getLogOutput] - Driver logs no longer sent to console by default; https://www.selenium.dev/documentation/webdriver/drivers/service/#setting-log-output
14:40:40.061 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 14:40:40.059 WARN [DriverServiceSessionFactory.apply] - Error while creating session with the driver service. Stopping driver service: Driver server process died prematurely.
14:40:40.061 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: Build info: version: '4.10.0', revision: 'c14d967899'
14:40:40.061 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: System info: os.name: 'Linux', os.arch: 'aarch64', os.version: '5.15.49-linuxkit-pr', java.version: '11.0.18'
14:40:40.061 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: Driver info: driver.version: unknown
14:40:45.065 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 14:40:45.064 WARN [ExecutorServices.shutdownGracefully] - Failed to shutdown Driver Service Executor
14:40:45.067 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 14:40:45.067 WARN [SeleniumSpanExporter$1.lambda$export$1] - Error while creating session with the driver service. Stopping driver service: Driver server process died prematurely.
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: Build info: version: '4.10.0', revision: 'c14d967899'
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: System info: os.name: 'Linux', os.arch: 'aarch64', os.version: '5.15.49-linuxkit-pr', java.version: '11.0.18'
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: Driver info: driver.version: unknown
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 14:40:45.067 WARN [SeleniumSpanExporter$1.lambda$export$1] - org.openqa.selenium.WebDriverException: Driver server process died prematurely.
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: Build info: version: '4.10.0', revision: 'c14d967899'
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: System info: os.name: 'Linux', os.arch: 'aarch64', os.version: '5.15.49-linuxkit-pr', java.version: '11.0.18'
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: Driver info: driver.version: unknown
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 	at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:249)
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 	at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:138)
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 	at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:69)
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 	at org.openqa.selenium.grid.node.local.SessionSlot.apply(SessionSlot.java:147)
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 	at org.openqa.selenium.grid.node.local.LocalNode.newSession(LocalNode.java:467)
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 	at org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession(LocalDistributor.java:643)
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 	at org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession(LocalDistributor.java:560)
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 	at org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.handleNewSessionRequest(LocalDistributor.java:814)
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 	at org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.lambda$run$1(LocalDistributor.java:773)
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 	at java.base/java.lang.Thread.run(Thread.java:829)
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 14:40:45.068 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "e6eae8750348513a7b833e65c83b2fbb","eventTime": 1686919240059817666,"eventName": "exception","attributes": {"exception.message": "Error while creating session with the driver service. Stopping driver service: Driver server process died prematurely.\nBuild info: version: '4.10.0', revision: 'c14d967899'\nSystem info: os.name: 'Linux', os.arch: 'aarch64', os.version: '5.15.49-linuxkit-pr', java.version: '11.0.18'\nDriver info: driver.version: unknown","exception.stacktrace": "org.openqa.selenium.WebDriverException: Driver server process died prematurely.\nBuild info: version: '4.10.0', revision: 'c14d967899'\nSystem info: os.name: 'Linux', os.arch: 'aarch64', os.version: '5.15.49-linuxkit-pr', java.version: '11.0.18'\nDriver info: driver.version: unknown\n\tat org.openqa.selenium.remote.service.DriverService.start(DriverService.java:249)\n\tat org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:138)\n\tat org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:69)\n\tat org.openqa.selenium.grid.node.local.SessionSlot.apply(SessionSlot.java:147)\n\tat org.openqa.selenium.grid.node.local.LocalNode.newSession(LocalNode.java:467)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession(LocalDistributor.java:643)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession(LocalDistributor.java:560)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.handleNewSessionRequest(LocalDistributor.java:814)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.lambda$run$1(LocalDistributor.java:773)\n\tat java.base\u002fjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base\u002fjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base\u002fjava.lang.Thread.run(Thread.java:829)\n","exception.type": "org.openqa.selenium.WebDriverException","logger": "org.openqa.selenium.grid.node.config.DriverServiceSessionFactory","session.capabilities": "{\"moz:debuggerAddress\": true,\"acceptInsecureCerts\": true,\"browserVersion\": \"114.0\",\"se:noVncPort\": 7900,\"browserName\": \"firefox\",\"unhandledPromptBehavior\": \"ignore\",\"moz:firefoxOptions\": {\"prefs\": {\"dom.disable_beforeunload\": false}},\"se:vncEnabled\": true}\n"}}
14:40:45.068 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 
14:40:45.070 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 14:40:45.069 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "e6eae8750348513a7b833e65c83b2fbb","eventTime": 1686919245068368044,"eventName": "Unable to create session with the driver","attributes": {"current.session.count": 0,"logger": "org.openqa.selenium.grid.node.local.LocalNode","session.request.capabilities": "Capabilities {acceptInsecureCerts: true, browserName: firefox, moz:debuggerAddress: true, moz:firefoxOptions: {prefs: {dom.disable_beforeunload: false}}, unhandledPromptBehavior: ignore}","session.request.downstreamdialect": "[W3C]"}}
14:40:45.070 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 
14:40:45.071 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 14:40:45.070 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "e6eae8750348513a7b833e65c83b2fbb","eventTime": 1686919239987627416,"eventName": "Session request received by the Distributor","attributes": {"logger": "org.openqa.selenium.grid.distributor.local.LocalDistributor","request.payload": "[Capabilities {acceptInsecureCerts: true, browserName: firefox, moz:debuggerAddress: true, moz:firefoxOptions: {prefs: {dom.disable_beforeunload: false}}, unhandledPromptBehavior: ignore}]"}}
14:40:45.071 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 
14:40:45.071 [docker-java-stream-1970431651] INFO  o.x.t.d.i.j.b.BrowserContainerExecutor - STDOUT: 14:40:45.070 WARN [SeleniumSpanExporter$1.lambda$export$1] - Unable to create session: Could not start a new session. Error while creating session with the driver service. Stopping driver service: Driver server process died prematurely.
...


### Operating System

MacOS M1

### Docker Selenium version (tag)

4.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions