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

Error: Failed to make Github request, rate limit reached. #303

Closed
christosptr opened this issue Feb 27, 2018 · 23 comments
Closed

Error: Failed to make Github request, rate limit reached. #303

christosptr opened this issue Feb 27, 2018 · 23 comments

Comments

@christosptr
Copy link

christosptr commented Feb 27, 2018

I am running
webdriver-manager start
and I get the following error and webdriver fails to start

(node:58736) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to make Github request, rate limit reached.
(node:58736) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js proces

Anyone else is seeing this issue?

@cnishina
Copy link
Member

cnishina commented Mar 8, 2018

The start command should not make a request to GitHub. This was fixed in a later release. Please uninstall the current version of webdriver-manager and reinstall it. Let me know if that works.

@christosptr
Copy link
Author

Hi @cnishina Thanks for your responses. I did not see this issue for few days now. Just so I can check and confirm in which release should this issue be fixed ?

@p3x-robot
Copy link

Same error:
It is still the same error:
https://travis-ci.org/patrikx3/angular-compile

Running "cory-ensure-protractor" task
Protractor found on the path[15:35:31] I/update - chromedriver: file exists /home/travis/build/patrikx3/angular-compile/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.37.zip
[15:35:31] I/update - chromedriver: unzipping chromedriver_2.37.zip
[15:35:32] I/update - chromedriver: setting permissions to 0755 for /home/travis/build/patrikx3/angular-compile/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.37
[15:35:32] I/update - chromedriver: chromedriver_2.37 up to date
[15:35:32] I/update - selenium standalone: file exists /home/travis/build/patrikx3/angular-compile/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.11.0.jar
[15:35:32] I/update - selenium standalone: selenium-server-standalone-3.11.0.jar up to date
(node:7143) UnhandledPromiseRejectionWarning: Error: Failed to make Github request, rate limit reached.
    at Request.req.on.response (/home/travis/build/patrikx3/angular-compile/node_modules/protractor/node_modules/webdriver-manager/built/lib/binaries/config_source.js:155:28)
    at Request.emit (events.js:180:13)
    at Request.onRequestResponse (/home/travis/build/patrikx3/angular-compile/node_modules/request/request.js:1068:10)
    at ClientRequest.emit (events.js:180:13)
    at HTTPParser.parserOnIncomingClient (_http_client.js:540:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:117:17)
    at TLSSocket.socketOnData (_http_client.js:445:20)
    at TLSSocket.emit (events.js:180:13)
    at addChunk (_stream_readable.js:274:12)
    at readableAddChunk (_stream_readable.js:261:11)
(node:7143) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:7143) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@p3x-robot
Copy link

p3x-robot commented Mar 31, 2018

My solution is #307 (comment)

evilaliv3 added a commit to globaleaks/globaleaks-whistleblowing-software that referenced this issue Apr 9, 2018
@DenysVuika
Copy link

Solution suggested by @p3x-robot in the link helped me as well.

jjelschen pushed a commit to test-editor/deprecated-web-workspace-navigator that referenced this issue Apr 23, 2018
workaround to avoid hitting GitHub's rate limit, see angular/webdriver-manager#303
@wachri
Copy link

wachri commented Jun 6, 2018

It will not help if you like to run the tests in firefox... 😒

@virgile-hogman
Copy link

Still having the issue with gecko driver for firefox. The problem is this file is downloaded from api.github.com so i if you make too many requests at a given moment it fails. It's not a reliable solution :(

@cnishina
Copy link
Member

cnishina commented Jan 8, 2019

This feature was resolved and released in the beta release of this and Protractor.

@virgile-hogman
Copy link

But i need the gecko driver for firefox, i don't want it to be disabled. Is that solved?

@ghost
Copy link

ghost commented Jan 10, 2019

@cnishina, Could you please link here the PR with the fix?

Is this something similar to Minishift's solution?

@virgile-hogman
Copy link

Sorry but i'm still quite confused with the status of this issue.
Disabling gecko is definitely not an option at the moment since my tests are based on firefox.

This feature was resolved and released in the beta release of this and Protractor.

Not really sure what the fix is about, i still have the problem with webdriver-manager 12.1.1 and Protractor 5.4.2 (which should be the last versions). Maybe you have some solution with a local cache, but in my case it doesn't work since this procedure can be run regularly from a Docker image therefore no cache is available. I'm conscious this is far from optimal but i have some other constraints that i can't change at the moment.

I checked a bit more in the existing tickets and as far as i understand, there are 3 ways to solve this:

  • authenticated user with a github token. I'd like to avoid this solution, my build scripts are run on a server not related to a physical person.
  • providing an alternative CDN. Not clear yet how it should be used. What should be stored and so on?
  • providing a cache myself. It seems it's enough to cache the gecko-response.json which is the file read from api.github.com. The good news is that it's not necessary to cache the bigger geckodriver-{version}.tar.gz file. But to make it work the json file must be fresh enough, this can be done with touch as stated here (thanks @dandye !): The update command does not indicate what to do when rate limit reached #270 (comment)

Many people seems to have problems with this gecko driver so it should probably be better documented. For the moment i will stick to this last solution with my own cache but it's more of a temporary hack. So i'd be pleased to find a better solution in the future if possible :)

@mihaivarga
Copy link

When using protractor 6.0.0-beta (which has webdriver manager beta) webdriver-manager update works fine. However we run into a lot of other issues with the e2e tests. Not a good viable solution. We need a solution for protractor 5 first. 😢

@virgile-hogman
Copy link

@mihaivarga did you try the solution by caching yourself the gecko-response.json file? It works fine for me. But it's very hacky, on the long run it's not good since you'd need to update this file everytime a new driver is released.

@cnishina can you explain what the change in the beta version is about? I don't understand where the code of this beta can be seen nor how to install it. In any case removing gecko is not a solution, it's like saying "if the feature you need has some issues, then just disable it" 💃 😒 😢

@mihaivarga
Copy link

@mihaivarga did you try the solution by caching yourself the gecko-response.json file? It works fine for me. But it's very hacky, on the long run it's not good since you'd need to update this file everytime a new driver is released.

@virgile-hogman thanks. But no. I don't think it's a good solution as it seems like a breaking issue for webdriver-manager than an issue on consuming apps and it should be tackled by it. We will wait for a proper release on protractor 6. Right now the github api limit only gets hit by us rather rare.

@virgile-hogman
Copy link

@mihaivarga do you know what to expect in Protractor 6? I still have no clue what the supposed fix is about.

Right now the github api limit only gets hit by us rather rare.

We have different needs, in my case this is used in a CI test framework running on servers on a daily basis. Something failing occasionally even rarely is not fine for us. This fix is clearly a very hacky patch but at least it always works as long as you don't need the updates.

@mihaivarga
Copy link

@mihaivarga do you know what to expect in Protractor 6? I still have no clue what the supposed fix is about.

Right now the github api limit only gets hit by us rather rare.

We have different needs, in my case this is used in a CI test framework running on servers on a daily basis. Something failing occasionally even rarely is not fine for us. This fix is clearly a very hacky patch but at least it always works as long as you don't need the updates.

@virgile-hogman haven't spent much time to investigate, gecko-driver issues seems to be fixed. I dropped it as it is beta and our working tests on 5+ where failing on 6 beta. I don't know if there are any plans on releasing a new 5+ with the latest webdriver-manager that might fix the issue.

@martinmthomas
Copy link

In my case, I think I made the mistake by installing both protractor and webdriver-manager globally. I uninstalled both the global packages and then installed just protractor. This resolved the "Rate limit" issue for me!

@virgile-hogman
Copy link

@martinmthomas this doesn't tell us anything about the versions you have been using. Reproducible issues don't usually disappear by magic.

@martinmthomas
Copy link

@virgile-hogman I do not know if it will reoccur whenever webdriver-manager is installed globally. But I was just sharing my experience. The versions are as following,
protractor: 5.4.2
webdriver-manager: 12.1.1
angular: 7.1.0
node: 8.11.2

@virgile-hogman
Copy link

virgile-hogman commented Feb 18, 2019

Thanks for this. So you're still using Protractor 5. But are you able to put yourself in the context where your quota limit is reached? You need to run multiple request calls on api.github.com for that. Otherwise you won't really see the problem.

From what i read here it's solved with Protractor 6. But I'm still really confused about it! The issue seems to come from webdriver manager, not Protractor. Am i wrong? May it's solved in Protractor 6 becomes it depends on a new version of webdriver manager that solves this?
Personally i'm with Angular 7.2.0, Protractor 5.4.2 which uses webdriver-manager ^12.0.6, resolving currently to 12.1.1. So it could have been solved meanwhile but i had to put a workaround until this is really fixed. It's currently very difficult to follow what's going on.

Please can someone explain if and where this issue is supposedly fixed? @cnishina or anyone else who could clarify this.

@cnishina
Copy link
Member

Fixed as of 13.0.0. There is a flag you should be able to use or set via environment variables. I think you should be able to get to the help menu with webdriver-manager update --help to find the flag. Start did not make any additional calls (previously fixed) and should only start the selenium standalone server.

Sorry it has taken a while to fix this one.

@malindapw
Copy link

@cnishina is this 13.0.0. Has it been released yet? still, the latest is 12.1.7 Thanks

@srishidev10
Copy link

webdriver-manager start --gecko saved me.

TopDevSun0 pushed a commit to TopDevSun0/angular-seed that referenced this issue Sep 21, 2022
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

No branches or pull requests

10 participants