-
Notifications
You must be signed in to change notification settings - Fork 438
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
Fix no node with give id found selenium error #16860
base: master
Are you sure you want to change the base?
Fix no node with give id found selenium error #16860
Conversation
8ed6244
to
96b83be
Compare
@@ -22,6 +22,9 @@ ADD Gemfile /obs/src/api/Gemfile | |||
ADD Gemfile.lock /obs/src/api/Gemfile.lock | |||
RUN chown -R frontend /obs/src/api | |||
|
|||
# Remove chromedriver binary to allow selenium-manager manage versions | |||
RUN rm -rf /usr/bin/chromedriver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a temporary hack. The proper way to do it is to remove chromedriver from the docker image we use in the CI pipeline, or just use frontend-base (that does not have chromedriver installed) instead of frontend-features as docker image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please just make sure that this temporary hack is recorded in a card, so we can follow up and do it properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please just make sure that this temporary hack is recorded in a card, so we can follow up and do it properly.
https://trello.com/c/IYwr5IsM/194-remove-frontend-features-container
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said before elsewhere, this does not change anything in CI...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not?
a13ae00
to
96b83be
Compare
When running feature specs some errors pop up: 1.3) Failure/Error: Unable to infer file and line number from backtrace Selenium::WebDriver::Error::InvalidSessionIdError: invalid session id Disabling the use of shared memory seems to fix those errors.
selenium-webdriver brings support to use Chrome for testing (CfT) via selenium-manager. CfT does not auto-updates itself and allows us to set a specific chrome (&chromedriver) version. See https://www.selenium.dev/blog/2023/selenium-4-11-0-released/
selenium-manager is a tool introduced by selenium-webdriver to use specific browser versions. Chromedriver version 119 seems to not be affected by the error regarding 'No node with given id found'. See https://issues.chromium.org/issues/42323468#comment95
This way selenium-manager kicks in and selects the specified browser version See https://www.selenium.dev/blog/2023/whats-new-in-selenium-manager-with-selenium-4.11.0/#drivers-on-the-path
selenium-manager is used to allow the use of specific chrome browser and chromedriver versions. Unfortunately, if the chromedriver binary is present, selenium-manager detects that and then uses that chromedriver version (128) with the downloaded browser version (119), and the spec suite fails with the following error: Selenium::WebDriver::Error::SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 128 Current browser version is 114.0.5735.133 with binary path /home/frontend/.cache/selenium/chrome/linux64/114.0.5735.133/chrome See https://www.selenium.dev/blog/2023/whats-new-in-selenium-manager-with-selenium-4.11.0/#drivers-on-the-path
a0284f2
to
8d2ca80
Compare
We cannot use anything that uses base64 > 0.1.1 as it is provided by the system ruby 3.1. This limits the version of selenium-webdriver that we can use (currently 4.16.0).
selenium-manager lives inside bin/linux, not bin, so the build script crashed in the final steps. This fix skips subdirectories.
8d2ca80
to
182f308
Compare
I doubt you are fixing anything with this. In this PR you just run chromium on circle-ci on a different host, with different resources available. Just as you do if you trigger a new run of the test suite in other PRs. I mean look at the history of CI builds for this PR... https://app.circleci.com/pipelines/github/openSUSE/open-build-service?branch=pull%2F16860 |
We've been hit by the following error in our CI pipeline
(See an example here)
This PR upgrades selenium-webdriver and tweaks it's configuration to be able to use a specific Chromedriver version (one that is known to not be affected by that error).
This depends on #16906