Neroth / gnome-shell-extension-weather

A simple extension for displaying weather informations from several cities in GNOME Shell
GNU General Public License v3.0
138 stars 143 forks source link

Weather data not (always) refreshing automatically #146

Closed ferdnyc closed 10 years ago

ferdnyc commented 11 years ago

Is anyone seeing this except me? I've noticed that the "current" weather conditions seems to be lagging behind, far more than can be explained by the up-to-an-hour-out-of-date data availability.

Sometimes, I'll notice that the extension is claiming it's sunny and 84°F at 10pm (rare for New York City), and when I open the detals I see it's because those numbers are from 2:51pm. When I hit "Reload Weather Information", it jumps forward to 9:51pm.

The conditions don't only update through manual request, sometimes the data refreshes on its own. I suspect that's because certain actions trigger a refresh, like locking/unlocking the screen. But if I'm actually using the computer (ironically), and nothing happens to trigger an update, the information seems to just slowly grow more out of date.

It's not clear to me whether this would be a GWeather issue or something with the extension. With a quick skim of Neroth's code, I wasn't able to locate a refresh timer or anything that governs update frequency (though I may simply have missed it). But I wanted to report it here to ask: is anyone else is seeing the same thing, or any ideas on what might be the problem?

Reinis commented 11 years ago

I have the same issue, maybe even more severe. It refreshes only once a day or so, manual refreshing doesn't work. It does refresh if I restart gnome-shell or select different location.

What determines auto-refresh frequency? That might give a clue where to look further.

ferdnyc commented 11 years ago

One thing you might try is, when the refreshes aren't effective, turn on debugging in the extension (it's a switch in the settings interface, or you can set org.gnome.shell.extensions.weather key debug-extension to true) and then attempt a refresh again. The file $HOME/.local/share/gnome-shell/extensions/weather-extension@xeked.com/weather.log will contain a trace of what did or didn't happen that may be helpful.

(The debugging is very verbose, which is why I'm afraid to leave it on all the time in hopes of "catch" a problem. But if you're seeing problems even during manual refreshes, it could be informative. You'll definitely want to be sure and turn it off again after a capture, though.)

ferdnyc commented 11 years ago

I've also had possibly-related problems with the extension losing its information entirely, and getting stuck in an initializing-data state — possibly due to actions on my part in the setting interface. (The first time I hit it was when I added Belgrade, Serbia as a second location, while trying to assist with #141 .) That seems to clear up on reboot, but nothing short of that helps. Not even if I disable and reenable the entire extension.

The only thing I've been able to glean so far points to a possible issue in the flow of the refresh method (lines 256-397 in extension.js. At times I've seen logs which show the following messages:

Refreshing
Variation readed

But then none of the other output from that function, which makes me think that the (first || update || cityVar) test is sometimes failing when it shouldn't.

I apologize to Neroth for the basically-useless report so far, which is why I'm only mentioning it here in case it helps shed any light on the auto-refresh breakage. If I manage to collect any more concrete information I'll open a new Issue documenting it.

Neroth commented 10 years ago

Fixed with lasts commits ;) !