Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Wallet crashes after opening it more than 60 times in an hour #257

Closed
LeeAlephium opened this issue Jun 8, 2022 · 3 comments · Fixed by #260
Closed

Wallet crashes after opening it more than 60 times in an hour #257

LeeAlephium opened this issue Jun 8, 2022 · 3 comments · Fixed by #260
Assignees
Labels
bug Something isn't working

Comments

@LeeAlephium
Copy link
Contributor

LeeAlephium commented Jun 8, 2022

The wallet will crash if you open it more than 60 times in an hour 🙂

{"message":"API rate limit exceeded for 76.67.201.44. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting%22%7D

GitHub limits to 60 requests per hour for unauthenticated requests

Request in question: https://api.github.com/repos/alephium/desktop-wallet/releases/latest

You don't even have to open the wallet 60 times: visit that link more than 60 times and then open the wallet. Crash :D

for i in $(seq 61); do curl https://api.github.com/repos/alephium/desktop-wallet/releases/latest > /dev/null; sleep 1; done

Then open the wallet, should crash

(Until the next hour, where the limit will be reset :p )

@LeeAlephium LeeAlephium added the bug Something isn't working label Jun 8, 2022
@diomark
Copy link

diomark commented Jun 8, 2022

Just tell it to ignore if it fails? it's just checking if it's running the latest version, right?

@LeeAlephium
Copy link
Contributor Author

Yeah, that's the quick fix for sure

@LeeAlephium
Copy link
Contributor Author

LeeAlephium commented Jun 16, 2022

Instead of checking each startup, it'll check a property to determine if an hour has passed since the last check and if true then do the request, and continue to do so for each subsequent hour passed

@LeeAlephium LeeAlephium added the next For next release or requires the next release's stack label Jun 17, 2022
@LeeAlephium LeeAlephium self-assigned this Jun 17, 2022
@LeeAlephium LeeAlephium removed the next For next release or requires the next release's stack label Jun 30, 2022
@nop33 nop33 closed this as completed in #260 Jul 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants