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

Not working with the docker image selenium/standalone-chrome:3.9 or newer #44

Open
michaelzangl opened this issue Sep 9, 2020 · 3 comments

Comments

@michaelzangl
Copy link

When using this driver to connect to selenium/standalone-chrome:3.9 or newer, one gets a confusing error message:

09 09 2020 13:25:20.208:DEBUG [WebDriver]: WebDriver config: {"remoteHost":true,"hostname":"localhost","port":4444}
09 09 2020 13:25:20.209:DEBUG [WebDriver]: Browser capabilities: {"platform":"ANY","testName":"Karma test","tags":[],"version":"","base":"WebDriver","browserName":"chrome"}
09 09 2020 13:25:21.558:DEBUG [WebDriver]: Session ID: undefined
09 09 2020 13:25:21.588:ERROR [WebDriver]: WebDriver command failed { spec:
   { platform: 'ANY',
     testName: 'Karma test',
     tags: [],
     version: '',
     base: 'WebDriver',
     browserName: 'chrome' },
  error:
   {"message":"[get(\"http://ip-of-host-running-karma-tests:9876/?id=99564073\")] Error response status: 6 Selenium error: No active session with ID url","status":6,"cause":{"sessionId":"url","value":{"error":"invalid session id","message":"No active session with ID url","stacktrace":""},"status":6}} }

Tried to use several configs, the session id is always undefined. Might be a bug somewhere in the wd dependency.

Workaround: Use the selenium/standalone-chrome:3.8 docker image.

@joeyparrish
Copy link
Collaborator

Could this be an issue with the docker image instead? Have you tried the debugging instructions at https://github.com/SeleniumHQ/docker-selenium#troubleshooting ?

@michaelzangl
Copy link
Author

michaelzangl commented Sep 10, 2020

Hi. I suspect this is a problem with the JS library wd and how wd attempts to access the selenium hub instance. We have no problems accessing that container the normal selenium Java library. The first issue is that sessionId is null =>

I currently found no way to inspect the HTTP traffic wd sends to the selenium endpoint.

If I interpret it correclty, the issue might be around that line in wd:
jsonData.value ? jsonData.value.sessionId : false;
According to the specs, there should be no .value and no .status, so it falls back to the old method.

The error message is confusing, the error handling in karma-webdriver-launcher is just missing.

@kisdaniel
Copy link

I get this error in selenoid when the appropriate selenoid image (selenoid/vnc_chrome:xxx) is not pulled manually in docker.

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

No branches or pull requests

3 participants