-
Notifications
You must be signed in to change notification settings - Fork 83
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
Comments
Hello, are you able to reproduce the issue from the |
It's working great in |
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. |
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. |
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
Testing device
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 requestedhttp://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 theArchiveFetcher.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.
The text was updated successfully, but these errors were encountered: