-
Notifications
You must be signed in to change notification settings - Fork 73
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
Selenium Alpha 4 returns 401 with GGR #301
Comments
@jsa34 401 could be returned only when incorrect username \ password is specified. This could be caused by incorrect processing of URLs with usernames \ passwords. |
This is what I assumed, but the only difference I made was updating the selenium libraries to alpha-4 and the requests are unsuccessful... The username and password in the URL request sent to GGR are identical and the only change was to update selenium version from alpha-3 to alpha-4, so I guess it's selenium's processing of the URL that has changed behaviour? |
@jsa34 yes, could you check whether |
Aha - getting a bit further... They have changed their default HTTP client factory implementation to netty instead of okhttp. If I override the prop webdriver.http.factory=okhttp, all is fine. If I let fall back to default or specify netty, it fails... Something about netty! |
Unless I am missing it somewhere, the netty implementation doesn't appear to send the authorization header... Okhttp sets it here: https://github.com/SeleniumHQ/selenium/blob/master/java/client/src/org/openqa/selenium/remote/http/okhttp/CreateOkClient.java (line 58) But I can't see it set anywhere in netty: |
@jsa34 just tested with Selenium Java 4.0.0-alpha-4 and it works. |
That's interesting - I can't see how with netty as I can't see the Authorization header set, and unless I explicitly set the prop webdriver.http.factory=okhttp it fails to authenticate... 🤔 |
This was fixed on Selenium side. |
When updating selenium version in project to selenium v.4.0.0-alpha-4, all tests return back a 401 from GGR:
org.openqa.selenium.WebDriverException:
Unable to parse remote response: 401 Unauthorized
Caused by: org.openqa.selenium.json.JsonException:
Expected to read a START_MAP but instead have: NUMBER. Last 0 characters read:
Upon changing selenium version to 4.0.0-alpha-3, the 401 disappears and tests run successfully. I'm guessing its some change in the test ids/requests that are being sent with the latest alpha release?
The text was updated successfully, but these errors were encountered: