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

downloding keeps failing!!! #30

Open eelalzep opened 8 months ago

Doranwen commented 7 months ago

Yes, I get the same thing (but read below):

This is what a proper bug report looks like (or at least somewhat):

Downloads continually fail at about the 70% mark, with this message:


TypeError: NetworkError when attempting to fetch resource..
Please contact the developer.

This happens consistently, regardless of the quality chosen.

I'm using Firefox 121.0.1 on Linux Mint Mate.

HOWEVER: The instructions do say for Firefox (and it was easy to miss this line, I granted permissions for archive.org alone and that didn't work) that you have to grant ALL Optional permissions. Once that's done, it does work.

eelalzep commented 7 months ago

Thank you. You know I'm kinda normie here, so didn't know about these things yet!🙂

Doranwen commented 7 months ago

Glad I could help! In general, any time you're asking for help with a bug or software that isn't working right, you always want to list what OS/version/etc. you're using (whatever could be relevant), plus any error messages you get, and as far as necessary, the exact set of steps you take to reproduce the bug. The idea is that whoever's trying to help you will need to either reproduce the issue, or spot where the issue might be occurring (for instance, if you're using software that's incompatible with your particular OS version, or are missing a critical step). It's very hard to solve someone's problem without those details!

I left the error message I got here so that hopefully if future people search for that exact error message, they'll find this and go "OH, I need to enable that permission". Because it's easy for eyes to skip over that line in the instructions (as I found myself, lol) but it's definitely critical to the success of the extension.

dinkc64 commented 7 months ago

Hi, I'm using a desktop PC with Firefox 115.9.1 ESR with the latest addon, I borrow this book: https://archive.org/details/essentialsoffire0000unse/page/n1/mode/2up and hit the download button, about 75% of the way through the download, it fails with the same error above. I've tried & retried about 20 different times, with no luck :(

I went and enabled every single permission, too

Any ideas?

best regards,

Doranwen commented 7 months ago

I think I was misunderstood. It does work fine in Firefox, I found - but you have to enable permissions for all sites, not just archive.org. (At first I hadn't enabled permissions for all sites and that's why it didn't work - once I did that it started to work.) If you've done that and it's still not working, I have no idea why.

I'd still be using it but I hit some sort of lending limit and IA won't let me borrow anything. So you may want to be cautious about how quickly you borrow books in one day or whatever their limit is. I don't know what it is and can't find anything listed that says what it is, which is annoying.

dinkc64 commented 7 months ago

Hi @eelalzep, thanks for the python script suggestion :)

This extension does work in Firefox, I did some digging and found the reason it fails so often (especially on large books, 1200+ pages), the TRYLIMIT variable in content1.js is set too low, setting it from 3 to 13 fixed all my downloading problems. 13 was just a guess, I hope the author can set this script to have a much more reasonable retry limit.

best regards,

eelalzep commented 7 months ago

That's great, but in my case it didn't even started to download🥲. I am using it on my android phone.!

I also tried on incognito tab and it showed this error! Screenshot_2024-03-22-08-02-47-520_org.mozilla.firefox.jpg

elementdavv commented 7 months ago

That's great, but in my case it didn't even started to download🥲. I am using it on my android phone.!

I also tried on incognito tab and it showed this error! Screenshot_2024-03-22-08-02-47-520_org.mozilla.firefox.jpg

The extension does not work on android phone, or on incoginto tab on PC desktop.

dinkc64 commented 7 months ago

Oh, that's a bummer. What Firefox are you using on your PC? Did you try without incognito mode?

This information will help find the problem, get the debug log and post it here, this is how to do it: NOTE: Do this without using Incognito Mode.

1: Go to the page of the book you want to download, hit the "borrow for 1 hour" button. 2: Go to Tools -> Browser Tools -> Web Developer Tools, and it'll open a little window at the bottom of your Firefox window. NOTE: if you want to get rid of it, press the litle 'X' button on the right side, at the top of the new window. 3: With the Web Developer Tools open, click on the Download button. When the download fails, look in the Web Developer Tools window, do a right click somewhere in the middle of that window and select "Save all messages to file" 4: Attach that file you just saved to a message here. I'm not the author of this plugin, but I'll do my best to help :)

best regards,

eelalzep commented 7 months ago

That's great, but in my case it didn't even started to download🥲. I am using it on my android phone.!

I also tried on incognito tab and it showed this error! Screenshot_2024-03-22-08-02-47-520_org.mozilla.firefox.jpg

The extension does not work on android phone, or on incoginto tab on PC desktop.

Really?? It worked fine on kiwi browser.

elementdavv commented 7 months ago

Really?? It worked fine on kiwi browser.

Yes, only wiki works.

whatfuturedotlol commented 6 months ago

this still isn't working for me. tried on both chrome and firefox. https://archive.org/details/scalesoffatetrad0000monr/mode/2up

extension 0.7.0 firefox 126.0 (64-bit) chrome 124.0.6367.208 (Official Build) (arm64) mac m1

here's the message logs. firefox:console-export-2024-5-18_15-52-8.txt chrome:archive.org-1716048304150.log

dinkc64 commented 6 months ago

@whatfuturedotlol Looks like you had the same problem as me, it needs a higher retrycount.
@elementdavv, could you up the retry limit (TRYLIMIT) to something, like perhaps 10 or make it configurable? This would really be helpful! Currently I'm using a hacked iadownloader with TRYLIMIT set very high to prevent failed book downloads, unfortunately it will only work with Firefox ESR and option to use experimental xpi's because I didn't get it signed.

best regards,

elementdavv commented 6 months ago

this still isn't working for me. tried on both chrome and firefox. https://archive.org/details/scalesoffatetrad0000monr/mode/2up

extension 0.7.0 firefox 126.0 (64-bit) chrome 124.0.6367.208 (Official Build) (arm64) mac m1

here's the message logs. firefox:console-export-2024-5-18_15-52-8.txt chrome:archive.org-1716048304150.log

From the firefox log, the extension does not work in your firefox instance. This is happened for few people. There is no solution now. From the chrome log, all requests succeeded except the one causing 404 error:

ia802702.us.archive.org/BookReader/BookReaderImages.php?zip=/10/items/scalesoffatetrad0000monr/scalesoffatetrad0000monr_jp2.zip&file=scalesoffatetrad0000monr_jp2/scalesoffatetrad0000monr_0199.jp2&id=scalesoffatetrad0000monr&scale=1&rotate=0:1

An unexpected ":1" appended to the tail of the link. So you can retry.

moraks commented 2 months ago

TypeError: NetworkError when attempting to fetch resource. Reason: CORS header 'Access-Control-Allow-Origin' missing [Uploading console-export-2024-8-31_9-48-22.txt…]()

elementdavv commented 2 months ago

TypeError: NetworkError when attempting to fetch resource. Reason: CORS header 'Access-Control-Allow-Origin' missing Uploading console-export-2024-8-31_9-48-22.txt…

Use Chrome instead.