#1094274 appstream: CRITICAL glib errors when running appstreamcli

Package:
appstream
Source:
appstream
Description:
Software component metadata management
Submitter:
Sebastian Ramacher
Date:
2025-08-28 15:43:01 UTC
Severity:
normal
#1094274#5
Date:
2025-01-26 17:47:34 UTC
From:
To:
Running anything involving appstreamcli produces errors from glib:

$ appstreamcli status
AppStream Status:
Version: 1.0.4

OS metadata sources:

(appstreamcli:1987010): GLib-GIO-CRITICAL **: 18:44:27.292: GFileInfo created without standard::type

(appstreamcli:1987010): GLib-GIO-CRITICAL **: 18:44:27.292: file ../../../gio/gfileinfo.c: line 1610 (g_file_info_get_file_type): should not be reached

** (appstreamcli:1987010): WARNING **: 18:44:27.292: Flatpak metadata repository at '/var/lib/flatpak/appstream/flathub' is not a directory.
 Software catalog data
 Group: os-catalog
  /var/lib/swcatalog/yaml
    • YAML:  8

 Data from locally installed software
 Group: local-metainfo
  /usr/share/applications
    • Desktop Entry:  140
  /usr/share/metainfo
    • MetaInfo XML:  86

Other metadata sources:
• No metadata.
Summary:

(appstreamcli:1987010): GLib-GIO-CRITICAL **: 18:44:27.294: GFileInfo created without standard::type

(appstreamcli:1987010): GLib-GIO-CRITICAL **: 18:44:27.294: file ../../../gio/gfileinfo.c: line 1610 (g_file_info_get_file_type): should not be reached

** (appstreamcli:1987010): WARNING **: 18:44:27.294: Flatpak metadata repository at '/var/lib/flatpak/appstream/flathub' is not a directory.
✔ We have information on 2684 software components.


If I can help in debugging this issue, let me know. I have no idea where
to start.

Cheers

#1094274#10
Date:
2025-07-13 08:56:49 UTC
From:
To:
Still not resolved as of 1.0.5-1. Is there anything we can do to help?

Martin-Éric

#1094274#17
Date:
2025-08-27 04:32:33 UTC
From:
To:
Still not resolved as of 1.0.6-1.

This currently breaks the appstream tests Lintian runs because the glib
error corrups the YAML output, which in turns crashes Lintian.

Since Britney now requires no Lintian errors for a package to migrate to
Testing, this means the affected packages (UDD reports 3 or 4 at the
moment) are stuck in Unstable :(

#1094274#22
Date:
2025-08-27 06:24:06 UTC
From:
To:
Hi!

Am Mi., 27. Aug. 2025 um 06:35 Uhr schrieb Louis-Philippe Véronneau
<pollo@debian.org>:

Lintian for sure doesn't run `appstreamcli status`, so, which command fails?

I can not reproduce this here (testing with 1.0.6), is there anything
special about the systems that might cause this?
Also, is `/var/lib/flatpak/appstream/flathub` a symlink? (1.0.6 should
handle that case, but the GLib warning is a bit of a mystery until I
can reproduce this issue).

Cheers,
    Matthias

#1094274#27
Date:
2025-08-27 19:27:36 UTC
From:
To:
appstreamcli validate-tree --format=yaml --no-net

I can replicate the issue manually this way:

   $ wget https://ftp.debian.org/debian/pool/main/q/qps/qps_2.10.0-1_amd64.deb
   $ ar -x qps_2.10.0-1_amd64.deb
   $ tar -xvf data.tar.gz
   $ appstreamcli validate-tree --format=yaml --no-net usr

The result is this (invalid because of this bug) YAML output:

==========
---
File: org.lxqt.Qps.appdata.xml
Validator: 1.0.5
Issues:
- tag: spdx-license-unknown
   severity: warning
   component: org.lxqt.qps
   line: 5
   hint: GPLv2
   explanation: >-
     The license ID was not found in the SPDX database. Please check that the license ID is written in
     an SPDX-conformant way and is a valid free software license.
- tag: description-first-para-too-short
   severity: info
   component: org.lxqt.qps
   line: 9
   hint: "Process manager written in Qt. Among\n    its features are:"
   explanation: >-
     The first `description/p` paragraph of this component might be too short (< 80 characters). Please
     consider starting with a longer paragraph to improve how the description looks like in software centers
     and to provide more detailed information on this component immediately in the first paragraph.
- tag: screenshot-no-caption
   severity: pedantic
   component: org.lxqt.qps
   line: 24
   explanation: >-
     The screenshot does not have a caption text. Consider adding one.
- tag: releases-info-missing
   severity: pedantic
   component: org.lxqt.qps
   explanation: >-
     This component is missing information about releases. Consider adding a `releases` tag to describe
     releases and their changes.
- tag: content-rating-missing
   severity: info
   component: org.lxqt.qps
   explanation: >-
     This component has no `content_rating` tag to provide age rating information. You can generate the
     tag data online by answering a few questions at https://hughsie.github.io/oars/
- tag: developer-info-missing
   severity: info
   component: org.lxqt.qps
   explanation: >-
     This component contains no `developer` element with information about its author.
- tag: metainfo-filename-cid-mismatch
   severity: warning
   component: org.lxqt.qps
   explanation: >-
     The metainfo filename does not match the component ID.
Passed: no
---
File: qps.desktop
Validator: 1.0.5
Issues:
- tag: desktop-entry-bad-data
   hint: Key file contains key “Comment[es]” which has a value that cannot be interpreted.
Passed: yes

(appstreamcli:5636): GLib-GObject-CRITICAL **: 15:24:22.138: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
============

More packages failing in a similar way can be found in BTS #1110968.

#1094274#32
Date:
2025-08-28 02:40:02 UTC
From:
To:
Hi Louis-Philippe!

Am Mi., 27. Aug. 2025 um 21:27 Uhr schrieb Louis-Philippe Véronneau
<pollo@debian.org>:
from this bug report! This makes me believe that the issue in this bug
report is actually already fixed in 1.0.6 and we can close this bug,
but I am waiting for Sebastian Ramacher to confirm that.

As for your bug: That one I can reproduce! Thank you for the
reproduction instructions, that was very helpful. And it's odd that it
only appeared now, and not ages ago - my theory is that some
improvement in GLib may have surfaced it now, or simply that most
packages had good desktop-entry files so far.
Either way, I fixed it in
https://github.com/ximion/appstream/commit/e0bcc1ac5ba8e473a29ef1b71fa80d86f409a431

I will upload a patched version tomorrow, since this issue affects
Lintian - that should resolve your issue.

Cheers,
    Matthias

#1094274#39
Date:
2025-08-28 13:00:13 UTC
From:
To:
Hi!

The new appstream upload is available, which fixes the issue affecting
Lintian. Maybe lintian should only read from appstreamcli's stdout for
YAML parsing and ignore stderr, that way GLib warnings wouldn't trip
it up.
Anyway, the Lintian thing unfortunately wasn't this bug, so, I still
have no idea how to reproduce it.
So far, no bug reporter has come back with further information...

Cheers,
    Matthias

#1094274#46
Date:
2025-08-28 13:20:01 UTC
From:
To:
Ah, sorry, it seemed close enough for me, but evidently I don't
understand much to these issues :)

Thanks a lot for your work!

#1094274#51
Date:
2025-08-28 15:39:58 UTC
From:
To:
Hi!

Am Do., 28. Aug. 2025 um 15:20 Uhr schrieb Louis-Philippe Véronneau
<pollo@debian.org>:
those in any form instead of them silently happening without reporting
^^
This bug in particular was ancient, it's odd that it only manifested now...

As for the bug in this bugreport: I think Flatpak has changed
something that broke a thing, but I am not quite sure - there was no
change that I'm aware of, and I have never managed to reproduce the
issue so far.

Best,
    Matthias