kasramp/UbuntuIndicatorWeather

Indicator doesn't show any weather data when starting at system startup

swirlsky opened this issue · 6 comments

indicator showing no weather information

The indicator works normally, however, if autostart is on, this is what I get after logging in to Ubuntu.

Possible reason: It seems that if the network connection is only established after the indicator loads, it cannot update, hence shows no weather data.

The network connection is set up in the next couple of seconds immediately, but sadly the indicator doesn't try to fetch the information right again afterwards, instead I have to wait long minutes or restart the application to get some weather data.

Thanks @swirlsky - that's the known issue. I am planning to add retry mechanism as well as a manual update button for now so instead of waiting, the user will be able to click the button. It is not a perfect solution but until finding out how to resolve the problem, the workaround can alleviate some of the pain.

@kasramp Thanks! A possible workaround I thought of was not to modify anything in the application's source code, just turn autostart off, and create an executable shell script file with the content

#!/bin/sh
/bin/sh /usr/lib/ubuntu-indicator-weather/indicator-weather

in the /etc/network/if-up.d directory.

I thought this way the indicator would start only as soon as a network connection is established, but unfortunately it didn't work. The script is executed though right after the network is available, but the indicator doesn't load, and Ubuntu throws a "System program problem detected" message. apport.log:

ERROR: apport (pid 3669) Mon Jun 19 21:06:53 2017: called for pid 3667, signal 11, core limit 0
ERROR: apport (pid 3669) Mon Jun 19 21:06:53 2017: script: /usr/lib/ubuntu-indicator-weather/indicator-weather, interpreted by /usr/bin/python2.7 (command line "python /usr/bin/indicator-weather")
ERROR: apport (pid 3669) Mon Jun 19 21:06:53 2017: is_closing_session(): no DBUS_SESSION_BUS_ADDRESS in environment
ERROR: apport (pid 3669) Mon Jun 19 21:06:56 2017: wrote report /var/crash/_usr_lib_ubuntu-indicator-weather_indicator-weather.0.crash

For me it doesn't work even when I start it manually. Maybe it's because I'm not using network manager?

Edit: It actually started working after a couple of system reboots, even at startup. But it's showing some weird city names that have nothing to do with my location, even when I type it manually. But that's a different issue.

@kpuljek - the issue you are facing is because one of the backend API has failed few days ago and resulted the indicator to stop working. The issue has been fixed yesterday. Do let me know if you still cannot load the indicator.

@swirlsky - thanks for the solution. Let me do some studies on it and experiment with your solution and others to see which fit the best to this use case.

@kasramp Thanks for the upgrade, everything's working well now.