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

stopDockerRecording doesn't work when using dockerPrivateEndpoint #968

Closed
TeJonsch opened this issue Jan 4, 2023 · 1 comment
Closed

Comments

@TeJonsch
Copy link

TeJonsch commented Jan 4, 2023

Description of the problem:
When I configure an image prefix with dockerPrivateEndpoint("docker-proxy.mydomain.de"), then a call to webDriverManager.stopDockerRecording() is not stopping the recording / the video-recorder docker container.

Browser and version:
Firefox 108.0 in docker

Operating system:
Windows 10 64 bit with Docker Desktop for Windows

WebDriverManager version:
maven 5.3.1

WebDriverManager call:

    WebDriverManager.firefoxdriver()
        .capabilities(createFirefoxOptions())
        .browserInDocker()
        .dockerPrivateEndpoint("docker-proxy.mydomain.de")
        .enableVnc()
        .enableRecording()
        .dockerRecordingOutput(getScreenRecordingPath())
        .dockerNetwork(getDockerNetwork())
        .dockerScreenResolution(getDockerScreenResolution())
        .create();

WebDriverManager traces:
I skipped the debug log, as I find the corresponding code snipped and debugger output more helpful. Please let me know if you still need the debug logs or other information.

In the class io.github.bonigarcia.wdm.WebDriverManager there is the stopDockerRecording method:

    protected synchronized void stopDockerRecording(
            WebDriverBrowser driverBrowser) {
        List<DockerContainer> dockerContainerList = driverBrowser
                .getDockerContainerList();
        if (dockerContainerList != null && !dockerContainerList.isEmpty()) {
            DockerContainer recorderContainer = dockerContainerList.get(0);
            if (recorderContainer.getImageId()
                    .equals(config().getDockerRecordingImage())) {
                getDockerService().stopAndRemoveContainer(recorderContainer);
                dockerContainerList.remove(0);
            }
        }
    }

And it fails when comparing recorderContainer.getImageId().equals(config().getDockerRecordingImage()).
dockerContainerList.get(0).getImageId() returns "docker-proxy.mydomain.de/selenoid/video-recorder:7.1", but config().getDockerRecordingImage() only returns "selenoid/video-recorder:7.1".

Error log:
There was no error logged.

@bonigarcia
Copy link
Owner

No clue, sorry. Consider to send a PR to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants