Bug 1790238 - gnome-shell search provider does not work
Summary: gnome-shell search provider does not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Stransky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-12 21:25 UTC by Christian Stadelmann
Modified: 2020-06-28 08:32 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-06-28 08:32:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
PDF exported from bustler (44.40 KB, application/pdf)
2020-01-14 17:50 UTC, Christian Stadelmann
no flags Details
pcap file from a *different* capture (55.24 KB, application/vnd.tcpdump.pcap)
2020-01-14 17:54 UTC, Christian Stadelmann
no flags Details
pcap file from a *different* capture with "Deadbeef" as bookmark in firefox (123.12 KB, application/vnd.tcpdump.pcap)
2020-01-14 17:59 UTC, Christian Stadelmann
no flags Details

Description Christian Stadelmann 2020-01-12 21:25:23 UTC
Version-Release number of selected component (if applicable):
firefox-72.0.1-1.fc31.x86_64

How reproducible:
always

Steps to Reproduce:
1. In gnome system settings, make sure that firefox is enabled under "search"
2. go to gnome-shell activities overview
3. search for something you know is in your firefox bookmarks or firefox search providers

Actual results:
gnome-shell does not display anything from firefox. Instead, this error message is printed to syslog:

> Invalid result meta returned from search provider firefox.desktop

Expected results:
display search results from firefox

Additional info:
I have multiple firefox profiles.

Some other sporadic error messages from syslog:

> Received error from DBus search provider firefox.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable

and

> Received error from DBus search provider firefox.desktop: Gio.IOErrorEnum: Methode »org.gnome.Shell.SearchProvider2.GetInitialResultSet« gab Typ »()« zurück, aber »(as)« wurde erwartet

which translates to:
> Received error from DBus search provider firefox.desktop: Gio.IOErrorEnum: Method »org.gnome.Shell.SearchProvider2.GetInitialResultSet« returned type »()«, but »(as)« was expected

Comment 1 Martin Stransky 2020-01-13 07:00:43 UTC
The gnome-shell searcher is active only when Firefox is running. Can you inspect your DBus interface that Firefox search provider is actually here?
Install D-Feet dbus inspection tool (dnf install dfeet), switch to session bus and check if org.mozilla.Firefox.SearchProvider is there.
Thanks.

Comment 2 Christian Stadelmann 2020-01-13 09:46:14 UTC
(In reply to Martin Stransky from comment #1)
> The gnome-shell searcher is active only when Firefox is running. Can you
> inspect your DBus interface that Firefox search provider is actually here?
> Install D-Feet dbus inspection tool (dnf install dfeet), switch to session
> bus and check if org.mozilla.Firefox.SearchProvider is there.
> Thanks.

Dear Martin, thanks for your quick response!

Yes, that happens when firefox is running. I see org.mozilla.Firefox.SearchProvider in the d-feet session bus list. Is there anything else you need to know about it?

There is also another dbus element on my session bus, `org.mozilla.firefox.bWFpg__`. It has the same two object paths as org.mozilla.Firefox.SearchProvider: `/org/mozilla/Firefox/SearchProvider` and `/org/mozilla/firefox/Remote`

PS: The tool is "d-feet" and thus `dnf install d-feet`.

Comment 3 Christian Stadelmann 2020-01-13 09:48:55 UTC
(forgot to clear the needinfo flags)

Comment 4 Martin Stransky 2020-01-14 07:21:48 UTC
I see, Thanks. In this case we may need Bustle. 

Please install by "dnf install bustle" and then run, start recording dbus session and try to search something. Bustle records dbus traffic and provides complete log.
Look for Firefox search provider and how the responses are handled. Also please attach the bustle log here.

Thanks.

Comment 5 Christian Stadelmann 2020-01-14 17:50:57 UTC
Created attachment 1652269 [details]
PDF exported from bustler

I could get some data from bustler and it looks like it firefox itself works, only the shell does not show results. I searched just for the letter "g".

The first method call has this metadata:
Type: Method call
Sender: :1.8
Destination: :1.240
Path: /org/mozilla/Firefox/SearchProvider
Member: org.gnome.Shell.SearchProvider2.GetInitialResultSet
Arguments: @as ["g"]

The first method return has this metadata:
Type: Method return
Sender: :1.240
Destination: :1.8
Path: /org/mozilla/Firefox/SearchProvider
Member: org.gnome.Shell.SearchProvider2.GetInitialResultSet
Arguments: @as ["00:URL_REDACTED", "01:URL_REDACTED", "02:URL_REDACTED", "03:URL_REDACTED", "04:URL_REDACTED", "05:URL_REDACTED", "06:URL_REDACTED", "07:URL_REDACTED", "08:URL_REDACTED", "special:search:g"]


The second method call has this metadata:
Type: Method call
Sender: :1.8
Destination: :1.240
Path: /org/mozilla/Firefox/SearchProvider
Member: org.gnome.Shell.SearchProvider2.GetResultMetas
Arguments: @as ["00:URL_REDACTED", "01:URL_REDACTED", "02:URL_REDACTED", "03:URL_REDACTED", "04:URL_REDACTED", "special:search:g"]

The second method return has this metadata:
Type: Method return
Sender: :1.240
Destination: :1.8
Path: /org/mozilla/Firefox/SearchProvider
Member: org.gnome.Shell.SearchProvider2.GetResultMetas
But now the "Arguments" is a gigantic answer which may be too large for gnome-shell to parse.

Comment 6 Christian Stadelmann 2020-01-14 17:54:35 UTC
Created attachment 1652271 [details]
pcap file from a *different* capture

Now I tried again with just a single copy-pasted string, "deadbeef". Interestingly, Firefox did not even return the "special:search:deadbeef" entry in its answer to org.gnome.Shell.SearchProvider2.GetInitialResultSet. This looks wrong to me.

Comment 7 Christian Stadelmann 2020-01-14 17:59:49 UTC
Created attachment 1652273 [details]
pcap file from a *different* capture with "Deadbeef" as bookmark in firefox

Now, I bookmarked the Deadbeef wikipedia page (https://en.wikipedia.org/wiki/Deadbeef) and repeated the previous steps again. This time, Firefox responds as expected to both GetInitialResultSet and GetResultMetas, although I have not checked the format of the GetResultMetas answer. Anyway, gnome-shell still displays no results.

Comment 8 Christian Stadelmann 2020-01-14 18:01:56 UTC
In all three cases I disabled all search providers but Firefox. I had only a single firefox instance running.

Comment 9 Martin Stransky 2020-01-15 12:40:27 UTC
(In reply to Christian Stadelmann from comment #5)
> The second method call has this metadata:
> Type: Method call
> Sender: :1.8
> Destination: :1.240
> Path: /org/mozilla/Firefox/SearchProvider
> Member: org.gnome.Shell.SearchProvider2.GetResultMetas
> Arguments: @as ["00:URL_REDACTED", "01:URL_REDACTED", "02:URL_REDACTED",
> "03:URL_REDACTED", "04:URL_REDACTED", "special:search:g"]
> 
> The second method return has this metadata:
> Type: Method return
> Sender: :1.240
> Destination: :1.8
> Path: /org/mozilla/Firefox/SearchProvider
> Member: org.gnome.Shell.SearchProvider2.GetResultMetas
> But now the "Arguments" is a gigantic answer which may be too large for
> gnome-shell to parse.

GetResultMetas and a reply to it it's a key part of the search provider. I'd need the "Arguments" from GetResultMetas which are send from Firefox to gnome-shell. Can you for instance copy it to a text file, zip it and attach here?

Thanks.

Comment 10 Martin Stransky 2020-01-15 12:42:10 UTC
btw. only history is searched right now, bookmarks are ignored.

Comment 11 Christian Stadelmann 2020-01-22 19:32:55 UTC
(In reply to Martin Stransky from comment #9)
> […]
> GetResultMetas and a reply to it it's a key part of the search provider. I'd
> need the "Arguments" from GetResultMetas which are send from Firefox to
> gnome-shell. Can you for instance copy it to a text file, zip it and attach
> here?
> […]

I'd rather not attach it here as it contains some private information. Is it ok if I send it to you via E-Mail?

Anyway, as the other two retries (see comment #6 and comment #7) also don't work in gnome-shell, I think you already do have a minimal working case. Gnome-shell gets data from Firefox but does not display anything, so I guess the shell needs debugging.

(In reply to Martin Stransky from comment #10)
> btw. only history is searched right now, bookmarks are ignored.

In my case that does not matter because as you can see in the pcap file in comment #7, even the simplest case, a single url in firefox, firefox does send data to gnome-shell, but gnome-shell does not display anything. In this case the website was both bookmarked and visited.

Comment 12 Martin Stransky 2020-01-22 22:25:22 UTC
(In reply to Christian Stadelmann from comment #11)
> (In reply to Martin Stransky from comment #9)
> > […]
> > GetResultMetas and a reply to it it's a key part of the search provider. I'd
> > need the "Arguments" from GetResultMetas which are send from Firefox to
> > gnome-shell. Can you for instance copy it to a text file, zip it and attach
> > here?
> > […]
> 
> I'd rather not attach it here as it contains some private information. Is it
> ok if I send it to you via E-Mail?

Yes, that's fine, thanks.

> Anyway, as the other two retries (see comment #6 and comment #7) also don't
> work in gnome-shell, I think you already do have a minimal working case.
> Gnome-shell gets data from Firefox but does not display anything, so I guess
> the shell needs debugging.
> 
> (In reply to Martin Stransky from comment #10)
> > btw. only history is searched right now, bookmarks are ignored.
> 
> In my case that does not matter because as you can see in the pcap file in
> comment #7, even the simplest case, a single url in firefox, firefox does
> send data to gnome-shell, but gnome-shell does not display anything. In this
> case the website was both bookmarked and visited.

I think the metadata sent back to gnome-shell are somehow corrupted so I'd need to investigate the Metadata reply.

Comment 13 Christian Stadelmann 2020-06-28 08:32:11 UTC
It works now with firefox-77.0.1-2.fc32.x86_64 and gnome-shell-3.36.3-3.fc32.x86_64. I don't exactly know since when though.


Note You need to log in before you can comment on or make changes to this bug.