Skip to content

Fix Read the Docs build by replacing images that serve WebP under a .png name - #962

Merged
pulorsok merged 1 commit into
ev-flow:masterfrom
pulorsok:fix-pdf-build-broken-images
Aug 15, 2026
Merged

pulorsok merged 1 commit into
ev-flow:masterfrom
pulorsok:fix-pdf-build-broken-images

Conversation

@pulorsok

Copy link
Copy Markdown
Member

Problem

Read the Docs has not published since 2026-07-31. The site still serves that build, so Sova, EventBot and the v26.8.1 version bump are all missing from https://quark-engine.readthedocs.io/en/latest/malware_report.html

Every Sphinx builder succeeds. The failure is in the PDF step:

[rtd-command-info] ... exit-code: 12
latexmk -r latexmkrc -pdf -f -dvi- -ps- -jobname=quark-engine -interaction=nonstopmode

! error:  (file dna1NWm_xl.png) (readpng): internal error
libpng error: Not a PNG file
!  ==> Fatal error occurred, no output PDF file produced!

Because formats requests pdf, epub and htmlzip, a failure in any one of them marks the whole build failed, and Read the Docs does not publish the HTML that built cleanly.

Cause

The seven cdn.imgpile.com images in the DroidKungFu and GoldDream sections now return WebP data:

$ curl -sI https://cdn.imgpile.com/f/dna1NWm_xl.png | grep content-type
content-type: image/png

$ curl -sL https://cdn.imgpile.com/f/dna1NWm_xl.png | file -
/dev/stdin: RIFF (little-endian) data, Web/P image

The URL, the extension and the Content-Type header all still say PNG. Browsers sniff the real format and render them, which is why the HTML pages look correct. LuaLaTeX selects its decoder from the file name, so libpng receives WebP bytes and aborts.

Nothing in this repository changed. latex_engine = "lualatex" dates from #491 (2023-03), formats from #676, and these images from #857 (2026-01). They rendered into the PDF correctly for months; the image host converted its stored files to WebP some time between 2026-07-31 and 2026-08-11.

I checked all 103 image URLs in the document. Only these seven are affected — the images on postimg, catbox and ibb are all genuine PNG or JPEG.

Fix

Converted the seven images to real PNG files, re-hosted them alongside the other report images, and updated the URLs. Content is unchanged.

Verification

All four builders that Read the Docs runs pass locally, using the same dependency sequence as the RTD build:

Builder Result
html build succeeded, 2 warnings
singlehtml build succeeded, 1 warning
latex build succeeded, 1 warning
epub build succeeded, 3 warnings

Every one of the 100 images the LaTeX builder downloads is now a valid PNG (previously the first one aborted the run).

Suggested follow-up

The document depends on four third-party image hosts. Any of them can repeat this, and a single bad image silently blocks HTML publishing. Dropping pdf from formats, or committing the report images into the repository, would remove that coupling. I left both out of this PR to keep it focused on the regression.

The PDF build has failed since early August, which stops Read the Docs
from publishing any format. Builds 5edfa4f and later end with:

    ! error:  (file dna1NWm_xl.png) (readpng): internal error
    libpng error: Not a PNG file
    !  ==> Fatal error occurred, no output PDF file produced!

The seven cdn.imgpile.com images in the DroidKungFu and GoldDream
sections now return WebP data while keeping the .png extension and an
image/png content type. Browsers detect the real format and render
them, so the HTML pages look fine, but LuaLaTeX picks its decoder from
the file name and libpng rejects the WebP payload. latexmk then exits
12 and Read the Docs marks the whole build failed, so the successfully
built HTML is never published. The site has served the 2026-07-31
build ever since.

Convert the seven images to real PNG files, re-host them alongside the
other report images, and point the document at the new URLs. All four
Sphinx builders pass locally, and every one of the 100 images the
LaTeX builder downloads is now a valid PNG.

Nothing in this repository changed to cause this; the image host began
converting stored files to WebP.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.48%. Comparing base (5edfa4f) to head (4235feb).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #962   +/-   ##
=======================================
  Coverage   78.48%   78.48%           
=======================================
  Files          84       84           
  Lines        7692     7692           
=======================================
  Hits         6037     6037           
  Misses       1655     1655           
Flag Coverage Δ
unittests 78.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pulorsok
pulorsok merged commit 528c937 into ev-flow:master Aug 15, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant