Bug 468657

Summary: Aborted due to failure (While pulling ... from remote flathub: opcode set-read-source: Opening content object ...: Opening content object ...: Couldn't find file object '...')
Product: [Applications] Discover Reporter: Timothée Ravier <travier>
Component: Flatpak BackendAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, jgrulich, madLyfe, nate, putr4.s, roshisan, travier
Priority: VHI    
Version: 5.27.4   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 6.2.0
Sentry Crash Report:

Description Timothée Ravier 2023-04-18 15:29:10 UTC
SUMMARY

Parallel transactions (installations/updates) are likely confusing ostree and large Flatpak App and Runtime updates are failing with errors. Here an example where the Freedesktop SDK update:

```
Aborted due to failure (While pulling runtime/org.freedesktop.Platform.GL.default/x86_64/22.08 from remote flathub: opcode set-read-source: Opening content object be32b7be35974cc1c244e8ebf6cb267587d74ecf82a9cb6e9fd5993211e35ced: Opening content object be32b7be35974cc1c244e8ebf6cb267587d74ecf82a9cb6e9fd5993211e35ced: Couldn't find file object 'be32b7be35974cc1c244e8ebf6cb267587d74ecf82a9cb6e9fd5993211e35ced')

Aborted due to failure (While pulling runtime/org.freedesktop.Platform.GL.default/x86_64/22.08 from remote flathub: opcode set-read-source: Opening content object be32b7be35974cc1c244e8ebf6cb267587d74ecf82a9cb6e9fd5993211e35ced: Opening content object be32b7be35974cc1c244e8ebf6cb267587d74ecf82a9cb6e9fd5993211e35ced: Couldn't find file object 'be32b7be35974cc1c244e8ebf6cb267587d74ecf82a9cb6e9fd5993211e35ced')

Aborted due to failure (While pulling runtime/org.freedesktop.Platform.GL.default/x86_64/22.08 from remote flathub: opcode set-read-source: Opening content object be32b7be35974cc1c244e8ebf6cb267587d74ecf82a9cb6e9fd5993211e35ced: Opening content object be32b7be35974cc1c244e8ebf6cb267587d74ecf82a9cb6e9fd5993211e35ced: Couldn't find file object 'be32b7be35974cc1c244e8ebf6cb267587d74ecf82a9cb6e9fd5993211e35ced')
```

STEPS TO REPRODUCE
1. Have a large, multi runtime / apps / sdk update
2. Update using Discover

OBSERVED RESULT

Errors as above

EXPECTED RESULT

No errors

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.9-300.fc38.x86_64 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION

See https://invent.kde.org/plasma/discover/-/merge_requests/281
Comment 1 Timothée Ravier 2023-04-18 15:37:03 UTC
Another way to trigger this failure is to run `flatpak update` while Discover is doing an update.
Comment 2 Nate Graham 2024-02-06 22:28:56 UTC
*** Bug 480761 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2024-09-20 18:48:43 UTC
This error is all over the internet making us look bad: https://duckduckgo.com/?q=%22aborted+due+to+failure%22&t=ffab&ia=web. My wife hits is semi-regularly too.

I think we need to take greater pains to protect the user from this error, either by doing what we can on our side to fix it, or else at least wrapping it in more user-friendly padding like we do for packagekit update errors.
Comment 4 Bug Janitor Service 2024-09-23 13:34:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/937
Comment 5 Akseli Lahtinen 2024-09-26 10:14:14 UTC
Git commit fcb723d3b988b9afdfe97a884b16ad8736916943 by Akseli Lahtinen.
Committed on 26/09/2024 at 10:14.
Pushed by akselmo into branch 'master'.

DiscoverWindow.qml: Port message OverlaySheet to Dialog and make it friendlier

Currently the passiveMessage dialog in DiscoverWindow is a bit too in-your-face with the errors, causing sadness and confusion with users.
It also used Kirigami.OverlaySheet even it is more of a dialog.

This MR makes it use Kirigami.Dialog features and hides the technical details behind a button, plus gives it a friendlier message.
Related: bug 482551
FIXED-IN: 6.2.0

M  +49   -50   discover/qml/DiscoverWindow.qml

https://invent.kde.org/plasma/discover/-/commit/fcb723d3b988b9afdfe97a884b16ad8736916943
Comment 6 Akseli Lahtinen 2024-09-26 12:10:13 UTC
Git commit ffd87c84563e4dd30d125065ac1ab4f1a8517801 by Akseli Lahtinen.
Committed on 26/09/2024 at 12:05.
Pushed by akselmo into branch 'Plasma/6.2'.

DiscoverWindow.qml: Port message OverlaySheet to Dialog and make it friendlier

Currently the passiveMessage dialog in DiscoverWindow is a bit too in-your-face with the errors, causing sadness and confusion with users.
It also used Kirigami.OverlaySheet even it is more of a dialog.

This MR makes it use Kirigami.Dialog features and hides the technical details behind a button, plus gives it a friendlier message.
Related: bug 482551
FIXED-IN: 6.2.0


(cherry picked from commit fcb723d3b988b9afdfe97a884b16ad8736916943)

ea6a8f09 Move buttons to footer
9be1e908 Hide technical details under friendly message
0506fc4b Format
7a1835d0 change overlaysheet to dialog
1b8bc04d Use more reasonable preferred size
dd6ec741 Add padding
c596e6a0 Change message to be more generic
42924901 Use customFooterActions
bb0826c6 Cleanups
6ad94806 Revert some formatter stuff
c951839b Remove leftovers from overlaysheet changes

Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev>

M  +49   -50   discover/qml/DiscoverWindow.qml

https://invent.kde.org/plasma/discover/-/commit/ffd87c84563e4dd30d125065ac1ab4f1a8517801
Comment 7 Prajna Sariputra 2024-09-26 13:02:59 UTC
This bug has been marked as fixed, but as I understand it the relevant change is just letting the user know that they can try again later (which will probably work), but the underlying problem of Discover failing to update Flatpaks when there are many of them is still present.

So, is this bug report meant to be closed, given that users may still run into the problem, just with a nicer error message? The MR that makes Discover do Flatpak updates sequentially (and thus fixing the issue of Flatpak/OSTree not liking parallel updates) is still open, and the last comment on it says that it does fix this issue and is ready to be merged, although that was over a year ago now: https://invent.kde.org/plasma/discover/-/merge_requests/281
Comment 8 Nate Graham 2024-09-26 13:34:34 UTC
Yes, this wraps the error message in some bubble-wrap. A fix to make it not happen in the first place needs to come from Flatpak. It's not Discover's bug, it's Flatpak's bug, and Discover is just passing it on to the user.