Just before the 24.04 release, I had a problem out of the blue updating Flatpaks via Discover. Previously Flatpaks updated just fine, now whenever I try to update Flatpaks I get the error:
While trying to apply extra data: apply_extra script failed, exit status 256
Oddly enough, when I try to update via terminal using:
sudo flatpak update
It’s stated “Nothing to do”.
What gives? I’ve tried sudo flatpak repair, it goes through the verification process and then states:
Pruning objects
Erasing .removed
But upon opening Discover the problematic flatpak’s are still present and will not update citing the exact same error?
Anyone able to assist? I don’t understand how Discover thinks there’s updates present, but terminal states there’s nothing to do?
❯ pamac update
Preparing...
==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required to install, update, or remove packages
Authenticating as: ben
Password:
As you can see, I do not need to run pamac with sudo for it to work - this is a better way of working…
The same is true with many KDE Plasma applications, for example:
kate /etc/fstab
This will open the file for reading and editing, only asking for escalation when required.
Different commands operate differently, and it pays not to make unfounded assumptions…
To assume is to make an ASS out of U and ME.
It is better to NOT use sudo unless your command fails, or you absolutely are familiar and sure that it is required.
This is also true with most systemctl commands (I’m sick of seeing ‘sudo systemctl…’ when simply ‘systemctl’ is required and escalation is only requested when required).
Just run the command without sudo and if you get a error message that looks like sudo would be required simply follow up with a sudo !! The two Exclamation marks, to append the last command, should at least work in Bash and Bash-a-like terminals.
That is what I always do. Not because I follow that as a rule, but because I almost always forget to add sudo to begin with (in the very few cases that I need it).
As a side note systemctl with its popping up a password dialog I find annoying why can’t it ask at the Terminal (Konsole) itself when for every (other) output the Terminal is used as well.
I don’t think that’s the problem, I think we need to focus on the actual error:
While trying to apply extra data: apply_extra script failed, exit status 256
From what I can gather, the error is highlighting that an apply_extra script from within the Flatpak is trying to pull extra data, but for some reason the script is failing.
I’d say it’s a problem with a particular Flatpak application, however that doesn’t explain why the process fails under Discover, but doesn’t fail when flatpak update is run via terminal.
Today finally a Flatpak update arrived (GNOME Application Platform …) and I could try Discover for that. No Issue here. Totally strange.
But I have removed the Discover “packagekits” for the NON Flatpak stuff and use Discover solely for Flatpak. (For off-topic reasons) And when I handle other updates from command line I throw in the Flatpak update as well most of the time.
Maybe there is really some other, not directly Flatpak related, thing in your installation that pulls the plug on Discover.
I have a funny feeling something’s been going on with Flathub’s servers, because I just updated a ton of Flatpak’s via Discover and they applied without a hitch.