testcontainers / testcontainers/testcontainers-java

[Bug]: Unexpected exit of vnc-recorder when closing pop-ups on MacOS

Open
#8,452 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/bug
Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

Module

Selenium

Testcontainers version

1.19.7

Using the latest Testcontainers version?

Yes

Host OS

MacOS on m2

Host Arch

ARM

Docker version
Docker: 24.0.7
Docker Desktop: 4.26.1
What happened?

vnc-recorder unexpectedly excites when closing pop-ups using testcontainers-selenium

Here is reproducer: https://github.com/RuslanHryn/testcontainers-reproducer.git
Just run org.example.testcontainersreproducer.TestcontainersReproducerTests#testVnc

Steps to reproduce:

  1. run BrowserWebDriverContainer with vnc recording
  2. Open pop-up on the page
  3. Close pop-up
  4. vnc-recorder unexpectedly excited

The issue can be reproduced only in MacOS with ARM.
The issue is not reproducible on Linux

Relevant log output
The error in `vnc-recorder`:

`write_video_frame: timestamp=174466, data=2757
2024-03-14T14:32:49.169503055Z close
2024-03-14T14:32:49.169569888Z RFB error: unexpected EOF
2024-03-14T14:32:49.169579263Z stop recording
2024-03-14T14:32:49.169581971Z flush
2024-03-14T14:32:49.169687013Z write_metadata: {'duration': 174.466, 'width': 1360, 'framerate': 30, 'videocodecid': 3, 'height': 1020}`

Error from the test:

org.openqa.selenium.WebDriverException: disconnected: not connected to DevTools
  (failed to check if window was closed: disconnected: not connected to DevTools)
  (Session info: chrome=118.0.5993.117)
Build info: version: '4.14.1', revision: '03f8ede370'
System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '14.3.1', java.version: '17.0.9'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [15e7e97ac182b2da37b99c644c1bb6cf, close {}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 118.0.5993.117, chrome: {chromedriverVersion: 118.0.5993.70 (e52f33f30b91..., userDataDir: /tmp/.org.chromium.Chromium...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:44355}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), se:bidiEnabled: false, se:cdp: ws://172.17.0.4:4444/sessio..., se:cdpVersion: 118.0.5993.117, se:vnc: ws://172.17.0.4:4444/sessio..., se:vncEnabled: true, se:vncLocalAddress: ws://172.17.0.4:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Session ID: 15e7e97ac182b2da37b99c644c1bb6cf

	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:200)
	at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:133)
	at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:52)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:191)
	at org.openqa.selenium.remote.TracedCommandExecutor.execute(TracedCommandExecutor.java:51)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:602)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:675)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:679)
	at org.openqa.selenium.remote.RemoteWebDriver.close(RemoteWebDriver.java:409)
	at org.example.testcontainersreproducer.TestcontainersReproducerTests.testVnc(TestcontainersReproducerTests.java:44)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running org.example.testcontainersreproducer.TestcontainersReproducerTests#testVnc from the linked reproducer on MacOS ARM and compare it with Linux. Trace the testcontainers-selenium VNC recording path around popup closure and the reported vnc-recorder EOF; done means the recorder and WebDriver remain usable and the test completes without the reported errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.