After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787423 - Weather on notification error
Weather on notification error
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: system-status
3.25.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 787465 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-09-07 22:16 UTC by Bilal Elmoussaoui
Modified: 2017-12-01 15:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dateMenu: Adjust to GWeather IAPI change (1.53 KB, patch)
2017-09-08 15:23 UTC, Florian Müllner
committed Details | Review

Description Bilal Elmoussaoui 2017-09-07 22:16:07 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
Comment 1 Florian Müllner 2017-09-07 22:22:56 UTC
You need at least 3.25.91 of libgweather.
Comment 2 Bilal Elmoussaoui 2017-09-08 08:39:47 UTC
I'm still getting that on gnome-devel/libgweather 3.25.92-1
Comment 3 Florian Müllner 2017-09-08 15:23:24 UTC
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.
Comment 4 Florian Müllner 2017-09-08 15:23:45 UTC
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.
Comment 5 Rui Matos 2017-09-11 18:02:12 UTC
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
Comment 6 Florian Müllner 2017-09-12 15:34:28 UTC
Attachment 359405 [details] pushed as 56f4ce3 - dateMenu: Adjust to GWeather IAPI change
Comment 7 lord 2017-09-14 09:08:26 UTC
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);
Comment 8 Florian Müllner 2017-12-01 15:27:33 UTC
*** Bug 787465 has been marked as a duplicate of this bug. ***