Locally-built Flatpak with AppData does not show metadata in GNOME Software

I’m building an app for the Librem 5. I’m considering making it available on Flathub. As part of that, I’m adding AppData.

The problem is, the AppData does not show up in the GNOME Software app. Instead, it “flickers” and just shows the main page with a display of other apps.

com.example.gnome.App.metainfo.xml

<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>com.example.gnome.App</id>

  <name>My App</name>
  <summary>A summary</summary>
  <description>
    <p>A description</p>
  </description>

  <metadata_license>CC0-1.0</metadata_license>
  <project_license>GPL-3.0-or-later</project_license>

  <url type="vcs-browser">https://example.com/vcs/my-app.git</url>
  <launchable type="desktop-id">com.example.gnome.App.desktop</launchable>
  <content_rating type="oars-1.1" />
  <!-- ... etcetera ... -->

meson.build

metainfo_file = i18n.merge_file(
        input: 'com.example.gnome.App.metainfo.xml.in',
       output: 'com.example.gnome.App.metainfo.xml',
       po_dir: '../po',
      install: true,
  install_dir: join_paths(get_option('datadir'), 'metainfo')
)

appstream_util = find_program('appstream-util', required: true)
if appstream_util.found()
  test('Validate appstream file',
        appstream_util,
        args: ['validate', metainfo_file],
        verbose: true)
endif

I tried naming the AppData file both appdata.xml and metainfo.xml (the latter is now recommended, apparently).

It validates when I run appstream-util validate against it. Then, when I use Gnome Builder (version 43.5) and create a .flatpak, I double click to open it in Software. However, Software only shows the initial app overview screen. (I tested on GNOME Software 43.4, Fedora 37).

Looking at journalctl -f, I see the following:

Feb 25 09:50:58 fedora37.localdomain gnome-software[2187]: no appstream metadata in file
Feb 25 09:52:01 fedora37.localdomain gnome-software[2187]: libostree pull from 'flathub' for appstream2/x86_64 complete
                                                           security: GPG: summary+commit 
                                                           security: SIGN: disabled http: TLS
                                                           delta: parts: 1 loose: 3608
                                                           transfer: secs: 83 size: 56.3 MB
Feb 25 09:52:01 fedora37.localdomain gnome-software[2187]: /var/tmp/flatpak-cache-6ECV01/repo-aYi7n4: Pulled appstream2/x86_64 from flathub
Feb 25 09:52:02 fedora37.localdomain flatpak-system-helper[3985]: system: Pulled appstream2/x86_64 from /var/tmp/flatpak-cache-6ECV01/repo-aYi7n4
Feb 25 09:52:04 fedora37.localdomain gnome-software[2187]: libostree pull from 'flathub' for appstream2/x86_64 complete
                                                           security: GPG: summary+commit 
                                                           security: SIGN: disabled http: TLS
                                                           delta: parts: 1 loose: 3835
                                                           transfer: secs: 85 size: 57.3 MB
Feb 25 09:52:04 fedora37.localdomain gnome-software[2187]: /var/tmp/flatpak-cache-6ECV01/repo-V9NDN7: Pulled appstream2/x86_64 from flathub
Feb 25 09:52:04 fedora37.localdomain flatpak-system-helper[3985]: libostree pull from 'flathub' for appstream2/x86_64 complete
                                                                  security: GPG: commit 
                                                                  security: SIGN: disabled 
                                                                  non-delta: meta: 1 content: 0
                                                                  transfer: secs: 0 size: 592 bytes
Feb 25 09:52:04 fedora37.localdomain flatpak-system-helper[3985]: system: Pulled appstream2/x86_64 from /var/tmp/flatpak-cache-6ECV01/repo-V9NDN7
Feb 25 09:52:04 fedora37.localdomain PackageKit[1398]: get-updates transaction /191_acadddce from uid 1000 finished with success after 221ms
Feb 25 09:52:05 fedora37.localdomain gnome-software[2187]: failed to convert file to GsApp: failed to get state: runtime/org.gnome.Platform/x86_64/43 not found in any remote

What am I doing wrong? Is the AppData not in the generated .flatpak? The output from journalctl suggests so. What should I do?

So nobody knows about this? I’ve also asked on the Purism forums (the manufacturer of the Librem 5 smartphone) but nobody seems to know how this works :confused:

I have a similar experience, but no solution for the problem. In my experience, locally-built .flatpak files were not displayed with full metadata in gnome software. Don’t know why. I made the appstream validators happy, got the app published in flathub. Et voilà, the app coming from flathub is now displayed correctly in gnome software.

1 Like

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