Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vmassol opened this issue Jun 16, 2023 · 2 comments
Closed

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

vmassol opened this issue Jun 16, 2023 · 2 comments
Labels
resolution/waiting-for-info Waiting for more information of the issue author or another 3rd party. type/bug

Comments

@vmassol
Copy link
Contributor

vmassol commented Jun 16, 2023

Module

Selenium

Testcontainers version

1.18.3

Using the latest Testcontainers version?

Yes

Host OS

Mac M1

Host Arch

ARM

Docker version

Client:
 Cloud integration: v1.0.33
 Version:           24.0.2
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        cb74dfc
 Built:             Thu May 25 21:51:16 2023
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.20.1 (110738)
 Engine:
  Version:          24.0.2
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.4
  Git commit:       659604f
  Built:            Thu May 25 21:50:59 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

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)

Relevant log output

The testcontainers 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.
...


### Additional Information

I've tried various combinations of different versions of TC/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?

Thanks you!
@eddumelendez
Copy link
Member

@vmassol Did you raise an issue in selenium? I don't see it related to Testcontainers itself.

@eddumelendez eddumelendez added the resolution/waiting-for-info Waiting for more information of the issue author or another 3rd party. label Jun 16, 2023
@vmassol
Copy link
Contributor Author

vmassol commented Jun 16, 2023

@eddumelendez you're right, it's only slightly related. I was asking here for several reasons: 1) making the issue known to other TC users, 2) hoping to find someone with the knowledge to help debug this further or find a workaround.

I've just reported it at seleniumhq-community/docker-seleniarm#40

@vmassol vmassol closed this as completed Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution/waiting-for-info Waiting for more information of the issue author or another 3rd party. type/bug
Projects
None yet
Development

No branches or pull requests

2 participants