migaku-official / migaku-browser-extension-issue-tracker

An issue tracker for bugs and other issues related to the Migaku browser extension.
2 stars 0 forks source link

[Reader] Importing EPUB with large number of files crashes extension #37

Open ChristopherFritz opened 2 years ago

ChristopherFritz commented 2 years ago

Describe the bug Importing an EPUB file with the file size 313.7 MiB (328,886,316 B) and containing 1,286 images crashes the extension from the "Upload a File" screen.

Placing the images into a CBZ file and trying to load the CBZ also causes a crash.

To Reproduce Steps to reproduce the behavior:

  1. Drag a CBZ file containing 1,286 images onto the extension.
  2. When the "Upload a File" screen appears, wait a few seconds.
  3. The extension crashes.
  4. If the CBZ file size is 292.8 MiB (307,013,984 B) with 1,216 images, it does not crash at the "Upload a File" screen, but will still crash on either "Open in Reader" or "Save to Collection".
  5. If the CBZ file size is 238.7 MiB (250,324,844 B) with 999 images also crashes at "Open in Reader" and "Save to Collection".
  6. If the CBZ file size is 111.7 MiB (117,083,829 B) with 500 image loads with no issues.

Expected behavior Either the file will load without crashing or the extension will display a message saying the file size or image count is above the acceptable threshold and aborts the import process without crashing.

Screenshots Screenshot_20220619_071614

image

Desktop (please complete the following information):

Additional context This is an atypical situation, where six volumes of a manga are re-released as a single EPUB:

https://www.kobo.com/jp/ja/ebook/iR1vKRSQ1T2Zp2M6LENklA