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

Workaround to obtain newer 3.x releases not in NPM? #6169

Closed
kylecordes opened this issue Jul 17, 2018 · 11 comments
Closed

Workaround to obtain newer 3.x releases not in NPM? #6169

kylecordes opened this issue Jul 17, 2018 · 11 comments
Labels

Comments

@kylecordes
Copy link

Expected Behavior -

Recent 3.x version published to NPM, with numerous fixes since the nine-month-old 3.6.0 version, on NPM.

Actual Behavior -

Latest 3.x version is published to NPM is 3.6.0; there is also version 4.0.0-alpha.1, but (not surprisingly, given the alpha status) other tools that depend on Selenium generally have not been upgraded for compatibility with this major (very exciting!) upcoming version.

Steps to reproduce -

npm install selenium-webdriver

I've read various issues that seem to be about this: #5797 #5205 #4324 but haven't found an explanation that I can understand, of the situation. It appears that there have been numerous "releases" in the last nine months:

https://github.com/SeleniumHQ/selenium/releases

... fixing numerous bugs. Including (important to me) a bug that causes EADDRINUSE errors on Windows in Selenium that make heavy use of browser.wait().

Is there a major defect with the newer 3.x versions (3.7.0, 3.8, 3.9, 3.10, 3.11) that prevents them from being published on NPM?

Is there any workaround available? For example, a way for users to obtain a newer 3.x version in the interim, to benefit from all of this 3.x development between now and when 4.0 ships? (And likely, well beyond that - the tool I'm using on top of Selenium, Protractor, is currently at a very relaxed pace of development and maintenance, and I would guess its update to Selenium 4.0 may happen at a similarly relaxed pace.)

@luke-hill
Copy link
Contributor

Whilst I'm not the JS maintainer. (And I'm not going to tag him here). You have answered your own question.

3.6 was the last 3.x JS version. there is a 4.0-alpha version in NPM also.

Reading https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/CHANGES.md#v400-dev which you have linked through to would explain the reasoning why, and I hope you'd agree. However as a non-JS user, I cannot elaborate any more as I don't use the technology.

This thread: #2969 Illustrate's the lead maintainers vision for how to remove some of the legacy parts of the Selenium-JS framework and rough timescales. Note that the selenium project tries to synchronise project releases wherever possible. But sometimes owing to workloads these won't be maintained across all language bindings.

@kylecordes
Copy link
Author

kylecordes commented Jul 17, 2018

@luke-hill Yes, of course, I understand there are big plans underway for an upcoming version 4. I have read those explanations, they are very good.

For now though (before version 4, and its adoption across the ecosystem), I am hoping for some workaround - I am impacted today, by this problem: #2888 which was, as far as I can see, fixed in October (over 8 months ago) in this commit:

83bdd7b

That is why I am wondering if anyone can suggest a workaround to obtain something slightly newer than version 3.6, to include that improvement (and perhaps others) while we await version 4. It appears that the progress in the JavaScript code after 3.6 would be very helpful even before the arrival of 4.

At worst-case I could make a "monkey patch" to apply that change - but that seems like a poor solution, hence my reason for asking here about a better workaround.

@luke-hill
Copy link
Contributor

So part of your question was

Is there a major defect with the newer 3.x versions (3.7.0, 3.8, 3.9, 3.10, 3.11) that prevents them from being published on NPM?

There aren't any versions of the JS bindings for those releases.

Are you able to use the 4.0 version? Or is something prohibiting that?

@kylecordes
Copy link
Author

@luke-hill I'm not consuming Selenium directly, but rather via Angular's Protractor... which is not yet compatible with v4.0.0-alpha.1. I don't see any activity there around updating, and it seems realistic to expect such activity might not begin until after v4 ships. (I have not investigated myself and attempted to diagnose the incompatibility.)

@kylecordes
Copy link
Author

(Update for anyone that comes along with the same need: I found at least temporary relief from the trouble by monkey patching the installed selenium JavaScript code, a single-line edit to enable HTTP keep alive, which greatly reduces the incidence of the network difficulties that led to the need for the improvement in the commit linked above. In the broad sense it's tough to recommend such a patch, but it is minor and tactical and effective.)

@motin
Copy link
Contributor

motin commented Jul 29, 2018

TL;DR: How do I use Selenium 3.11 (or greater) in a JS/npm-based project?

(I am equally confused by this situation. I am attempting to use geckodriver 0.21.0 which requires Selenium 3.11 (or greater) (see https://github.com/mozilla/geckodriver/releases), but selenium-webdriver 3.6.0 is the latest 3.x version published to npm. There is a mention in the Selenium 3.8.1 release for Release selenium-webdriver 3.8.0 :: Alex Rodionov and it seems in general like selenium-webdriver for ruby follows the version numbers of Selenium itself. The selenium-webdriver directory indeed exhibits a 4.0.0-alpha1 release https://github.com/SeleniumHQ/selenium/tree/master/javascript/node/selenium-webdriver - does this mean that we need to use 4.0.0-alpha1 in order to use Selenium 3.11+?)

@luke-hill
Copy link
Contributor

@motin Read my comment above that should explain the situation. Whilst not a JS user. I know that The author has been doing a great deal of work in rewriting some serious portions of the codebase in line for 4.0

TL;DR - Selenium 3.6 is the last 3.x version of the JS bindings. There is a 4.0 alpha version you can use also.

Owing to your question about the gecko compatibility, I would try using 4.0 - It is a valid question however. I'm not 100% sure is the honest answer. @AutomatedTester can you offer some mozilla like wisdom here?

@paulsmirnov
Copy link

paulsmirnov commented Jul 30, 2018

@luke-hill As far as I understand, the alpha version should be tagged next on NPM, and the latest tag should point to the latest stable release (3.6.0, right?). Otherwise, a few tools in JS ecosystem (including npm itself) think that everybody MUST upgrade to this alpha version ASAP or be doomed for out-of-date dependencies. Could you kindly ask the responsible guy to adjust tags accordingly on NPM? 🙏

@luke-hill
Copy link
Contributor

luke-hill commented Jul 30, 2018

We use semver b/c that's what npm uses, but it's not an accurate representation of the stability of each selenium-webdriver release. Every release pushed to npm is considered the latest stable supported release that users should consume.

From #5617 (comment)

EDIT: There are also links in this thread above that explain the reasoning behind the decisions. I am not a JS user, just a Selenium user. But the Author has explained to several people why he's made his decisions.

@motin
Copy link
Contributor

motin commented Jul 30, 2018

Every release pushed to npm is considered the latest stable supported release that users should consume.

I guess this is the core of the confusion - calling a stable supported release "alpha". I'll try it out and since it is stable it should be fine to use.

And yes, the linked issues explains the reasoning, which I understand as: the efforts of the current maintainer are focused on preparing for v4 instead of maintaining v3-based bindings - PRs to update the v3 bindings are welcome. Fair enough!

I believe this particular issue can be closed, summarized as: There is no workaround to obtain v3.7+ versions of the Node bindings, since they are not created.

@diemol
Copy link
Member

diemol commented Jan 8, 2021

I believe the comment above summarizes it, we have improved the release frequency and now you can get a handle of Alpha 8, and we soon hope to be moving to Beta 1.

@diemol diemol closed this as completed Jan 8, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants