Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues loading ePub resources #309

Closed
sdsantos opened this issue Dec 15, 2022 · 4 comments
Closed

Issues loading ePub resources #309

sdsantos opened this issue Dec 15, 2022 · 4 comments

Comments

@sdsantos
Copy link

Bug Report

What happened?

When opening certain ePubs (example: https://www.core-econ.org/project/core-the-economy/) some images and other resources like Javascript files fail. But they don't fail all the time (in debug they fail less often for some reason). I've double-checked with the library test-app and I get the same behaviour.

That ePub in particular is very heavy, so you need to open straight into a specific chapter, otherwise Readium gives up loading anything due to #122

Expected behavior

Resources should load fine, since they are all inside the ePub. It also works fine on iOS.

How to reproduce?

Upload that ePub into the test app and use the table of contents to go to Chapter 1. Close the ePub and open it again, should go straight to Chapter 1 and show the content, but with missing images.

Environment

  • Readium version: 2.2.0

Testing device

  • Pixel 5 API 30 emulator
  • Also happens in several other physicial devices

Additional context

What I did notice is that sometimes the resources that fail to load are being loaded with query parameters. I added a HTTPInterceptor into the Server and I can see that it's loading /d1cd18935479a01feb3a1ded093a3416/images/epub/unit-04-header.jpg?V=2.7.3 even when the webview requested http://127.0.0.1:44063/d1cd18935479a01feb3a1ded093a3416/images/epub/unit-04-header.jpg. Could the server be sharing query parameters during the same session for some reason? It looks to be the culprit, since I've changed the ArchiveFetcher.EntryResource#entry to strip query parameters, and now the images appear fine.

I've also looked to this issue recently opened: #297 and the error log also mentions a resource with query parameter: ?reload=1664860278828.

But I have no idea if stripping query parameters is a good solution or not, if it might affect the loading of other resources for example.

@mickael-menu
Copy link
Member

Hello, are you able to reproduce the issue from the develop branch? The Test App doesn't use the HTTP server anymore in develop, and that might have an impact on this.

@sdsantos
Copy link
Author

Hello, are you able to reproduce the issue from the develop branch? The Test App doesn't use the HTTP server anymore in develop, and that might have an impact on this.

It's working great in develop, no issues with the big ePub. How stable do you feel develop is at this stage?

@mickael-menu
Copy link
Member

Great to hear, I'll consider the issue fixed then.

It's pretty stable. We're aiming for a new release before Christmas, so you might want to wait.

@mickael-menu
Copy link
Member

Oh also, you will need to migrate to the new settings API to remove the HTTP server. Everything will be explained in the migration guide.

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

No branches or pull requests

2 participants