readium / readium-js-viewer

👁 ReadiumJS viewer: default web app for Readium.js library
BSD 3-Clause "New" or "Revised" License
549 stars 186 forks source link

Get net::ERR_CACHE_OPERATION_NOT_SUPPORTED error when fetch epub with external epub link #722

Open nguyenhuutuananh opened 5 years ago

nguyenhuutuananh commented 5 years ago

This issue is a Bug

Expected Behaviour

Steps to reproduce

  1. Use Chrome and readium-js-viewer fetch epub external link
  2. Sometimes, I will got ERR_CACHE_OPERATION_NOT_SUPPORTED only one request.
  3. Disable cache will prevent this bug!?

Test file(s)

screen shot 2019-02-13 at 11 43 17 am screen shot 2019-02-13 at 11 43 23 am

Product

Additional information

danielweck commented 5 years ago

I suspect this problem has something to do with the cache strategy implemented in readium-js to handle binary Blob URIs when loading zipped EPUB containers (as opposed to exploded/unzipped publications, which is the recommended mode of operation for the cloud/web reader). See:

https://github.com/readium/readium-js/blob/master/js/epub-fetch/resource_cache.js

https://github.com/readium/readium-js/blob/999d7c32bcdd1184bcc248312267c6e744d737b9/js/epub-fetch/publication_fetcher.js#L36

https://github.com/readium/readium-js/blob/999d7c32bcdd1184bcc248312267c6e744d737b9/js/epub-fetch/content_document_fetcher.js#L28