Created attachment 8541262 [details] logcat Recently I've been seeing this happen quite often (maybe 30% of the time I try to install a downloaded update) that after I click the update notification from the android notification try it just does nothing. i.e. I get a notification for Aurora or Nightly of a new update being downloaded and ready to update, and then when I click on the notification to install the update it doesn't actually update. Or at least it doesn't pop up the updater screen the permissions and the update confirmation. I just had this happen to me for both Nightly and Aurora and I grabbed a logcat but unfortunately it doesn't seem to show anything useful. Attaching it anyway. See start of log for when I clicked on the aurora update notification and 11:21:26 for the nightly update notification.
I saw this today. I think maybe the service gets killed after showing the notification and we aren't handling that right.
While I've never tested this thoroughly, it seemed to me like the update prompt would only open when Fennec was not in the foreground.
We delete downloaded APKs on startup of the update service. The STR for this would be: 1. (Force) download the latest version (via about: page). 2. Restart Fennec. 3. Tap on the update notification. Expected: installation starts. Actual: nothing happens. If Fennec does not manage to re-download the APK after step 2, we end up with a dead link in the update notification. It is trivial to fix by moving the cleanup procedure into downloadUpdatePackage, if we are OK with having one APK around on the device, since we can't and shouldn't make networking requests on service startup.
Created attachment 8548185 [details] [diff] [review] updater-cleanup-fix With this patch, the old APK is being deleted before downloading a new version, instead of on updater service startup. This does leave one APK on the device, but still prevents package accumulation.