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

Crash in modified GitHub auth #2728

Closed
1 task done
paulmelnikow opened this issue Jan 11, 2019 · 12 comments · Fixed by #2730 or #2736
Closed
1 task done

Crash in modified GitHub auth #2728

paulmelnikow opened this issue Jan 11, 2019 · 12 comments · Fixed by #2730 or #2736
Labels
blocker PRs and epics which block other work bug Bugs in badges and the frontend core Server, BaseService, GitHub auth, Shared helpers

Comments

@paulmelnikow
Copy link
Member

Are you experiencing an issue with...

🪲 Description

Post deploy of #1205:

Error: Vendor hook error:,Error: usesRemaining must be an integer
    at Token.update (/home/m/shields/lib/token-pool.js:65:13)
    at GithubApiProvider.updateToken (/home/m/shields/services/github/github-api-provider.js:57:11)
    at request (/home/m/shields/services/github/github-api-provider.js:109:16)
    at Request.request [as _callback] (/home/m/shields/lib/request-handler.js:182:9)
    at Request.self.callback (/home/m/shields/node_modules/request/request.js:185:22)
    at Request.emit (events.js:160:13)
    at Request.<anonymous> (/home/m/shields/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:160:13)
    at IncomingMessage.<anonymous> (/home/m/shields/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:255:19)
    at IncomingMessage.emit (events.js:165:20)
    at endReadableNT (_stream_readable.js:1101:12)
    at process._tickCallback (internal/process/next_tick.js:152:19)
@paulmelnikow paulmelnikow added bug Bugs in badges and the frontend core Server, BaseService, GitHub auth, Shared helpers blocker PRs and epics which block other work labels Jan 11, 2019
paulmelnikow added a commit that referenced this issue Jan 11, 2019
paulmelnikow added a commit that referenced this issue Jan 11, 2019
@paulmelnikow paulmelnikow reopened this Jan 11, 2019
@paulmelnikow
Copy link
Member Author

paulmelnikow commented Jan 11, 2019

Still happening after deploy of #2730, though not on every badge.

Error: Vendor hook error:,Error: usesRemaining must be an integer
    at Token.update (/home/m/shields/lib/token-pool.js:65:13)
    at GithubApiProvider.updateToken (/home/m/shields/services/github/github-api-provider.js:87:11)
    at request (/home/m/shields/services/github/github-api-provider.js:140:18)
    at Request.request [as _callback] (/home/m/shields/lib/request-handler.js:182:9)
    at Request.self.callback (/home/m/shields/node_modules/request/request.js:185:22)
    at Request.emit (events.js:160:13)
    at Request.<anonymous> (/home/m/shields/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:160:13)
    at IncomingMessage.<anonymous> (/home/m/shields/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:255:19)
    at IncomingMessage.emit (events.js:165:20)
    at endReadableNT (_stream_readable.js:1101:12)
    at process._tickCallback (internal/process/next_tick.js:152:19)

@calebcartwright
Copy link
Member

Does that mean that some GH badges are working but not others?

@paulmelnikow
Copy link
Member Author

Yea. You can try on https://s0.shields-server.com/index.html. When I try loading them, they seem fine. Also e.g. curl --insecure https://s0.shields-server.com/github/release-date-pre/Cockatrice/Cockatrice.json is working.

I actually haven't found one that doesn't work, though I'm seeing the errors in Sentry.

@calebcartwright
Copy link
Member

Yeah I just ran through several too, no issues in the UI either, badges rendering lovely

@calebcartwright
Copy link
Member

I don't suppose there's any chance of a delay in Sentry (i.e. any chance those errors are from a few minutes before the #2730 deploy)?

@paulmelnikow
Copy link
Member Author

I was suspicious of that too. Though they didn't start appearing until the deploy, and the line numbers seem to correspond. I am seeing this in the Sentry UI, though, and I'm not sure what it means:

screen shot 2019-01-11 at 1 30 34 pm

@paulmelnikow
Copy link
Member Author

Sentry issue: SHIELDS-22

@calebcartwright
Copy link
Member

That link took me into a sentry sign up page so I'm guessing that in addition to me not having a sentry account that I probably don't have access either?

@paulmelnikow
Copy link
Member Author

Right. I think more of the maintainers should have access, though. It's more than I should carry on my own.

@paulmelnikow
Copy link
Member Author

paulmelnikow commented Jan 11, 2019

Okay, #2736 is the fix. The problem is the badges that use search quota. rateLimit for those is 25, and 0.25 times that is, indeed, not an integer. It also explains why most of the GitHub badges are working fine.

@calebcartwright
Copy link
Member

Good find!

paulmelnikow added a commit that referenced this issue Jan 11, 2019
This code isn't being run during tests, though let's fix that later as part of #2733. Specifically:

> However _the pool itself_ could be used all the time; there's not a big advantage in turning that off when it doesn't need to be used.

Fix #2728
@paulmelnikow
Copy link
Member Author

Think this is fixed! No new errors in the last minute or so. The search badge is working, too, though I didn't actually try it pre-deploy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker PRs and epics which block other work bug Bugs in badges and the frontend core Server, BaseService, GitHub auth, Shared helpers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants