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

The update command does not indicate what to do when rate limit reached #270

Closed
benjaminapetersen opened this issue Sep 7, 2017 · 12 comments

Comments

@benjaminapetersen
Copy link

Given:

$ webdriver-manager update
webdriver-manager: using global installed version 12.0.6
(node:48495) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, stat '/usr/local/lib/node_modules/webdriver-manager/selenium/chromedriver_2.32.zip'
(node:48495) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Failed to make Github request, rate limit reached.

It would be helpful to provide suggestions for what the user can do as a next step.

@cnishina
Copy link
Member

cnishina commented Sep 8, 2017

I agree here. GeckoDriver grabs information from GitHub and the APIs are rate limited for non authenticated requests. We try our best to make unnecessary requests; however, the error message does not provide any insight on how long to wait or where to look at the documentation what the rate limit is.

@benjaminapetersen
Copy link
Author

Error is from this file.

Suggestions for improving this that follows previous conventions for similar issues?

@benjaminapetersen
Copy link
Author

benjaminapetersen commented Sep 11, 2017

Any insight into how to workaround? Even just to get some details going on this issue. I find that the rate limit problem does not go away (ie, time passing doesn't seem to resolve on its own)
(node:64146) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to make Github request, rate limit reached.

@benjaminapetersen
Copy link
Author

Looks related to #216

@benjaminapetersen
Copy link
Author

Would it be possible to provide some information about how to manually resolve the issue? IE, via browser, what to go download, where to put it, etc. Its not a pretty solution, but would be a potential workaround.

@benjaminapetersen
Copy link
Author

Possible to hard-code a fallback version if the request fails due to rate limiting? This does create some developer maintenance for future releases, but improves the user experience.

@benjaminapetersen
Copy link
Author

Still see this:


[14:44:40] I/file_manager - creating folder ~/web-console/node_modules/protractor/node_modules/webdriver-manager/selenium
(node:99759) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to make Github request, rate limit reached.
[14:44:41] I/update - chromedriver: unzipping chromedriver_2.33.zip
[14:44:41] I/update - chromedriver: setting permissions to 0755 for ~/web-console/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.33

I'd consider constructing a PR if the above suggestion is acceptable? It would add some maintenance overhead to updating a fallback version. If no, +1 to a discussion about alternative approaches.

@elgohr
Copy link

elgohr commented Dec 17, 2017

@ferndot
Copy link

ferndot commented Mar 27, 2018

Is there any progress on this?

@dandye
Copy link

dandye commented Mar 28, 2018

My work around is to:

  1. cache the file node_modules/webdriver-manager/selenium/gecko-response.json (this is the GitHub API response)
  2. touch it, so that it is less than 1hr old

webdriver-manager will then use that file instead of making the problematic Unauthenticated GitHub API Request.

The rationale for caching is described in the bugzilla link above: Document best practices for deploying geckodriver in README:

  • cache dependencies. Major CI providers will all provide some way
    to cache downloaded artifacts, and since geckodriver is rarely
    updated and updates are typically not essential and may even be
    problematic, it seems like a good fit for caching. It might not
    improve performance since the CI caches themselves will also
    involve some remote download, but it will certainly avoid rate
    limits.

@ppitonak
Copy link

No matter what solution you choose, the promise rejection should be handled in correct way so that the process exits with non-zero value after error.

We run webdriver-manager update in npm postinstall script and it doesn't fail when GitHub rate limit is reached.

@cnishina
Copy link
Member

Done! Version 13 has a github token flag. No more rate limit issues (hopefully)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants