getodk / briefcase

ODK Briefcase is a Java application for fetching and pushing forms and their contents. It helps make billions of data points from ODK portable. Contribute and make the world a better place! ✨💼✨
https://docs.getodk.org/briefcase-intro
Other
60 stars 154 forks source link

Put a timeout to the check for updates call #823

Open ggalmazor opened 4 years ago

ggalmazor commented 4 years ago

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

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

macdude357 commented 4 years ago

I can take a look at fixing this.

macdude357 commented 4 years ago

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