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

Fix error with axios and proxies #897

Merged
merged 4 commits into from
Apr 2, 2024

Conversation

juancsch
Copy link
Contributor

Remove axios dependecy due to this module has an error when the request is made via proxy (axios/axios#4531 (comment)).

Selenium-standalone has got http client that is better for this job.

2024-02-29T22:19:28.010Z - [selenium-standalone] [start] error installing version 4.17.0 selenium STACK: AxiosError: Request failed with status code 501 at settle (/home/testrunner/run_test_env/TG-CHROM0-CCHD/sources/itests-orchard/node_modules/selenium-standalone/node_modules/axios/dist/node/axios.cjs:1967:12) at IncomingMessage.handleStreamEnd (/home/testrunner/run_test_env/TG-CHROM0-CCHD/sources/itests-orchard/node_modules/selenium-standalone/node_modules/axios/dist/node/axios.cjs:3066:11) at IncomingMessage.emit (node:events:526:35) at endReadableNT (node:internal/streams/readable:1359:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) at Axios.request (/home/testrunner/run_test_env/TG-CHROM0-CCHD/sources/itests-orchard/node_modules/selenium-standalone/node_modules/axios/dist/node/axios.cjs:3877:41) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async getLastChromedriverVersionFromMajor (/home/testrunner/run_test_env/TG-CHROM0-CCHD/sources/itests-orchard/node_modules/selenium-standalone/lib/compute-download-urls.js:284:20) at async computeFsPaths (/home/testrunner/run_test_env/TG-CHROM0-CCHD/sources/itests-orchard/node_modules/selenium-standalone/lib/compute-fs-paths.js:17:23) at async Object.install (/home/testrunner/run_test_env/TG-CHROM0-CCHD/sources/itests-orchard/node_modules/selenium-standalone/lib/install.js:84:19) at async SeleniumStandalonePlugin.start (/home/testrunner/run_test_env/TG-CHROM0-CCHD/sources/itests-orchard/node_modules/@bbva-qe/orchard-selenium-standalone-plugin/lib/index.cjs:124:7) at async Promise.all (index 3)

Copy link

linux-foundation-easycla bot commented Mar 28, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@christian-bromann
Copy link
Member

@seanpoulter mind taking a look?

Copy link
Contributor

@seanpoulter seanpoulter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Could you please remove the other reference to axios in dependabot.yml and have a quick look at the failing test?

@juancsch
Copy link
Contributor Author

juancsch commented Apr 1, 2024

The errors in CI are strange, i run the tests in my machine (latest ubuntu version) for all node versions, from 12 to 20, and all passed. I put some console in test for debugging this issue in CI, when tests pass i remove it.

@seanpoulter
Copy link
Contributor

Thanks for having a look @juancsch. If this fixes your proxy issue let's remove that logging, merge the PR, and cut a release.

I had a look at the failing test. It isn't great. We're trying to check that the files haven't changed in the .selenium/ directory but it doesn't report what changed if the tests fail, or report if new files were added. We can improve that in a follow-up PR.

@seanpoulter seanpoulter self-requested a review April 2, 2024 01:30
@christian-bromann christian-bromann merged commit 77e4c6b into webdriverio:main Apr 2, 2024
10 checks passed
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

Successfully merging this pull request may close these issues.

3 participants