Bug 417078

Summary: Unhelpful "Aborted due to failure" error message sometimes appears when updating Flatpak apps
Product: [KDE Neon] neon Reporter: benji.matta
Component: generalAssignee: Neon Bugs <neon-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, benji.matta, bugseforuns, cassim2972, grimaldi.ivan, jgrulich, jr, nate, neon-bugs-null, sitter
Priority: HI    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screen of window with error message
screenshot just before error message appears

Description benji.matta 2020-02-02 21:30:03 UTC
Created attachment 125630 [details]
screen of window with error message

SUMMARY
In Discover, Updates tab lists several packages that need to be updated. Whether updating all or each package individually, the update fails with message "Aborted due to failure".

STEPS TO REPRODUCE
1. Software center > Updates > 
2. Update all, OR
3. Update selected

OBSERVED RESULT
Error message appears "Aborted due to failure"

EXPECTED RESULT
Package should update

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION
Comment 1 benji.matta 2020-02-02 21:33:17 UTC
Created attachment 125631 [details]
screenshot just before error message appears
Comment 2 Nate Graham 2020-02-05 20:13:35 UTC
Ugh, "Aborted due to Failure." I've gotten that from time to time and it always sucks.

Aleix, can we show a more complete or descriptive error message here so the user at least has some idea of how to proceed?
Comment 3 Nate Graham 2020-02-18 22:53:19 UTC
*** Bug 417845 has been marked as a duplicate of this bug. ***
Comment 4 benji.matta 2020-02-19 04:44:07 UTC
i don't know what i did (except perform a system upgrade) and the problem seems to be resolved.
Anyway, thanks for looking into it
Comment 5 Aleix Pol 2020-02-21 20:25:12 UTC
This happens as far as I know due to a bug that libflatpak used to have. It shouldn't be a thing anymore, I haven't seen it for a while.

When I had it, it was just flatpak freaking out. It's hard to react properly to faulty software. :(
Comment 6 Nate Graham 2020-02-21 20:26:49 UTC
I saw it last week and the duplicate bug 417845 was filed three days ago. Looks like it's still happening.

Do you have a link to the upstream issue that was causing this?

More generally, we need better error strings. :)
Comment 7 Nate Graham 2020-02-26 18:59:44 UTC
*** Bug 418222 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2020-02-26 19:00:05 UTC
New duplicate with a crash report in it: Bug 418222.
Comment 9 Aleix Pol 2020-02-27 01:53:26 UTC
Can someone try to reproduce by updating one of the packages from the terminal (flatpak update package.name) and see if you get an error such as:

Warning: Failed to install org.freedesktop.Platform.openh264/x86_64/19.08: Error deploying: While trying to apply extra data: runtime/org.freedesktop.Platform/x86_64/19.08 not installed

?
Comment 10 Patrick Silva 2020-02-27 10:45:22 UTC
I can confirm that error message while installing celluloid player.
Comment 11 Aleix Pol 2020-02-27 15:36:35 UTC
Git commit f6426073bc09757395dd3325a0185a7a9c5767fd by Aleix Pol.
Committed on 27/02/2020 at 15:36.
Pushed by apol into branch 'Plasma/5.18'.

flatpak: include more information on the transaction error message

M  +19   -1    libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp
M  +4    -2    libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h

https://commits.kde.org/discover/f6426073bc09757395dd3325a0185a7a9c5767fd
Comment 12 Patrick Silva 2020-09-13 19:32:32 UTC
A few minutes ago I got this unhelpful error message again when I tried to install a flatpak package. Here is the output when I tried to install the same package via Konsole:

$ flatpak install gnome-nightly org.gnome.SoundRecorderDevel
Looking for matches…
Required runtime for org.gnome.SoundRecorderDevel/x86_64/master (runtime/org.gnome.Platform/x86_64/master) found in remote gnome-nightly
Do you want to install it? [Y/n]: 

org.gnome.SoundRecorderDevel permissions:
    ipc      fallback-x11         pulseaudio      wayland     x11
    dri      file access [1]      tags [2]

    [1] ~/Recordings
    [2] nightly


        ID                                      Branch    Op    Remote          Download
 1. [✗] org.freedesktop.Platform.GL.default     20.08     u     flathub         < 42,3 MB
 2. [✗] org.freedesktop.Platform.VAAPI.Intel    20.08     u     flathub         < 11,2 MB
 3. [✗] org.freedesktop.Platform.openh264       2.0       u     flathub          < 1,5 MB
 4. [✓] org.gnome.Platform.Locale               master    i     gnome-nightly    480,3 kB / 332,5 MB
 5. [✓] org.gnome.Platform                      master    i     gnome-nightly    169,3 MB / 361,0 MB
 6. [✓] org.gnome.SoundRecorderDevel.Locale     master    i     gnome-nightly     17,4 kB / 194,2 kB
 7. [✓] org.gnome.SoundRecorderDevel            master    i     gnome-nightly    272,4 kB / 357,2 kB

Warning: Server returned status 404: Not Found
Warning: Server returned status 404: Not Found
Warning: Server returned status 404: Not Found
Changes complete.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.80
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.0
Comment 13 Nate Graham 2020-12-07 17:34:47 UTC
*** Bug 430043 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2020-12-10 14:42:35 UTC
*** Bug 426729 has been marked as a duplicate of this bug. ***
Comment 15 Aleix Pol 2021-03-25 03:00:13 UTC
I haven't seen this issue, I'm inclined to think that it's been addressed upstream.
Comment 16 Patrick Silva 2021-06-19 11:21:20 UTC
This bug report is still relevant.
Currently I can't install Chromium btowser on neon unstable,
Discover just says "Aborted due to failure".
Command line says "Error: org.chromium.Chromium needs a later
flatpak version
error: Failed to install org.chromium.Chromium: app/org.chromium.Chromium/x86_64/stable needs a later flatpak version (1.8.2)".

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.3
Graphics Platform: Wayland
Comment 17 Aleix Pol 2021-07-06 14:25:59 UTC
Then as it stands it's just a problem in neon because it doesn't have a version that is new enough. Assigning.
Comment 18 Patrick Silva 2021-07-06 14:40:12 UTC
flatpak comes from ubuntu repositories.
Discover should display an helpfull error message even when occurs
some problem related to version of installed flatpak.
Comment 19 Aleix Pol 2021-07-06 14:44:09 UTC
I'm not sure, neon should work.

The only helpful thing Discover could do is to update flatpak itself.
Comment 20 Jonathan Riddell 2021-07-15 13:50:40 UTC
flatpak in neon is now at 1.10.2
Comment 21 Patrick Silva 2021-07-16 01:22:03 UTC
Thank you Jonathan. :)

Now I'm able to install Chromium via Konsole, but Discover is still
failing with "Aborted due to failure" message even after reboot.
Comment 22 Aleix Pol 2021-12-19 03:47:46 UTC
As of https://github.com/flatpak/flatpak/pull/4606 we shouldn't see more "aborted due to failure" anymore.

The fact the error message didn't work makes it impossible to get to the root of the problem here, so I'm going to mark it as fixed. Please open bug reports with the new error when it happens or with whatever you get. 

Some of the issues reported here have been already been addressed anyway (mostly upstream I presume).