#1128857 appstream-generator: Missleading error message on faild screenshot image downloads

Package:
appstream-generator
Source:
appstream-generator
Description:
Generator for AppStream metadata
Submitter:
Christian Buhtz
Date:
2026-09-02 23:15:01 UTC
Severity:
normal
#1128857#5
Date:
2026-02-23 18:53:43 UTC
From:
To:
Hello Matthias,
this ticket is not about the cause of the error but more about the quality of
the error message. I am not sure if Debian or upstream is responsible.

Here are two errors (from
https://appstream.debian.org/sid/main/issues/backintime-qt.html).

screenshot-save-error: Unable to store screenshot for
'https://translate.codeberg.org/media/screenshots/bit_16to9_960x540_mainwindow.png':
Could not load source screenshot for storing: Unrecognized image file format
screenshot-save-error: Unable to store screenshot for
'https://translate.codeberg.org/media/screenshots/bit_16to9_1280x720_general_ssh.png':
Could not load source screenshot for storing: Unrecognized image file format

I am not 100% sure but the technical reason might be that the source hoster was
down at this time or the hoster blocked the request assuming Debian was an AI
crawler.

But error message states something different. Users might think the file is
invalid, wrong format or PNG is not allowed in AppStream meta data.

I am just the upstream maintainer of "backintime". I am sorry to bother you
with this. Usaly the DM should by first contact. But they are not responsive
and/or often state not having resources diving into such details.

Regards,
Christian Buhtz

#1128857#10
Date:
2026-07-01 09:06:43 UTC
From:
To:
Hello,
is there an active team maintaining the Debian tracker?

The issue still persists. There is a false positive AppStream related
error.

https://tracker.debian.org/pkg/backintime

The screenshot URLs are available. The status was not updated since Feb.
23th.
Why not just updating it?

Best,
Christian Buhtz

#1128857#15
Date:
2026-08-30 09:58:32 UTC
From:
To:
Hi Christian!

Hmm, this is indeed strange, the page has been reprocessed multiple
times and we are still getting that error. We can maybe ask the MIME
database what that file it downloaded actually is to improve the
message, but my guess is that we are indeed hitting some kind of AI
crawler protection and are getting served a HTML page or some other
stuff that isn't a PNG image.

I wonder if that this due to the useragent that appstream-generator
sets, because downloading the image with curl succeeds. It's all very
strange.

I'll add this to my todo list, and once I know more see if we can work
around this or maybe reach out to Codeberg if necessary.

Best,
     Matthias

#1128857#20
Date:
2026-09-02 23:12:42 UTC
From:
To:
Hi!

I have debugged this, and this is indeed AI bot protection from
Codeberg. Funnily enough, if you are suspicious enough, you will
actually receive an image back at the right size, but with a nonsense
QR code on it. This sucks for AppStream, because it is actually a very
well-behaved downloader - fortunately though, Codeberg lets us pass if
we also tell it that we are using libcurl and our curl version. So
this issue is resolved. I also extended the generator to identify the
content that it has received and tell whatever that was in its error
message.

The only project affected by this bug was backintime-qt, however, it
improved the warnings on various other packages, so this is a win.
The changes are live on appstream.d.o, I will close this issue once a
package that contains this fix actually lands in Debian (currently,
the changes are only in Git and not yet released).
The backintime-qt package now has no hints at all, which is a very good sign.

Best,
    Matthias