-
-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: F: Failed to parse /var/lib/flatpak/appstream/gnome/x86_64/active/appstream.xml.gz file: Error on line 1906 char 29: <p> already set ' #5434
Comments
@barthalion I can't manage to reproduce this locally, which container base did you use? I've also been staring at the XML for minutes now and I can't seem to find any issues with it (it also validates just fine), so I think I need that whole file for some wider context. |
I am also getting this error on Pop OS (an Ubuntu derivative). Several users are also reporting the same thing here: https://www.reddit.com/r/flatpak/comments/1423zv4/failure_to_parse_appstreamxmlgz_when_running/ |
Why am I not getting it? Do I need to enable a different Flathub repo than the main one? I'm on Debian 12, Flatpak 1.14.4 |
Aha, when switching to Flatpak 1.10.8 and Debian 11, I can reproduce this issue. Immediate solution for affected distributions would be to upgrade either Flatpak or appstream-glib: I guess there is no way to deliver different metadata to older Flatpak versions, right? |
I am asking because if we can't do that, then possibly the only solutions we have is to erase all inline markup from the metadata in a postprocessing step on the server. That means we would basically ban people from making proper use of it within Flatpak for many more years, until the older Flatpak/appstream-glib combinations are so dead that we are confident that nobody uses them anymore (this especially sucks because it will not only be limited to the current XML style elements, but also future ones that appstream-glib won't handle gracefully but libappstream would. And there's quite some demand for those...). Alternatively, we could also ship a critical bugfix update to older Flatpak versions, give distributions some time to apply it, and then ignore everyone who hasn't shipped the bugfix to their users. Or, of course, try to play some server-side tricks, but given how Flatpak works I doubt we have many options there. |
:(
Stable distributions just won't. Ubuntu 22.04 comes with flatpak 1.12.7 and appstream-glib 0.7.18.
I think we would need to introduce a new
Unfortunately, it uses ostree to fetch it. So it becomes somewhat too complicated. |
Let's at least try and explore the process of running a SRU (stable release update) for 22.04 with a backported/targeted patch to make the older appstream-glib permissive to the new markup. It's a relatively small number of people to talk to and see what they think before we need to manage a giant transition and many years delay across the whole Flatpak ecosystem. I've pinged some folks on the #debian-gnome IRC channel. In the meantime, is there any backport/PPA that brings a newer flatpak+appstream combo to 22.04 & derivs we can point to? |
In the meantime, what's the recommended workaround for impatient users? I'm considering building the newest tagged version of flatpak from the code in this repo, following the instructions in CONTRIBUTING.md, but a backport/PPA as mentioned by @ramcq would of course be much more pleasant. |
The good news is that https://launchpad.net/~flatpak/+archive/ubuntu/stable?field.series_filter=jammy has Flatpak 1.14 for 22.04. The bad news is that 22.04 seems to have libappstream 0.15.2 and the Flatpak 1.14 release notes explicitly say that 0.15.3 should be used because of the fix for ximion/appstream#384. Perhaps @smcv or another kind soul would be able to update libappstream in this PPA so that we can direct 22.04 users to it. Maybe give it a try in the meantime and let us know if it helps even without that... |
To make this request more concrete/specific, it's a backport of hughsie/appstream-glib#403 plus hughsie/appstream-glib#446 (four commits total) which I believe will unblock older flatpak+appstream-glib using the updated metadata. |
I've been able to add the ppa, upgrade flatpak and now
In line with the release notes,
However, on my terminal, the actual output comes nicely at the end, so this is not a huge nuisance. |
Thanks for testing! That's a little unfortunate but we can recommend the PPA as an improvement at least. :) |
Sorry, I don't use Ubuntu myself, other than for testing. Given that, the Flatpak PPA already soaks up more of my time than I can justify, so I am not willing to include backports of things like libappstream that are more likely to have an impact outside the immediate Flatpak ecosystem. If a PPA version of libappstream causes regressions in other components like Ubuntu Software, I will not be able to put in the necessary time to diagnose and fix those regressions. If an Ubuntu developer can take over responsibility for the Flatpak PPA then that would be very welcome. If they do that, it's up to them to decide whether they are able to support a libappstream backport. It's intentionally set up as a "team" PPA on Launchpad instead of a personal repository, to avoid making me a mandatory single point of failure like Alex was for the older PPA. I don't think PPAs should be a vehicle for fixing bugs: PPAs should be for feature enhancements and similar larger changes, and long-term-support distributions should take responsibility for doing bugfix-only updates to their supported packages where the risk/benefit ratio is good enough. https://bugs.launchpad.net/ubuntu/+source/appstream/+bug/2006110 is a request for the Ubuntu developers to update their libappstream to a version that doesn't have the bug mentioned here (among other fixes). If people who have influence in Ubuntu can bring that to the attention of whoever is most appropriate, that would be very useful.
That would need a similar SRU bug report on Launchpad, but for appstream-glib rather than libappstream. I'll try to propose an equivalent stable-update for the older appstream-glib in Debian 11. (But Debian 11 will be a considerably less interesting target to support after the Debian 12 release this Saturday!) The version in Debian 11 happens to be the same upstream release that's in Ubuntu 22.04, so that would be a good basis for an Ubuntu 22.04 SRU. Debian 11 is still on Flatpak 1.10.x, and will stay on that branch forever because that's how LTS distributions' update policies work. If there was a targeted 1.10.x bugfix update for Flatpak to resolve this, then I'd look at getting that included that in Debian 11.8, but it seems like the correct place to resolve this particular problem is actually appstream-glib and not Flatpak, so there will probably not be any narrowly-targeted Flatpak change that can resolve this. There is an official backport of Debian 12's Flatpak 1.14.x into Debian 11 (also maintained by me, in |
Thanks @smcv, a Debian 11 SRU would be a great template for a corresponding Ubuntu 22.04 SRU and @seb128 has offered to sponsor into Ubuntu if we have a "this package / patch" baseline to start from. I believe the necessary libappstream-glib changes are identified in #5434 (comment) - let me know if I can help supply coffee, words of wisdom or moral support. :) |
True; PPAs to work around or fix bugs are sadpanda. However this SRU, to my eyes, fails to make a compelling case as to why |
This is the answer I had on #ubuntu-devel:
But I'm lacking time to do this |
Sure, I mean - what was the specific problem or problems with 0.15.2 that motivated you to ask for an update? :) |
I think (I haven't written why) that it was because ximion/appstream@b2649eb was hitting us at elementary but that's not something that is useful for an SRU as it only is a compile-time issue. |
Indeed, do you think creating backports for Flatpak/appstream to then-oldstable even makes sense?
True, that was a warning for "if you go higher than that version" though - 0.15.6 should actually be a pretty safe upgrade. TBH, all that's needed to fix this bug for now is to ensure these patches are applied to appstream-glib:
It would be nice to have to upgrade Flatpak and AppStream packages to newer versions too, and that would also solve this bug, but that's not essential. I think all of these patches should be in the realm of acceptable SRU for Ubuntu. The version upgrades might be a tougher call to make, but Ubuntu upgraded to new minor releases before, so maybe there's a chance. That would really be extra work though, that's non-essential to fix this bug. |
@smcv I am not using Ubuntu either, but I believe I could make that call (and do the work) of updating AppStream in that PPA, if you think that is a good idea. I've worked on Ubuntu's AppStream support with Canonical in the bast, so I believe I can ensure that such an update wouldn't break anything else (keeping the update minimal would also help). So, if you think that sounds good, I could either send you a package to upload to the PPA, or you could allow Launchpad user EDIT: Actually, this is even easier than I thought! The AppStream PPA, that I sometimes use for testing, has 0.15.4 for a long time already: https://launchpad.net/~ximion/+archive/ubuntu/appstream?field.series_filter=jammy |
Yes, it makes it very easy to copy into Ubuntu. 😁
👍
Given that jammy (0.15.2) and kinetic (0.15.5) have both got unmodified Debian imports of libappstream, and 0.15.6 was packaged for Debian, if you wanted to run debdiff or 0.15.2 -> 0.15.6 and 0.15.5 -> 0.15.6 and attach both to the Launchpad ticket @tintou opened, we can nudge Ubuntu folks for sponsorship. This is a relatively "low risk" upgrade as you point out - and Ubuntu has a polished incremental SRU roll-out machine so they might be amenable to doing it. |
There are two very different things that could be described as "backports" and I'm not sure which one you mean. For Debian 11 stable updates (the equivalent of Ubuntu's SRU process), I don't think anyone is proposing upgrading flatpak or appstream for this issue, because any change that is in-scope for a Debian 11 stable update wouldn't help. What I am proposing is upgrading appstream-glib (and only appstream-glib) with a targeted fix for this. Maintaining appstream-glib is not part of my job, so this will have to get in the queue with the other things I'm responsible for. For the official Debian 11 backports repository |
Yes, I meant the literal backports repository - backporting a whole new version into Debian 11 as a stable update would be crazy, the release team would never agree to that (and it would be hard to maintain as well). I could look into an appstream-glib targeted fix for Debian 11, but I am extremely stretched for time right now as well (even though addressing this issue does have a high priority for me), and with Debian 12 being available so soon, this doesn't have the highest priority for me either. |
Yeah, that is really not very pragmatic GLib behavior, annoyingly, and it has bitten us so many times... I can hopefully implement a much better workaround for AppStream 1.0, as that release allows for API breaks and a bit more flexibility. |
I went with the most conservative option, fixing only the issues which affect this bug. Hopefully this will translate into a faster review process and a quick update. For appstream, I attached a patch to @tintou's report, so it should now be easy to test: https://bugs.launchpad.net/ubuntu/+source/appstream/+bug/2006110 This should resolve the issue, no matter if you use the PPA or the version of Flatpak in Jammy - for Ubuntu, at least... |
I tried https://launchpad.net/~flatpak/+archive/ubuntu/stable?field.series_filter=jammy and I'm on Flatpak 1.14.4 now. It kind of fixes the issue as |
@smcv Can you (or me, if I get permission) upload the AppStream version from https://bugs.launchpad.net/ubuntu/+source/appstream/+bug/2006110 (well, a lower one, of course) to the Flatpak Stable PPA? That should create a nice workaround for users until Ubuntu updates appstream-glib in Jammy. |
Welcome to the team. Hopefully you should be able to upload there, using version |
Thank you, and done :-) And since |
I've confirmed that this version works fine in an otherwise Debian 11 container.
I opened a Debian 11 bug for this, and a proposed update with essentially the same changes as that SRU is now compiling. |
This is not really a Flatpak bug at all, so it is not actionable as part of Flatpak, and I'm going to close this as "not planned" when we have finished coordinating fixes for LTS distributions. The solution is to either:
If you upgrade to 1.14.x, seeing a lot of |
Wait I'm confused. Is FlatPak going to close this issue in a "won't fix" fashion? Or is action being taken somewhere else to fix it? |
Yes to both. This is a bug in Flatpak's dependencies, not a bug in Flatpak, so changing Flatpak will not fix it. Only fixing the dependencies will do that. |
Ah ok. I would consider that a "fix". I normally mark "won't fix" on issues that literally are not going to be fixed. So if you close it with that, maybe leave a clarifying comment? Just a thought. Thanks again for the quick action! |
I encountered this issue while searching for a package as well.
Flatpak 1.12.7 |
If you can't wait for a fix to land in Ubuntu proper, you can use the Flatpak stable PPA to resolve this: |
Confirmed, this worked flawlessly!
And I can search now.
|
@ximion Thanks, that fixed it! |
The solution on my Debian 11 vm in Chrome OS was to edit /var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml with nano and replace every < code> and </ code> with nothing. If I remember correctly I have also replace every < em> and </ em> with nothing. After that I have remove the gz with After that I have recreate the gz file by login as root with and everything was back to normal Do not try to remove the flatpak and reinstall it from git. This does not work. The problem in my situation was the html elements I mention that was inside gunziped xml. Kind Regards, NicolasLagios , MaxServices , Rocket-Path |
@nicolaslagiosrkpt This means you have likely broken your local OSTree repository now and will have to repair your Flatpak installation with |
This comment was marked as off-topic.
This comment was marked as off-topic.
Just running into this on Rocky Linux 9.3. So is flatpaks position on this they are okay with breaking every LTS style distribution that will only take major version upgrades? This is unfortunate because it blocks many distributions from using flatpaks with the version that flatpak was shipped with. And therefore removes most of the benefit flatpak had to offer - being able to install on many different platforms. I think this decision should be reconsidered - or some type of workaround given (if its there please point me to it) that doesn't require me to enable an additional repository to upgrade flatpak. For example I have Oracle Linux 7 systems that used this as well as Rocky Linux 9.3. Now I can't use flatpaks on either of those. I have only seen workarounds for debian based systems - nothing for rpm. And I can't find any rpms for updated flatpaks even on the flatpak website. Or directions how to build it. |
+1 for Oracle Linux / Rocky / Alma 9.3 fixes. It looks like this is may be "supported" by redhat (ie, its in appstream), so someone may need to open a RHEL bug. |
I found an open RHEL issue on this: https://issues.redhat.com/plugins/servlet/mobile#issue/RHEL-28856 |
This is not an issue with Flatpak, the problem is in one of its dependencies (appstream-glib).
This issue was holding Flathub back from using any new metadata features for years, and at this point I think it was just assumed that everyone has rolled out either solution 1 or 2. |
Checklist
Flatpak version
1.12.7
What Linux distribution are you using?
Ubuntu
Linux distribution version
22.04.2 LTS
What architecture are you using?
x86_64
How to reproduce
Search for packages:
flatpak search firefox
Expected Behavior
Output of the package found or not found
Actual Behavior
Additional Information
Line 1906:
Lines surrounding line 1906:
The text was updated successfully, but these errors were encountered: