#3505

Protected Content: /api/fetch 502: range unsupported for specific Google Play Books

OpenReckless1dereropened 1mo ago

Device

Xteink X3

Affected Version

1.5.0-dev-feat-sd-plugins-89ff14364

Describe the Bug

When using the Protected Content plugin (v1.0.0) to fulfill Google Play Books ACSM files, specific titles consistently fail during the final EPUB download with:

Error: download request failed: /api/fetch 502: range unsupported

The issue currently occurs with The Hobbit and The Stand. Other Google Play Books purchased and downloaded using the same device, ByteBooks account, firmware and plugin work correctly, including Harry Potter and the Philosopher's Stone and Harry Potter and the Chamber of Secrets.

For the failing titles, ACSM fulfillment itself succeeds and Protected Content creates the corresponding .epub.rights file. The failure only occurs when /api/fetch attempts to download the EPUB.

As a test, I opened the same ACSM files in Adobe Digital Editions using the same authorized ByteBooks account. ADE successfully downloaded the original DRM-protected EPUBs. Uploading those untouched EPUBs manually to CrossPoint next to the .epub.rights files generated by Protected Content makes both books open and read correctly.

This suggests that fulfillment, authorization and the generated rights files are valid, while the final EPUB download through /api/fetch is failing for these specific files.

Steps to Reproduce

  1. Install Protected Content v1.0.0 on an Xteink X3 running CrossPoint 1.5.0-dev-feat-sd-plugins-89ff14364.
  2. Configure Protected Content with a valid ByteBooks account.
  3. Upload a Google Play Books ACSM for one of the affected titles (The Hobbit or The Stand).
  4. Start fulfillment through Protected Content.
  5. Observe that fulfillment succeeds and a matching .epub.rights file is created.
  6. The subsequent EPUB download fails with:
  7. Error: download request failed: /api/fetch 502: range unsupported
  8. Repeating the process produces the same result.

Additional test: opening the same ACSM in Adobe Digital Editions successfully downloads the protected EPUB. Manually uploading that original, unmodified EPUB next to the .epub.rights file on CrossPoint allows the book to open normally.

Expected Behavior

After successful ACSM fulfillment and creation of the .epub.rights file, /api/fetch should successfully download the corresponding protected EPUB to the SD card, as it does for other Google Play Books titles.

Relevant Log Output/Screenshots

Error: download request failed: /api/fetch 502: range unsupported

Note: CrossPoint's "Optimize EPUB" option was disabled during the successful manual-upload test. Enabling EPUB optimization on the DRM-protected EPUB causes it to fail to index, while the original unmodified ADE EPUB works correctly with the generated .epub.rights file.

Activity

1
itsthisjustin1mo ago

Interesting. Will see how i can replicate.