plasma-applet-weather-widget icon indicating copy to clipboard operation
plasma-applet-weather-widget copied to clipboard

Qml image: Network access is disabled.

Open octoploid opened this issue 9 years ago • 35 comments

Since the update to Plasma 5.4 Beta I get the following error:

/usr/share/plasma/plasmoids/org.kde.weatherWidget/contents/ui/FullRepresentation.qml:96:5: Qml image: Network access is disabled.

And the forecast image is not loaded anymore.

Loading it directly in browser works fine: http://www.yr.no/place/Germany/Berlin/Berlin/avansert_meteogram.png

Any ideas?

octoploid avatar Aug 14 '15 15:08 octoploid

Hmm, it is working again after a reboot...

octoploid avatar Aug 14 '15 16:08 octoploid

Looks like a local hiccup. Closing.

octoploid avatar Aug 15 '15 05:08 octoploid

Happened again after a new reboot. Reopening.

octoploid avatar Aug 16 '15 05:08 octoploid

Thanks for reporting. Interesting, I probably won't have time to try this before plasma 5.4 is stable. But if I do I'll try to investigate. I also couldn't find anything useful in google search... Did you by any chance determined some steps to reliably reproduce this bug? Like after disconnecting and re-connecting wifi or after resume from RAM or something like that.

kotelnik avatar Aug 18 '15 15:08 kotelnik

My internet provider had some network issues. As a result packets got dropped randomly. So all you need to reproduce is a flaky internet connection....

octoploid avatar Aug 21 '15 06:08 octoploid

Another similar report just came. That's it I'm installing testing packages right now... :-)

kotelnik avatar Aug 22 '15 09:08 kotelnik

Hi! I've just installed vanilla Arch Linux (in virtualbox) with kde-unstable and testing enabled. So I have the latest plasma 5.4 and stuff. I'm trying out the widget along with disconnecting and connecting to the internet and so far no luck reproducing this bug... I also cannot reproduce the "Network access is disabled" message when I disconnect the internet... (I have something like "host not found")

Are you both (I mean octopoid and FedeDP) using Arch testing or some other distribution? Are you also using NetworkManager or something else?

kotelnik avatar Aug 22 '15 18:08 kotelnik

I'm running Gentoo. Network uses simple static route set up at boot (cable connected to router). NetworkManager is installed, but I never have used it.

octoploid avatar Aug 22 '15 19:08 octoploid

Thanks. I tried also without networkmanager (so plasma-nm applet is not working) but still no luck with reproducing the bug. I wonder what setup has FedeDP because he is not able to update the widget at all after update to Plasma 5.4.

kotelnik avatar Aug 24 '15 05:08 kotelnik

I'm running arch testing + kde-unstable with nm. I'm currently trying to rebuild the widget, let's see.

EDIT: still no luck...

EDIT2: uninstalling the applet, rebooting and rebuilding finally did the trick! It is working fine now!

FedeDP avatar Aug 24 '15 15:08 FedeDP

Perfect! But still, octopoid has problems and they may arise again with connection problems so I leave this issue open for now...

kotelnik avatar Aug 24 '15 18:08 kotelnik

It seems widget can only update first time it is added after a build. Now my widget is no more refreshing. Can't understand where the problem is (ie, why the first time it works and i could refresh the widget too, but now it doesn't).

FedeDP avatar Aug 26 '15 08:08 FedeDP

That is really weird. I keep updating the testing/kde-unstable Arch linux and keep using the widget there and still no issues at all. I already tried installing it directly with "Get New Widgets" from panel but it is all the same like installing it from AUR. It survives restarts with no problem. I wonder if there can be issue with some kind of unstable internet connection like octopoid mentioned... Maybe it could somehow disable internet access for plasma but I really don't know. I hope I'll meet this issue myself eventually to be able to fix it.

kotelnik avatar Aug 28 '15 16:08 kotelnik

I haven't got unstable internet connection. Where does the widget stores its data? So i'll delete config/cache or what else the widget stores before removing it. Then i'll reinstall it again.

FedeDP avatar Aug 28 '15 17:08 FedeDP

The widget is using standard plasmoid.configuration map to store settings and cache. It seems that these data (for all widgets) are located in a single file (maybe with some backups around) - here in this file: ~/.config/plasma-org.kde.plasma.desktop-appletsrc

This file contains a lot of sections with "[Containments]" in the beginning. You probably want to delete only such sections which contains e.g. "xmlCacheJson=" because that is one of the settings-key the weather widget is using. By section I mean from [Containments] ... to an empty line.

You can of course delete the whole file but you'll probably lose all panel & widget settings.

kotelnik avatar Aug 28 '15 17:08 kotelnik

Ok, i had a look at ~/.config/plasma-org.kde.plasma.desktop-appletsrc, and i started to cry. Your widget filled that file of weather data. I spent 20 mins cleaning it. The file size was 400Kb, now is 12Kb. Is there any way to avoid this thing? (i know, this is totally unrelated. Should i open a new issue?)

FedeDP avatar Aug 28 '15 18:08 FedeDP

I think it fills it every time it is added to a different place in panel or desktop (or systray). That is probably why there is no widget names in this file. This would probably do any other widget if you'd place it multiple times in panel or desktop. So if anything it would be an issue for plasma itself (imo). There should be a way to remove e.g. all weatherWidget's (or any other named widget) configurations for plasma.

On the other hand I'm not sure where the weather cache itself should be located. I placed it to the "configuration" because its behaviour is the same like any other widget settings and that's good.

You can for example have weatherWidget with your home town placed on desktop and second weatherWidget placed on panel with another city displayed. This is what plasma widgets should be able to do. If I place my cache anywhere else to my proprietary location I would have to handle these situations myself.

To your question - I don't think there is a way to avoid piling up these settings in mentioned file. For now.

kotelnik avatar Aug 28 '15 18:08 kotelnik

@kotelnik In that case I think you should disable the cache for now. It really is not a good idea to store cache in appletsrc.

You should use C++ plugin and store the cache in appropriate cache location, for identifying plasmoids you can use plasmoid.id (unique ID of plasmoid instance) from QML.

nowrep avatar Oct 19 '15 12:10 nowrep

OK, I'll try to make thinks right with the C++ extension.

kotelnik avatar Oct 19 '15 22:10 kotelnik

I'm trying the applet again after some months, and i'm still having this issue. Applet won't update even if i click on "reload". I'm using connman (may be you rely on some networkmanager dependent check about connection? I guess no, but it may help you).

EDIT: starting it from konsole with "plasmawindowed org.kde.weatherWidget", runs fine. But if i normally add a new weather applet, it won't work. It seems it works only the first time the applet is added to the system (ie: after the build, and before a reboot). In fact, i guess "plasmawindowed org.kde.weatherWidget" makes it run in a "temp" environment, as if it was the first time i added it.

FedeDP avatar Oct 25 '15 17:10 FedeDP

Thanks a lot for all the testing and effort to narrow the issue down. I'm still unable to reproduce. But I found somewhat similar problem with owncloud (https://github.com/owncloud/client/issues/3600). They say it could be caused by an 'improvement' in Qt 5.5.

I know it's not pleasant but could you temporarily downgrade Qt to version 5.4 and try again? Plasma should be dependent on Qt 5.4+ so this part should be OK.

kotelnik avatar Oct 27 '15 16:10 kotelnik

Yes, looks like https://bugreports.qt.io/browse/QTBUG-46323 - fixed in 5.5.2

nowrep avatar Oct 27 '15 16:10 nowrep

@kotelnik i'm gonna wait until 5.5.2 before trying to downgrade, as it seems a well known issue. There's no official date for 5.5.2 though.

FedeDP avatar Oct 28 '15 12:10 FedeDP

OK, hopefully 5.5.2 will fix the issue.

kotelnik avatar Oct 28 '15 13:10 kotelnik

I installed networkmanager, and it seems the widget now works (it survived 2 reboots!). Great :) May be networkmanager-qt (5.15.0-1) workarounded the well known qt issue?

FedeDP avatar Oct 29 '15 14:10 FedeDP

networkmanager-qt has nothing to do with it.

nowrep avatar Oct 29 '15 14:10 nowrep

Thanks for the clarification, then i don't know what could have solved the issue for me.

FedeDP avatar Oct 29 '15 14:10 FedeDP

And...the issue is back. But somewhat different now: it seems the widget keeps updating, but it do not notice it. An image will explain myself better. screenshot_20151204_102656

As you can see, it is updated (tomorrow is "saturday"), but in the bottom left it keeps saying "3d ago".

FedeDP avatar Dec 04 '15 09:12 FedeDP

This is standard behaviour for not updated data. The widget is using the cached data to show today's weather but the data are in fact 3 days old. I'd say the issue is still the same...

kotelnik avatar Dec 04 '15 09:12 kotelnik

I mean the showed weather for today is correct for today according to 3 days old data.

kotelnik avatar Dec 04 '15 09:12 kotelnik