Flatpak search provider never returns results, logs JS backtrace
Steps to reproduce:
gdbus call --session --dest org.gnome.Weather.BackgroundService --object-path /org/gnome/Weather/BackgroundService --method org.gnome.Shell.SearchProvider2.GetInitialResultSet "['test']"
Expected results:
- An array of results
Actual result:
Error: Timeout was reached
and in the journal:
Oct 08 10:33:38 camille org.gnome.Weath[3726]: JS ERROR: Error: Argument str may not be null
normalizeCasefoldAndUnaccent@resource:///org/gnome/Weather/BackgroundService/js/misc/util.js:120:16
_runQuery@resource:///org/gnome/Weather/BackgroundService/js/service/searchProvider.js:83:29
GetInitialResultSetAsync@resource:///org/gnome/Weather/BackgroundService/js/service/searchProvider.js:67:18
_handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:354:35
_wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:387:34
main@resource:///org/gnome/Weather/BackgroundService/js/service/main.js:112:38
run@resource:///org/gnome/gjs/modules/script/package.js:206:19
@/app/share/org.gnome.Weather/org.gnome.Weather.BackgroundService:6:17
wjt@camille:~$ flatpak info org.gnome.Weather
Weather - Show weather conditions and forecast
ID: org.gnome.Weather
Ref: app/org.gnome.Weather/x86_64/stable
Arch: x86_64
Branch: stable
Version: 41.0
License: GPL-2.0+ and CC-BY-3.0 and CC-BY-SA-3.0
Origin: flathub
Collection: org.flathub.Stable
Installation: system
Installed: 7.0 MB
Runtime: org.gnome.Platform/x86_64/41
Sdk: org.gnome.Sdk/x86_64/41
Commit: e0dadc57600a946c227a37130d3b8e137bf2ad417c440ca909a103f651315b09
Parent: 92c42fd2e7cefc91a817f50c14dd2e8fe2ad54e4c457596463c717e5b5a933c9
Subject: Update to GNOME 41 (d4b35346)
Date: 2021-09-27 01:59:12 +0000
I briefly looked at the code and the failing line is:
let city = Util.normalizeCasefoldAndUnaccent(location.get_city_name());
gweather_location_get_city_name()
's documentation says:
* Return value: (allow-none): @loc's city name, or %NULL