Closed thepassle closed 1 year ago
Thanks for reporting!
It seems like the binary is unable to start, can you check if you can start the JAR file, stored in /node_modules/selenium-standalone
directly?
Any contributions that resolves the bug are highly appreciated. Don't expect this to be picked up by active contributors as they have their own priorities. If you depend on this bug to be fixed, your contribution is required. Please take a look into our contribution guidelines or join our Discord development server and let us know if you have any questions. Cheers!
It seems like the binary is unable to start, can you check if you can start the JAR file, stored in /node_modules/selenium-standalone directly?
Im not really sure what the expected behavior is, but opening the JAR file in node_modules/selenium-standalone/.selenium/selenium-server/4.4.0/selenium-server.jar
doesnt seem to do anything. I dont see any errors, I don't see any new processes started in my activity monitor, it just seems to do nothing 😅
I came back to this, without reinstalling or anything, and today I'm getting:
⚡ node index.js
Failed to connect to selenium. Attempts left: 115
connect ECONNREFUSED 127.0.0.1:8888
running the exact same repo I used and posted above here. The impact of these errors/this package breaking is that the tests of our master branch on https://github.com/modernweb-dev/web seemingly randomly started failing (by breaking at least three of our packages), and we're not sure how to solve this.
Any contributions that resolves the bug are highly appreciated. Don't expect this to be picked up by active contributors as they have their own priorities. If you depend on this bug to be fixed, your contribution is required. Please take a look into our contribution guidelines or join our Discord development server and let us know if you have any questions. Cheers!
As an open source maintainer myself, I understand this sentiment, but unfortunately it's not very helpful in this situation. Seemingly some kind of JAR file shipped in an NPM package is broken, and it's broken the main export of this project. I'd normally be happy to dive in, debug an issue in JS code, and create a PR with a fix, but I have no clue where to begin debugging a shipped binary.
I am happy to take a look this week.
I am experiencing this issue as well - if i start in watch mode it will wait until the selenium server has started and work as expected:
2023-05-26T01:37:43.959Z INFO @wdio/cli:launcher: Run onPrepare hook
Failed to connect to selenium. Attempts left: 115
Failed to connect to selenium. Attempts left: 110
2023-05-26T01:37:52.863Z INFO @wdio/cli:launcher: Run onWorkerStart hook
It looks like when running outside of watch mode its just not waiting for selenium to start up.
If helpful - I am running a Apple M1 Pro with OS Version 13.2.1 (22D68).
@christian-bromann Recently I have seen that for Chrome 115 version google has updated the end-point for finding the Chrome driver binary, which is actually causing us to not be able to provide any specific Chrome driver version in the selenium-standalone service. If you see selenium-standalone service hit https://chromedriver.storage.googleapis.com/ end-point to get the required chrome driver, but now since this change, version 115 isn't present here. All the details are mentioned https://googlechromelabs.github.io/chrome-for-testing/ , https://chromedriver.chromium.org/downloads. Are we going to do anything about it?
I came back to this, without reinstalling or anything, and today I'm getting:
⚡ node index.js Failed to connect to selenium. Attempts left: 115 connect ECONNREFUSED 127.0.0.1:8888
running the exact same repo I used and posted above here. The impact of these errors/this package breaking is that the tests of our master branch on https://github.com/modernweb-dev/web seemingly randomly started failing (by breaking at least three of our packages), and we're not sure how to solve this.
Any contributions that resolves the bug are highly appreciated. Don't expect this to be picked up by active contributors as they have their own priorities. If you depend on this bug to be fixed, your contribution is required. Please take a look into our contribution guidelines or join our Discord development server and let us know if you have any questions. Cheers!
As an open source maintainer myself, I understand this sentiment, but unfortunately it's not very helpful in this situation. Seemingly some kind of JAR file shipped in an NPM package is broken, and it's broken the main export of this project. I'd normally be happy to dive in, debug an issue in JS code, and create a PR with a fix, but I have no clue where to begin debugging a shipped binary.
I think the issue because your file wasn't downloaded properly. The tool just check existent of files but don't check their sizes and hash. That's why i assume you maybe downloaded selenium-server jar file on half of it real size for some reason. And obviously it's damaged, but selenium-standalone watch file existence and think everything all right. It can't be reinstalled automatically also, just after deletion. I had deal with the bug, and it was quite unpleasant have the kind of behavior. I've increased timeout for downloading because of that recently. From 90000 to 320000. But better here should be some kind of additional checks.
Expected Behavior
Selenium starts the process as expected and does not exit before it can start
Current Behavior
Selenium exits before it can start without a clear error message (no stdout or stderr)
Steps to Reproduce
Provide an unambiguous set of steps to reproduce this bug. Include commands that you used in the shell, or snippets of how you are using the JavaScript API.
npm init --y && npm i -S selenium-standalone
"type": "module"
in thepackage.json
touch index.js
index.js
:await selenium.install({ drivers: { chrome: { version: 'latest' }, firefox: { version: 'latest' }, }, });
await selenium.start({ drivers: { chrome: { version: 'latest' }, firefox: { version: 'latest' }, }, seleniumArgs: ['--port', '8888'], });