briefcase icon indicating copy to clipboard operation
briefcase copied to clipboard

Put a timeout to the check for updates call

Open ggalmazor opened this issue 5 years ago • 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 for api.github.com pointing an IP address that won't respond HTTP calls such as 1.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

ggalmazor avatar Oct 03 '19 10:10 ggalmazor

I can take a look at fixing this.

macdude357 avatar Oct 18 '19 21:10 macdude357

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."

@ggalmazor

macdude357 avatar Nov 04 '19 20:11 macdude357