Bug 445596 - Discover is unable to open a .flatpakref file whose repo is not activated on my system
Summary: Discover is unable to open a .flatpakref file whose repo is not activated on ...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Flatpak Backend (show other bugs)
Version: master
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-16 16:47 UTC by Patrick Silva
Modified: 2021-12-18 16:35 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24
Sentry Crash Report:


Attachments
screenshot (147.48 KB, image/png)
2021-11-16 16:49 UTC, Patrick Silva
Details
screeen recording (671.91 KB, video/x-matroska)
2021-12-18 16:19 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2021-11-16 16:47:43 UTC
STEPS TO REPRODUCE
1. make user AppCenter flatpak repo is not activated on your system
2. go to https://appcenter.elementary.io/com.github.phase1geo.annotator/
3. download the flatpakref file by clicking on "Download as Flatpak" button
4. try to open the downloaded flatpakref file with Discover

OBSERVED RESULT
Discover fails to open the downloaded flatpakref file. Please see the attached screenshot. 
Disvover opens the flatpakref file as expected after installing it via cli.

EXPECTED RESULT
Discover opens the flatpakref file and we are able to install it.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.23.80
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.3
Graphics Platform: X11
Comment 1 Patrick Silva 2021-11-16 16:49:03 UTC
Created attachment 143634 [details]
screenshot
Comment 2 Nate Graham 2021-11-23 19:49:37 UTC
Confirmed.
Comment 3 Bug Janitor Service 2021-11-26 03:46:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/212
Comment 4 Aleix Pol 2021-12-13 19:21:16 UTC
Git commit 538f1400acc611737bff233f5715909a9b55b1ac by Aleix Pol.
Committed on 13/12/2021 at 14:03.
Pushed by ngraham into branch 'master'.

Flatpak: Fix loading apps from alien flatpakref files

So far it wasn't working well, we were relying on adding the source then
loading the resoruce which is a rather weird way to go for this.
Instead, now we are loading the appstream metadata locally to extract
the component and get all the metadata which gets eventually cleaned up.

M  +96   -39   libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
M  +1    -1    libdiscover/backends/FlatpakBackend/FlatpakResource.h
M  +19   -13   libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp
M  +2    -0    libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.h

https://invent.kde.org/plasma/discover/commit/538f1400acc611737bff233f5715909a9b55b1ac
Comment 5 Patrick Silva 2021-12-18 15:47:53 UTC
it's still reproducible.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.23.80
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.3
Graphics Platform: Wayland
Comment 6 Nate Graham 2021-12-18 16:08:25 UTC
This is working perfectly for me with those changes and the fpltpak file linked to in the description. Can you provide a screen recording that shows the issue? I wonder if the change hasn't gotten into Neon Unstable yet for some reason.
Comment 7 Patrick Silva 2021-12-18 16:19:22 UTC
Created attachment 144650 [details]
screeen recording
Comment 8 Nate Graham 2021-12-18 16:35:41 UTC
Ok, as I suspected, you don't seem to be running with the changes applied. I suspect a Neon packaging bug. Hopefully it's just a case of Discover needing to be updated and pushed out as an update.