twitchlive-extension icon indicating copy to clipboard operation
twitchlive-extension copied to clipboard

Extension stuck on updating after resuming from hibernation

Open mcat95 opened this issue 7 years ago • 2 comments

When I resume my computer from hibernation, the extension doesn't show any streamers, and it shows 'updating...' instead of the update button. I need to restart gnome-shell (Alt+F2 -> r) for it to work again.

Why can this be happening?

mcat95 avatar Sep 24 '17 08:09 mcat95

Looking at the code this always happens but should resolve itself after the auto update cycle.

When we start the update we disable the button (https://github.com/maweki/twitchlive-extension/blob/master/extension.js#L174-L175). We re-enable it once it is done (https://github.com/maweki/twitchlive-extension/blob/master/extension.js#L221-L223). If there is a failure, we don't re-enable the update button (https://github.com/maweki/twitchlive-extension/blob/master/extension.js#L228-L231). Then there's no manual way to update but the auto-update should resolve this.

I think there is an easy fix. Maybe we reactivate the button and let it say "Update Error" or something like this.

@mcat95 Maybe you want to try for a fix :)

maweki avatar Sep 25 '17 14:09 maweki

This is just speculation, but maybe the problem is with the timer not rescheduling correctly. As you said, it should work but I suspect this has something to do with the issue. It says: It may or may not continue to tick during times where the machine is suspended.

I don't know how GLib handles this, according to this blog post of 2007, it should at least call the function when the system resumes.

I will try to get a more consistent way of reproducing the error and then we'll think about the fix :smile:

mcat95 avatar Sep 25 '17 16:09 mcat95