Put a timeout to the check for updates call
ggalmazor opened this issue · 2 comments
Problem description
Briefcase gets stuck checking for updates for different network reasons (firewall, custom dns, lack of connectivity...) or if GH service is down.
Steps to reproduce the problem
- Edit the
/etc/hosts
conf file and create an entry forapi.github.com
pointing an IP address that won't respond HTTP calls such as1.2.3.4
- Launch Briefcase
Expected behavior
The update notice should disappear after some time.
Additionally, we could consider showing a message telling the user that Briefcase can't check for updates.
Other information
Forum thread at https://forum.opendatakit.org/t/update-notice-keeps-checking-for-updates/22475
I can take a look at fixing this.
In looking at this I also found that the update request might return an HTTP 200 but the body would be a message that the API rate limit has been exceeded. So the code should also check for that as well. Do you want the timeout to be configurable or should it simply be a hardcoded value (say 30 seconds)?
Also, I assume you want to update the label that says "checking for updates..." to say something like "Checking for updates failed."