GNOME Bugzilla – Bug 787423
Weather on notification error
Last modified: 2017-12-01 15:27:33 UTC
I was digging in journalctl and I found this error that happened a few minutes ago and I thought about reporting it. I'm using Gnome 3.25.91 (i guess?) from Archlinux with gnome testing repository. If you need any other information just let me know. Thanks! Here's the log sep 08 00:09:39 lenovo gnome-shell[28085]: JS ERROR: Exception in callback for signal: changed: TypeError: GWeather.conditions_to_string_full is not a function WeatherSection<._getSummary@resource:///org/gnome/shell/ui/dateMenu.js:242:1 wrapper@resource:///org/gnome/gjs/modules/lang.js:178:22 WeatherSection<._getSummaryText/summaries<@resource:///org/gnome/shell/ui/dateMenu.js:302:20 WeatherSection<._getSummaryText@resource:///org/gnome/shell/ui/dateMenu.js:300:25 wrapper@resource:///org/gnome/gjs/modules/lang.js:178:22 WeatherSection<._getLabelText@resource:///org/gnome/shell/ui/dateMenu.js:316:20 wrapper@resource:///org/gnome/gjs/modules/lang.js:178:22 WeatherSection<._sync@resource:///org/gnome/shell/ui/dateMenu.js:332:38 wrapper@resource:///org/gnome/gjs/modules/lang.js:178:22 _emit@resource:///org/gnome/gjs/modules/signals.js:126:27 WeatherClient<._init/<@resource:///org/gnome/shell/misc/weather.js:64:13
You need at least 3.25.91 of libgweather.
I'm still getting that on gnome-devel/libgweather 3.25.92-1
Mmh, after updating libgweather (that is, regenerating the gir/typelib files), I can reproduce the issue. Not sure what changed, but I'll provide a fix.
Created attachment 359405 [details] [review] dateMenu: Adjust to GWeather IAPI change It's not exactly clear what changed - gobject-introspection, gjs - but the newly added gweather_condition_to_string_full() API no longer works like it used to. The replacement code does look more idiomatic anyway, so just fix the code without investigating the reason of the breakage.
Review of attachment 359405 [details] [review]: untested but looks obviously fine ::: js/ui/dateMenu.js @@ +241,2 @@ if (ok) + return new GWeather.Conditions({ phenomenon, qualifier}).to_string_full(options); nit: missing space after qualifier
Attachment 359405 [details] pushed as 56f4ce3 - dateMenu: Adjust to GWeather IAPI change
In this way it still has problems, I believe the right formulation would be something like @@ -237,10 +237,9 @@ + let [significant, phenomenon, qualifier] = info.get_value_conditions(); + if (significant) + return new GWeather.Conditions({ phenomenon, qualifier, significant}).to_string_full(options);
*** Bug 787465 has been marked as a duplicate of this bug. ***