# Are 'flatpak search' and 'flatpak list' broken in Rocky 9.3?

**URL:** <https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728>\
**Category:** Rocky Linux Help & Support\
**Created:** [April 24, 2024, 8:10pm UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728 "2024-04-24T20:10:37Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![xbourque](https://avatars.discourse-cdn.com/v4/letter/x/8baadc/32.png) [@xbourque](https://forums.rockylinux.org/u/xbourque)\
**Post date:** [April 24, 2024, 8:10pm UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/1 "2024-04-24T20:10:38Z")

</div>

Anyone else having wacky results from `flatpak search` and `flatpak list`? I think I’m encountering the bugs [mentionned here](https://github.com/flatpak/flatpak/issues/5434).

Is there a clean way to upgrade the flatpak package to 1.13 or above on a Rocky Linux 9 system?

Any plans by RHEL/Rocky to update the flatpak package in the repos? Is it supposed to stay frozen for the lifetime of the EL9 release?

I’m pretty sure I’m using the latest flatpak package from the Rocky repos:

```auto
rpm -q flatpak
flatpak-1.12.8-1.el9.x86_64

```

I can’t get `flatpak search` to work.

```auto
flatpak search flatseal

F: Failed to parse /var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz file: Error on line 4065 char 29: <p> already set '
      Organic Maps is a free Android & iOS offline maps app for travelers,
      tourists, hikers, drivers and cyclists.
      It uses crowd-sourced OpenStreetMap data and is developed with love by
      ' and tried to replace with ' ('
No matches found

```

I can’t get `flatpak list` to output app names reliably either (for example the Warehouse app shows as ‘Heliguy’):

```auto
 [albert@localhost ~]$ flatpak list --app --columns name,app
Name Application ID
Cassidy James Blaede com.github.cassidyjames.clairvoyant
Flatseal com.github.tchx84.Flatseal
Heliguy io.github.flattool.Warehouse
Video Trimmer org.gnome.gitlab.YaLTeR.VideoTrimmer
[albert@localhost ~]$

```

The flatpak search bug is mildly annoying since most app searching happens in the Software app (or on [flathub.org](http://flathub.org)).

The flatpak list bug is more annoying because sometimes the app id and the app name are completely different. It is very convenient to ‘grep’ the app name to get the app id.

Any suggestions anyone?

Xavier

---

<div class="post-metadata">

**Author:** ![Ritov](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@Ritov](https://forums.rockylinux.org/u/Ritov)\
**Post date:** [April 24, 2024, 9:19pm UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/2 "2024-04-24T21:19:46Z")

</div>

Upstream issue:  
[https://issues.redhat.com/browse/RHEL-28856](https://issues.redhat.com/browse/RHEL-28856)

---

<div class="post-metadata">

**Author:** ![xbourque](https://avatars.discourse-cdn.com/v4/letter/x/8baadc/32.png) [@xbourque](https://forums.rockylinux.org/u/xbourque)\
**Post date:** [April 24, 2024, 10:27pm UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/3 "2024-04-24T22:27:30Z")

</div>

Thanks for the link. So I guess it’s up to Red Hat to figure a solution and Rocky will replicate it eventually?

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [April 24, 2024, 11:45pm UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/4 "2024-04-24T23:45:17Z")

</div>

Somewhat correct. Anyone can find and contribute a solution, but due to our 1:1 / bug-for-bug compatibility goal, Rocky Linux will not implement the fix until it is implemented in RHEL.

---

<div class="post-metadata">

**Author:** ![diamantopoulos12](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@diamantopoulos12](https://forums.rockylinux.org/u/diamantopoulos12)\
**Post date:** [April 25, 2024, 3:06am UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/5 "2024-04-25T03:06:34Z")

</div>

I also found this thread: [[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 ' · Issue #5434 · flatpak/flatpak · GitHub](https://github.com/flatpak/flatpak/issues/5434)

If I am understanding correctly either flatpak or appstream-glib would need to be updated - which is unlikely to happen because rocky/rhel would only update those packages in this release for critical bugfixes.

Which means flatpak search and list will be broken in rocky until there is a new distribution version (like rocky 10 for example) that uses newer versions of flatpak.

---

<div class="post-metadata">

**Author:** ![xbourque](https://avatars.discourse-cdn.com/v4/letter/x/8baadc/32.png) [@xbourque](https://forums.rockylinux.org/u/xbourque)\
**Post date:** [April 25, 2024, 5:06am UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/6 "2024-04-25T05:06:48Z")

</div>

For what it’s worth, I think Debian is affected too:  
[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037214](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037214)

---

<div class="post-metadata">

**Author:** ![diamantopoulos12](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@diamantopoulos12](https://forums.rockylinux.org/u/diamantopoulos12)\
**Post date:** [April 25, 2024, 5:49pm UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/7 "2024-04-25T17:49:58Z")

</div>

Which seems kind of wrong of flatpak in my opinion. I get the long term support release philosophy of distros and the reluctance for them to upgrade to major versions of things. It defeats one of the main goals of flatpak to be able to easily install these packages cross platform by breaking backwards compatibility. I know it only breaks search and list but that is pretty important - without it I am reluctant to use them at all because I can’t search for anything. Flatpak shouldn’t have done this or should revert to the old way in my opinion.

---

<div class="post-metadata">

**Author:** ![Ritov](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@Ritov](https://forums.rockylinux.org/u/Ritov)\
**Post date:** [April 26, 2024, 10:11am UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/8 "2024-04-26T10:11:00Z")

</div>

Its easy to complain but the reality is more complex as it looks like. Software components have dependencies, its in the rare cases that just the component can be upgraded. The default is, that you need to upgrade the dependencies as well, and that brings you to a situation where a significant part of the distro must be upgraded. Therefore backports are done → [Security Backporting Practice - Red Hat Customer Portal](https://access.redhat.com/security/updates/backporting/)

---

<div class="post-metadata">

**Author:** ![Ritov](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@Ritov](https://forums.rockylinux.org/u/Ritov)\
**Post date:** [April 26, 2024, 10:48am UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/9 "2024-04-26T10:48:04Z")

</div>

It seems that a new libappstream-glib package will arrive that resolves this - be patient.

---

<div class="post-metadata">

**Author:** ![jarak08](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@jarak08](https://forums.rockylinux.org/u/jarak08)\
**Post date:** [April 29, 2024, 9:09pm UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/10 "2024-04-29T21:09:28Z")

</div>

I had the same issue on a **test** VM that I was working on today.

Here’s what I did to get it to work:

1. gunzipped the `/var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz` file.

2. I used `sed` to strip out the `<code> </code>` and `<em> </em>` tags from the `/var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml` file.

3. gzipped the `/var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml`

and then flatpak search ran OK.

I figured it wouldn’t really hurt to remove the “code” and “em” tags as long as I was able to search. Again, this was a test box, not in production.

---

<div class="post-metadata">

**Author:** ![linuxtek-canada](https://avatars.discourse-cdn.com/v4/letter/l/f6c823/32.png) [@linuxtek-canada](https://forums.rockylinux.org/u/linuxtek-canada)\
**Post date:** [May 27, 2024, 5:18pm UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/11 "2024-05-27T17:18:26Z")

</div>

FYI this affects Rocky 9.4 as well:

```auto
[jmpaul@localhost ~]$ cat /etc/os-release | grep VERSION
VERSION="9.4 (Blue Onyx)"
VERSION_ID="9.4"
ROCKY_SUPPORT_PRODUCT_VERSION="9.4"
REDHAT_SUPPORT_PRODUCT_VERSION="9.4"

[jmpaul@localhost ~]$ flatpak --version
Flatpak 1.12.8
[jmpaul@localhost ~]$ sudo flatpak search mosh
F: Failed to parse /var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz file: Error on line 4875 char 29: <p> already set '
      Organic Maps is a free Android & iOS offline maps app for travelers,
      tourists, hikers, drivers and cyclists.
      It uses crowd-sourced OpenStreetMap data and is developed with love by
      ' and tried to replace with ' ('
No matches found

```

I was able to work around this issue using the following commands, based on the steps @jarak08 took:

```auto
cp /var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz /tmp
gunzip /tmp/appstream.xml.gz
sed -i 's/<\/\?code>//g; s/<\/\?em>//g' /tmp/appstream.xml
gzip /tmp/appstream.xml
sudo cp /tmp/appstream.xml.gz /var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz

```

After this, flatpak seems to work properly:

```auto
[jmpaul@localhost ~]$ sudo flatpak search mosh
Name Description Application ID Version Branch Remotes
Mosh The Mobile Shell org.mosh.mosh 1.4.0 stable flathub
WezTerm Powerful terminal and multiplexer org.wezfurlong.wezterm 20240203-110809-5046fc22 stable flathub
SSH-MITM SSH-MITM - ssh audits made simple at.ssh_mitm.server 4.1.0 stable flathub

```

---

<div class="post-metadata">

**Author:** ![Ritov](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@Ritov](https://forums.rockylinux.org/u/Ritov)\
**Post date:** [May 28, 2024, 11:07am UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/12 "2024-05-28T11:07:01Z")

</div>

@linuxtek-canada - JFI, unfortunately this will not survive the next flatpak metadata update.  
A bug fix is on the way …

---

<div class="post-metadata">

**Author:** ![xbourque](https://avatars.discourse-cdn.com/v4/letter/x/8baadc/32.png) [@xbourque](https://forums.rockylinux.org/u/xbourque)\
**Post date:** [July 19, 2024, 9:46pm UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/13 "2024-07-19T21:46:37Z")

</div>

The flatpak package got updated.

flatpak search now works as expected!

flatpak list is still broken on my machine (it lists the developer name where it should list the app name).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [September 17, 2024, 9:47pm UTC](https://forums.rockylinux.org/t/are-flatpak-search-and-flatpak-list-broken-in-rocky-9-3/13728/14 "2024-09-17T21:47:09Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
