Bug 2124857

Summary: Flathub Selection repo can't be enabled and used in Gnome-Software, bad signature
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: flatpakAssignee: David King <amigadave>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 37CC: amigadave, awilliam, debarshir, dlrobin874, gnome-sig, klember, mail, mcrha, rhughes, robatino
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedBlocker
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-13 12:06:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2009539    
Attachments:
Description Flags
screenshot of the error
none
journal
none
rpm -qa none

Description Kamil Páral 2022-09-07 09:54:56 UTC
Created attachment 1910094 [details]
screenshot of the error

Description of problem:
If I try to enable Fedora Flathub Selection repo in gnome-software, I get an error about bad key signature, see the screenshot. When I try to search for apps included in that repo (minecraft, bitwarden, zoom), they are not found. However, the apps can be found using "flatpak search", and they also can be found if I kill gnome-software and start it again (or reboot).

Version-Release number of selected component (if applicable):
gnome-software-43.rc-1.fc37.x86_64
flatpak-1.13.3-6.fc37.x86_64

How reproducible:
always

Steps to Reproduce:
1. install F37 Workstation (Beta 1.5 or earlier and update)
2. accept all defaults in initial setup (i.e. don't enable third-party repos when offered)
3. open gnome-software -> software repositories
4. enable Fedora Flathub Selection
5. see the error pop up after a while
6. search for minecraft/bitwarden/zoom, can't be found
7. use "flatpak search minecraft", see that it finds it
8. killall gnome-software, run gnome-software again and see that you can find the apps

Comment 1 Kamil Páral 2022-09-07 09:55:26 UTC
Created attachment 1910095 [details]
journal

Comment 2 Kamil Páral 2022-09-07 09:55:34 UTC
Created attachment 1910096 [details]
rpm -qa

Comment 3 Kamil Páral 2022-09-07 09:59:15 UTC
Proposing as a Final blocker:
"The default graphical package manager for a given software type must appropriately: 
Configure software sources by enabling/disabling pre-defined official repositories and then adjust the available software pool accordingly"
https://fedoraproject.org/wiki/Fedora_37_Final_Release_Criteria#Installing,_removing_and_updating_software

A similar bug 2074121 was accepted as a blocker in the past.

Comment 4 Kamil Páral 2022-09-07 10:10:11 UTC
Possibly related:
https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1885

Comment 5 Milan Crha 2022-09-07 11:09:22 UTC
I do not know how these things work. Where does it get the signature/keys? Let's move to the flatpak, I do not think gnome-software does any verification of this kind for the flatpak installations.

Comment 6 Kamil Páral 2022-09-07 11:37:37 UTC
When I try to sidestep gnome-software completely, I can enable third-party repos from the terminal (I'm not sure how to enable only fedora flathub selection repo, so I enable all of them) and searching works fine:

$ sudo fedora-third-party enable
$ fedora-third-party query
Third-party repositories are enabled.
$ flatpak remotes
Name    Options
fedora  system,oci
flathub system,filtered
$ flatpak search minecraft
Name   Description                     Application ID    Version  Branch Remotes
Minec… Create your own world in one o… …mojang.Minecraft 1.0.1221 stable flathub

Also, gnome-software seems to frequently crash while running "fedora-third-party enable", but abrt doesn't allow me to report it because of "low informational value". The FAF link is here:
https://retrace.fedoraproject.org/faf/reports/84695/
Not sure if this is related to the "bad signature" error, but so far, this feels like a problem in gnome-software rather than the flatpak stack.

Comment 7 Milan Crha 2022-09-07 11:56:12 UTC
That FAF report is useless, no backtrace there.

Could you install debuginfo for flatpak/libflatpak and gnome-software, then:

   $ gnome-software --quit
   $ gdb gnome-software --batch --ex r --ex bt --ex "t a a bt" &>log.txt

and then reproduce the crash to get the backtrace, please? Ideally open a new bug for it, to not mix unrelated things together.

As long as flatpak is involved, I'd think of [1], because it can strike anywhere.

[1] https://github.com/flatpak/flatpak/issues/3701

Comment 8 Kamil Páral 2022-09-07 12:20:47 UTC
(In reply to Milan Crha from comment #7)
> and then reproduce the crash to get the backtrace, please? Ideally open a
> new bug for it, to not mix unrelated things together.

Done, see bug 2124907

Comment 9 Dan Robinson 2022-09-11 01:24:25 UTC
Just installed Silverblue 37 Beta and I'm getting the same warning about a key as in the original screenshot but when trying to install software. The software seems to end up installing fine though. Is that related or should I open a new bug on that?

Comment 10 Milan Crha 2022-09-12 05:27:31 UTC
I guess it's the same thing, but I do not know for sure.

Comment 11 Adam Williamson 2022-09-12 15:59:15 UTC
+5 in https://pagure.io/fedora-qa/blocker-review/issue/898 , marking accepted.

Comment 12 Adam Williamson 2022-09-12 18:34:44 UTC
Kamil, there's a request in the upstream issue for a `--verbose` log from gnome-software for this one...can you get it? I tried, but I couldn't reproduce the bug.

Comment 13 Milan Crha 2022-09-13 07:07:22 UTC
Please note that this is currently filled for flatpak. I need an information from the flatpak developers to explain where the error comes from. They may also know why and how to fix it. Meaning: the upstream bug is filled against gnome-software, but I'm not certain the problem is with the gnome-software itself.

Comment 14 Kamil Páral 2022-09-13 12:06:44 UTC
I can't reproduce the problem any longer, so I guess flatpak 1.14.0 fixed it.