elementary / elementary/appcenter
Fails to load appstream on OS 9
- Dominant language
- Vala
- Stars
- 554
- Forks
- 104
- Avg merge
- 15h 57m
- Merged PRs (30d)
- 2
Description
### What Happened?
On OS 9 appcenter fails to load the appstream xml file. This will cause appcenter to be unusable because no apps ever show up. (see the logs for whats printed)
Some debugging i did:
- it fails in the `FlatpakBackend` in `perform_xml_fixups`
- there it tries to parse the given file as an xml and that fails with the parser saying already for the first line: `appstream.xml.gz:1: parser error : Start tag expected, '<' not found`
- there were recent changes in the area (#2441) but even with that reverted it doesn't work
- I checked and the file is there
- the thing is it does make sense that it fails because we try to parse a gzip archive directly as xml. But why did it work before?
- If we change the code that calls the perform_xml_fixups to use the .xml file directly (the unpacked xml file is in the same directory) it works but I'm not sure if that has some more implications?
### Steps to Reproduce
1. install os 9
2. open appcenter
3. no apps, no updates, nothing
### Expected Behavior
appcenter should show apps
### OS Version
Early Access
### OS Architecture
amd64 (on most hardwares)
### Session Type
Secure Session (Wayland, This is the default)
### Software Version
Early Access or Compiled from git
### Log Output
```shell
/home/leonhard/.local/share/flatpak/appstream/appcenter/x86_64/active/appstream.xml.gz:1: parser error : Start tag expected, '<' not found
^
** (io.elementary.appcenter:93061): WARNING **: 11:49:12.048: FlatpakBackend.vala:1480: Appstream XML file /home/leonhard/.local/share/flatpak/appstream/appcenter/x86_64/active/appstream.xml.gz not found or permissions missing
/home/leonhard/.local/share/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz:1: parser error : Start tag expected, '<' not found
^
** (io.elementary.appcenter:93061): WARNING **: 11:49:14.960: FlatpakBackend.vala:1480: Appstream XML file /home/leonhard/.local/share/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz not found or permissions missing
/var/lib/flatpak/appstream/appcenter/x86_64/active/appstream.xml.gz:1: parser error : Start tag expected, '<' not found
^
** (io.elementary.appcenter:93061): WARNING **: 11:49:16.415: FlatpakBackend.vala:1480: Appstream XML file /var/lib/flatpak/appstream/appcenter/x86_64/active/appstream.xml.gz not found or permissions missing
/var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz:1: parser error : Start tag expected, '<' not found
^
** (io.elementary.appcenter:93061): WARNING **: 11:49:19.436: FlatpakBackend.vala:1480: Appstream XML file /var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz not found or permissions missing
```
### Hardware Info
_No response_
Contributor guide
Research direction
Reproduce the failure on OS 9 and start at FlatpakBackend.vala:1480, especially the perform_xml_fixups path that receives appstream.xml.gz. Compare the compressed file with the unpacked appstream XML in the same directory and verify the chosen input works for both user and system Flatpak locations. Done means AppCenter loads app listings and updates without the parser errors.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100