Skip to content

Unable to receive specific book frontcover #59

Description

@robsalasco

Device

Xteink X3

Flowe build

0.7.4

Was the device locked when you got it?

Yes — unlocked it myself first

What happened

I tried to add a book to my device, the process went well but the frontcover never was displayed. I tried to remove the book from the device and the phone but I had to do it multiple times to get rid of it. For a test I tried to add it again but the frontcover didn't work.

I can send the book for you! just let me know your address.

Serial log (optional, but it usually solves it outright)


Activity

  1. robsalasco commented on Sep 22, 2026

    @robsalasco
    ContributorAuthor

    Root cause found and fixed — PR up: #61

    Hit this on an X3 with "The Anxious Generation - Jonathan Haidt" (plus one other book). The .fbp does ship a valid cover, but the tile kept showing the empty placeholder frame with its title and <book>.fbp.cov was never created — across several remove-from-phone / re-sync cycles, so it looked book-specific.

    Mechanism. The shelf reads /books/.shelfidx first. Rows are matched by book name + file size and trusted over the file itself; when hasCover == 0 the tile goes straight to NoCover, while the only code that extracts the cover from the package into <book>.fbp.cov (FbpBook::ensureShelfSidecars) runs for tiles that are still unresolved. So one row written with hasCover == 0 (package synced incomplete on the first attempt, or a sidecar write that failed once) keeps that book coverless for the life of the index — and because a re-synced package of the same book has the same size, the stale row keeps matching no matter how many times you re-add it.

    Workaround, no flashing needed: delete /books/.shelfidx and re-enter Read. The re-scan extracts the sidecar and the cover appears — confirmed on the device, and it is what pinned the diagnosis.

    The package is not at fault. This one parses clean: FBPK, fmt_ver 9 with min_reader 6, 3 profiles, u16-prefixed title/author, FBPN note table, and a shelf cover of 171x260 = 5720 bytes, exactly ceil(w/8) * h with the bit range inside the file. It passes every check FbpBook::open() makes.

    The fix (#61) makes that state self-healing: a hasCover == 0 row still restores title/author but no longer pins the tile to NoCover, so the package pass retries the extraction once per session and the row gets rewritten with hasCover == 1. It also logs the previously silent half — declares a shelf cover but its sidecar could not be written — which is exactly what made this take a full session to diagnose on a device with no serial console.

    Verified by building for X3 (RAM unchanged, 117388 B) and by a host test covering the shelf-header cases; the fix has not yet been exercised on hardware with a deliberately poisoned row.

  2. andrewjiang commented on Sep 26, 2026

    @andrewjiang
    Owner

    Thanks for your patience — I took a short break but I'm coming back to this now. Acknowledged, and I'll review shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions