elementdavv / internet_archive_downloader

A chrome/firefox extension that download books from Internet Archive(archive.org) and HathiTrust Digital Library (hathitrust.org)
GNU Affero General Public License v3.0
324 stars 26 forks source link

Downloads Stuck at 99% #12

Closed youperb closed 1 year ago

youperb commented 1 year ago

OS: Windows 8.1 Browser: Google Chrome Version 109.0.5414.120 I noticed that Your extension for chrome is not working properly the last three days. The downloading process often stops at about 99%. The " complete " caption never appears with a lot of books. The downloaded PDf files are often damaged while the zip files miss the back covers of the downloaded books. I can download the books only by refreshing the process several times. Previously, I could download 7 books at the same time without any trouble. but now, from the seven books only one book get the complete caption. Sometime, no book .... For example: https://archive.org/details/shipssailorssea0000humb It took me 4 refreshing attempts to be able to download this book. Thanks in Advance.

elementdavv commented 1 year ago

If the downloading process stuck at some point but did not break, that is probably caused by slow network. You can just click the "Downloading" button to stop the process then try again. The download will continue from where it lefts. May be you can try choose another time to download. In my experiance, the server sometimes is fast as >1Mb, sometimes slow as >10kb. I have designed the download file to be complete and correct, or none at all. So it should not produce a damaged or partly file. If it happened, tell the detai error message, and attaching the file.

youperb commented 1 year ago

It might be the slow network .. I spend three days trying to download books in different period of times during the day and night.. just to make sure it is the network behind this problem. but I do not think so. Concerning the server, yes you are right. I have noticed that since I started using this Extension. but what happened recently is different. The download progresses in a specific speed and when It reaches 99% it stops. the '.crswap' file disappears. The PDF with its almost full size is corrupted. The same thing happens to Zip files. I tried to open Zip files and found them corrupted too, so I converted them to CBR or CBZ and found the back cover or the last pages are often missed.

elementdavv commented 1 year ago

... reaches 99% it stops. the '.crswap' file disappears.

I never encountered this situation. Can you copied out the log messages from developer panel by pressing F12, then change to console tab.

youperb commented 1 year ago

I found the following errors in red colors.

  1. on the top of the page :

Unchecked runtime.lastError: The message port closed before a response was received. 2up:1 Unchecked runtime.lastError: The message port closed before a response was received. 2up:1 Unchecked runtime.lastError: The message port closed before a response was received. 2up:1 Unchecked runtime.lastError: The message port closed before a response was received.

2 . at the buttom of the page:

Failed to load resource: net::ERR_CONNECTION_RESET content1.js:254 TypeError: Failed to fetch content1.js:277 Uncaught (in promise) TypeError: filehandle.remove is not a function at clean (content1.js:277:30) at async giveup (content1.js:262:13) at async syncfetch (content1.js:256:13)

elementdavv commented 1 year ago

Try disable all other extensions. If that works, enable them one by one to identify the guilty one.

youperb commented 1 year ago

I have disabled them but I am still having the same problem. Here is a full message errors of a book with 56 pages:

:1175 The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'. See https://lit.dev/msg/deprecated-import-path for more information. (anonymous) @ :1175 :1175 donation-banner loaded Object :1175 SoundManager 2: No Flash detected. Trying HTML5-only mode. :1175 SoundManager V2.97a.20170601 (HTML5-only mode) :1175 SoundManager 2 HTML5 support: mp3 = true, mp4 = true, ogg = true, opus = true, wav = true, flac = true :1175 SoundManager 2: Ready. ✓ content1.js:419 Internet Archive Downloader v0.5.0 in action content1.js:33 load /js/stub.js :1175 done content1.js:19 message: iad init content1.js:136 init begin content1.js:54 load buttons content1.js:41 load /css/iad.css content1.js:80 load qualities content1.js:104 get book info content1.js:113 get metadata content1.js:141 init complete content1.js:19 message: iad begin content1.js:166 download kingsqueensruler0000macd_f4n8.zip of quality 1 at Tue Aug 01 2023 18:47:48 GMT+0200 (Central European Summer Time) content1.js:188 chunks: 56 content1.js:215 chunk 1 content1.js:215 chunk 2 content1.js:215 chunk 3 content1.js:215 chunk 4 content1.js:215 chunk 5 content1.js:233 chunk 1 ready content1.js:215 chunk 6 content1.js:233 chunk 2 ready content1.js:215 chunk 7 content1.js:233 chunk 4 ready content1.js:215 chunk 8 content1.js:233 chunk 5 ready content1.js:215 chunk 9 content1.js:233 chunk 3 ready content1.js:215 chunk 10 content1.js:233 chunk 7 ready content1.js:215 chunk 11 content1.js:233 chunk 6 ready content1.js:215 chunk 12 content1.js:233 chunk 8 ready content1.js:215 chunk 13 content1.js:233 chunk 9 ready content1.js:215 chunk 14 content1.js:233 chunk 10 ready content1.js:215 chunk 15 content1.js:233 chunk 11 ready content1.js:215 chunk 16 content1.js:233 chunk 12 ready content1.js:215 chunk 17 content1.js:233 chunk 13 ready content1.js:215 chunk 18 content1.js:233 chunk 14 ready content1.js:215 chunk 19 content1.js:233 chunk 15 ready content1.js:215 chunk 20 content1.js:233 chunk 16 ready content1.js:215 chunk 21 content1.js:233 chunk 17 ready content1.js:215 chunk 22 content1.js:233 chunk 18 ready content1.js:215 chunk 23 content1.js:233 chunk 19 ready content1.js:215 chunk 24 content1.js:233 chunk 20 ready content1.js:215 chunk 25 content1.js:233 chunk 21 ready content1.js:215 chunk 26 content1.js:233 chunk 22 ready content1.js:215 chunk 27 content1.js:233 chunk 23 ready content1.js:215 chunk 28 content1.js:233 chunk 24 ready content1.js:215 chunk 29 content1.js:233 chunk 25 ready content1.js:215 chunk 30 content1.js:233 chunk 26 ready content1.js:215 chunk 31 content1.js:233 chunk 27 ready content1.js:215 chunk 32 content1.js:233 chunk 28 ready content1.js:215 chunk 33 content1.js:233 chunk 29 ready content1.js:215 chunk 34 content1.js:233 chunk 30 ready content1.js:215 chunk 35 content1.js:233 chunk 31 ready content1.js:215 chunk 36 content1.js:233 chunk 32 ready content1.js:215 chunk 37 content1.js:233 chunk 33 ready content1.js:215 chunk 38 content1.js:233 chunk 34 ready content1.js:215 chunk 39 content1.js:233 chunk 35 ready content1.js:215 chunk 40 content1.js:19 message: iad begin content1.js:233 chunk 36 ready content1.js:215 chunk 41 content1.js:233 chunk 37 ready content1.js:215 chunk 42 content1.js:233 chunk 38 ready content1.js:215 chunk 43 content1.js:233 chunk 39 ready content1.js:215 chunk 44 content1.js:233 chunk 40 ready content1.js:215 chunk 45 content1.js:233 chunk 41 ready content1.js:215 chunk 46 content1.js:233 chunk 44 ready content1.js:215 chunk 47 content1.js:233 chunk 42 ready content1.js:215 chunk 48 content1.js:233 chunk 43 ready content1.js:215 chunk 49 content1.js:233 chunk 45 ready content1.js:215 chunk 50 content1.js:233 chunk 46 ready content1.js:215 chunk 51 content1.js:233 chunk 47 ready content1.js:215 chunk 52 content1.js:233 chunk 48 ready content1.js:215 chunk 53 content1.js:233 chunk 49 ready content1.js:215 chunk 54 content1.js:233 chunk 50 ready content1.js:215 chunk 55 content1.js:233 chunk 51 ready content1.js:215 chunk 56 content1.js:233 chunk 53 ready content1.js:233 chunk 52 ready content1.js:233 chunk 54 ready content1.js:233 chunk 55 ready ia902203.us.archive.org/BookReader/BookReaderImages.php?zip=/21/items/kingsqueensruler0000macd_f4n8/kingsqueensruler0000macd_f4n8_jp2.zip&file=kingsqueensruler0000macd_f4n8_jp2/kingsqueensruler0000macd_f4n8_0056.jp2&id=kingsqueensruler0000macd_f4n8&scale=1&rotate=0:1 Failed to load resource: net::ERR_CONNECTION_RESET content1.js:244 TypeError: Failed to fetch content1.js:248 Uncaught (in promise) DOMException: Blocked by Safe Browsing. **and here is another example of a book with 36 pages:** :1175 The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'. See https://lit.dev/msg/deprecated-import-path for more information. (anonymous) @ :1175 :1175 donation-banner loaded Object mexico0000gane_y8z9:2395 [Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: https://archive.org/includes/fonts/Iconochive-Regular.woff?-ccsheb :1175 SoundManager 2: No Flash detected. Trying HTML5-only mode. :1175 SoundManager V2.97a.20170601 (HTML5-only mode) :1175 SoundManager 2 HTML5 support: mp3 = true, mp4 = true, ogg = true, opus = true, wav = true, flac = true :1175 SoundManager 2: Ready. ✓ content1.js:419 Internet Archive Downloader v0.5.0 in action content1.js:33 load /js/stub.js :1175 done content1.js:19 message: iad init content1.js:136 init begin content1.js:54 load buttons content1.js:41 load /css/iad.css content1.js:80 load qualities content1.js:104 get book info content1.js:113 get metadata content1.js:141 init complete :1175 Uncaught Error: BookReader failed to load in 8s at :1175:68 at r (:1175:68) content1.js:19 message: iad begin content1.js:166 download mexico0000gane_y8z9.zip of quality 1 at Tue Aug 01 2023 18:59:24 GMT+0200 (Central European Summer Time) content1.js:188 chunks: 36 content1.js:215 chunk 1 content1.js:215 chunk 2 content1.js:215 chunk 3 content1.js:215 chunk 4 content1.js:215 chunk 5 content1.js:233 chunk 1 ready content1.js:215 chunk 6 content1.js:233 chunk 2 ready content1.js:215 chunk 7 content1.js:233 chunk 3 ready content1.js:215 chunk 8 content1.js:233 chunk 4 ready content1.js:215 chunk 9 content1.js:233 chunk 5 ready content1.js:215 chunk 10 content1.js:233 chunk 6 ready content1.js:215 chunk 11 content1.js:233 chunk 7 ready content1.js:215 chunk 12 content1.js:233 chunk 10 ready content1.js:215 chunk 13 content1.js:233 chunk 8 ready content1.js:215 chunk 14 content1.js:233 chunk 9 ready content1.js:215 chunk 15 content1.js:233 chunk 11 ready content1.js:215 chunk 16 content1.js:233 chunk 12 ready content1.js:215 chunk 17 content1.js:233 chunk 13 ready content1.js:215 chunk 18 content1.js:233 chunk 14 ready content1.js:215 chunk 19 content1.js:233 chunk 15 ready content1.js:215 chunk 20 content1.js:233 chunk 16 ready content1.js:215 chunk 21 content1.js:233 chunk 17 ready content1.js:215 chunk 22 content1.js:233 chunk 18 ready content1.js:215 chunk 23 content1.js:233 chunk 19 ready content1.js:215 chunk 24 content1.js:233 chunk 20 ready content1.js:215 chunk 25 content1.js:233 chunk 21 ready content1.js:215 chunk 26 content1.js:233 chunk 22 ready content1.js:215 chunk 27 content1.js:233 chunk 24 ready content1.js:215 chunk 28 content1.js:233 chunk 25 ready content1.js:215 chunk 29 content1.js:233 chunk 23 ready content1.js:215 chunk 30 content1.js:233 chunk 27 ready content1.js:215 chunk 31 content1.js:233 chunk 26 ready content1.js:215 chunk 32 content1.js:233 chunk 28 ready content1.js:215 chunk 33 content1.js:233 chunk 29 ready content1.js:215 chunk 34 content1.js:233 chunk 30 ready content1.js:215 chunk 35 content1.js:233 chunk 31 ready content1.js:215 chunk 36 content1.js:233 chunk 32 ready content1.js:233 chunk 33 ready ia902906.us.archive.org/BookReader/BookReaderImages.php?zip=/35/items/mexico0000gane_y8z9/mexico0000gane_y8z9_jp2.zip&file=mexico0000gane_y8z9_jp2/mexico0000gane_y8z9_0034.jp2&id=mexico0000gane_y8z9&scale=1&rotate=0:1 Failed to load resource: net::ERR_CONNECTION_RESET content1.js:244 TypeError: Failed to fetch ia902906.us.archive.org/BookReader/BookReaderImages.php?zip=/35/items/mexico0000gane_y8z9/mexico0000gane_y8z9_jp2.zip&file=mexico0000gane_y8z9_jp2/mexico0000gane_y8z9_0035.jp2&id=mexico0000gane_y8z9&scale=1&rotate=0:1 Failed to load resource: net::ERR_CONNECTION_RESET content1.js:244 TypeError: Failed to fetch ia902906.us.archive.org/BookReader/BookReaderImages.php?zip=/35/items/mexico0000gane_y8z9/mexico0000gane_y8z9_jp2.zip&file=mexico0000gane_y8z9_jp2/mexico0000gane_y8z9_0036.jp2&id=mexico0000gane_y8z9&scale=1&rotate=0:1 Failed to load resource: net::ERR_CONNECTION_RESET content1.js:244 TypeError: Failed to fetch content1.js:248 Uncaught (in promise) DOMException: Blocked by Safe Browsing.
youperb commented 1 year ago

I uploaded a photo to clarify the issue.

https://i.ibb.co/RNB8qvM/2023-08-01-213003.jpg

I want to know if the other users are having the same problem or it is just me?

elementdavv commented 1 year ago

From your error messages, somes pages failed to get due to network error. Just try again.

And does the error: "Unchecked runtime.lastError: The message port closed before a response was received." disappeared ?

youperb commented 1 year ago

Yes it disappeared.

youperb commented 1 year ago

Is there any possibility to add a function to force the browser to re-download the book automatically when it fails due to network errors?

elementdavv commented 1 year ago

Is there any possibility to add a function to force the browser to re-download the book automatically when it fails due to network errors?

Update to version 0.6.0. It has juest been released.

youperb commented 1 year ago

Wow ! wonderful ....Thank you very much. It works very well (10/10).
I do appreciate your help.