Skip to content
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

Loading State Failed #206

Open
blindsamurai777 opened this issue May 9, 2024 · 30 comments · May be fixed by #240
Open

Loading State Failed #206

blindsamurai777 opened this issue May 9, 2024 · 30 comments · May be fixed by #240

Comments

@blindsamurai777
Copy link

Just dropping in to say the Loading State Failed is happening again. All books. All instances. OverDrive/Libby made a back-end change to close the recent fix @ahxxm developed. Hoping someone can take a look and implement an easy fix.

@lexi1507
Copy link

lexi1507 commented May 9, 2024

Same thing happening to me, hoping for a fix soon

@qbaas
Copy link

qbaas commented May 10, 2024

yes. Same issue - looks like another change from Libby to block this extension.
Screenshot 2024-05-09 at 17 35 07

@DresdenErikson
Copy link

Yep, same issue for me. Fingers crossed for a fix, but I understand why it might take a while.

@EverythingIsDucky
Copy link

EverythingIsDucky commented May 10, 2024

FYI, I have never worked with Firefox extensions before but I thought I would look into this error. It is failing inside background.ts - handleTitle call to parseTOC. The Overdrive server is returning a link to their "Terms and Conditions" instead of a Title and instead of a URL path it has "-d/access violation". Obviously the get call for the book TOC is not valid and OD server code has caught this.

@BLS-Pro
Copy link

BLS-Pro commented May 11, 2024

Experiencing the same error as well. Interestingly, on a very few occasions it will get past the above loading state error/failed and give that error here instead (can't screenshot my popup):

| File | Task | Status

-- | -- | -- | --
1 |   | Loading State | Failed
2 | Part01 | Download | Running
3 | Terms & Conditions: https://company.cdn.overdrive.com/policies/terms-and-conditions | Processing | Running
4 |   | Waiting for State | Completed
5 |   | Reloading Tab | Completed

@mdf1963
Copy link

mdf1963 commented May 11, 2024

Same here. Will help support anyone with the skill and time to create a fix. This extension is so valuable!!

@lexi1507
Copy link

Anyone find a solution or alternate resource?

@czargamingco
Copy link

My experience is lining up with all your reports. I have been able to get the same logs to trigger at least once. But they are always failing out.

@SpeakingOfBrad
Copy link

I found how to manually download the audio of the audiobook, but it does not download the table of contents or create a .cue file so it's only sort of useful.
I only tested this in Firefox, but I'm sure it works in Chrome too.
Open Libby, then open developer tools (F12), and go to the network tab and type .mp3 in the Filter URLs box at the top. Open your audiobook and scrub through your audiobook. As you do you'll see the Part1.mp3 Part2.mp3 etc show up. Then right-click each mp3 and open in new tab, then right-click the player bar that opens and Save audio as...

Once you have all the parts of the audiobook you can probably use tools like AudioBookConverter and m4b-tool to find the chapters of the book and create the .cue files.

I'd also like to mention for those who don't know that bookbonobo has a Ko-Fi that you can donate to show your support.

@BLS-Pro
Copy link

BLS-Pro commented May 15, 2024

One thing to note in the above instructions: when you get into the developers tool and go to the network tab, make sure that "All" is selected in those network settings. Mine had been left on a different setting at first and, until I changed it, this did not work. :)

@czargamingco
Copy link

I have mine set to ALL and am only seeing one result from the search. Hovering over it to read the URL it only says part 1. Opening in new tab works.

@BLS-Pro
Copy link

BLS-Pro commented May 15, 2024

You still have to scrub through the entire book to see all the files. But double clicking on each URL will indeed take you to the mp3 file, which you can then right-click and follow the rest of the directions.

@czargamingco
Copy link

Is scrubbing just jumping the chapters? That is what is am confused what is "part 1 " vs "part 2" part xyz

@BLS-Pro
Copy link

BLS-Pro commented May 15, 2024

Scrubbing is indeed just jumping the chapters. Doing so should create a list of gobbledygook file names which include the terms "part01.mp3 etc in them.

@czargamingco
Copy link

Thanks for helping me double confirm that. Awesome work everyone teaming up to get this looked into. Of course this happened right when my stuff came in after weeks of waiting.

@SpeakingOfBrad
Copy link

When skipping through chapters make sure to pay attention to the filenames and make sure it doesn't skip any part numbers. I had a book that had multiple part files in one chapter so I had to skip through that chapter to make sure I got all of the audio files.
(And maybe skip through the whole of the last chapter to make sure you don't miss the very end of the book.)

@czargamingco
Copy link

czargamingco commented May 15, 2024

Just confirmed with my test parts1-20 all worked as told to be scrapped #206 (comment)

THANKS!

@Prajna-Karuna
Copy link

Prajna-Karuna commented May 15, 2024

Anyone find a solution or alternate resource?

The way I've been doing is the old overdrive way.
1- Locate your library on overdrive.com
2- Sign in and download the odm file.
3- Open it in the odm in the overdrive app. (see note below)
4- Copy the mp3 files to my desired location.

Note: If you don't have the overdrive app anymore you can still download the installation file at http://app.overdrive.com/downloads/ODMediaConsoleSetup.msi
See ping/odmpy#69 (comment)

@Prajna-Karuna
Copy link

Prajna-Karuna commented May 15, 2024 via email

@BLS-Pro
Copy link

BLS-Pro commented May 15, 2024

Do you see the "Have OverDrive for Mac/Windows"? If you click on the down arrow, a button will show with the option to download the mp.

Yeah. After I posted I went back and finally discovered that hidden little detail. You helped so quickly, you apparently saw my post before I deleted it. Thanks! :)

@lexi1507
Copy link

Anyone find a solution or alternate resource?

The way I've been doing is the old overdrive way. 1- Locate your library on overdrive.com 2- Sign in and download the odm file. 3- Open it in the odm in the overdrive app. (see note below) 4- Copy the mp3 files to my desired location.

Note: If you don't have the overdrive app anymore you can still download the installation file at http://app.overdrive.com/downloads/ODMediaConsoleSetup.msi See ping/odmpy#69 (comment)

This totally worked! Thank You! Do you bother with creating chapter .cue files?

@Jwink3101
Copy link

I have tried the manual way and only some files will download properly. They all play fine in Firefox but when you try to download some of them, they just sit and fail. I also tried on a remote computer. Is anyone else having this problem?

@audiojunky23
Copy link

Anyone find a solution or alternate resource?

The way I've been doing is the old overdrive way. 1- Locate your library on overdrive.com 2- Sign in and download the odm file. 3- Open it in the odm in the overdrive app. (see note below) 4- Copy the mp3 files to my desired location.
Note: If you don't have the overdrive app anymore you can still download the installation file at http://app.overdrive.com/downloads/ODMediaConsoleSetup.msi See ping/odmpy#69 (comment)

This totally worked! Thank You! Do you bother with creating chapter .cue files?

Yeah this is where I’m at. Different method but end result is multiple mp3 files. I want to merge them into a singular file (AudioBookConverter) but I want to make a CUE file so when I open it in the Books at, it reads each chapter as a chapter and not each part or just one long “chapter”. Love to hear if people have any idea on how to do automatically

@lexi1507
Copy link

The following suggestion may already have been made here -- if so, I missed it:

Audiobooks downloaded in the old OverDrive format -- consisting of multiple mp3 part-files with the chapter info for each file embedded in a custom "OverDrive" tag -- can be converted to a single-file m4b with embedded chapters (plus a cue file if you choose that option) using the free inAudible for Windows, which even provides a chapter editor.

inAudible is designed to handle Audible aax files by default. Instead, follow the path "File -> Open -> MP3 Processing" and select the folder with your OverDrive download.

The first pass converts the mp3 files to a single wav and collects the chapter info. The second pass creates the m4b and embeds the chapters into the tags and creates the optional cue file.

See https://www.epubor.com/what-is-inaudible-software.html for a safe link to download inAudible.

BLESS YOU JDISHINGTON, This worked perfectly, May you coffee or tea always be hot and may you hit every green light on all your travels :)

@thomasxwright
Copy link

Yeah this is happening to me too. I hope somebody is able to find a fix for the problem!

@Mischala
Copy link

Mischala commented Jun 3, 2024

Steps to extract the toc and spine:
1. There is a image/jpg item that loads in with a large amount of data included inline
2. Grab its contents, split on ",". Get the second item in the array
3. base64 decode this, split again on "-"
4. concatenate the first and last item in resulting array
5. Take resulting item, regex replace "/./g" -> "="
6. Regex replace again "/(.)(.)(.)(.)/g" -> "$4$3$2$1"
7. Base64 decode result.
8. This should give toc and spine.

Thanks for this.
Works perfectly in my implementation, after adjusting the replacement regex to "$4$2$3$1"

@bckelly1
Copy link

bckelly1 commented Jun 5, 2024

Steps to extract the toc and spine:

  1. There is a image/jpg item that loads in with a large amount of data included inline
  2. Grab its contents, split on ",". Get the second item in the array
  3. base64 decode this, split again on "-"
  4. concatenate the first and last item in resulting array
  5. Take resulting item, regex replace "/./g" -> "="
  6. Regex replace again "/(.)(.)(.)(.)/g" -> "$4$3$2$1"
  7. Base64 decode result.
  8. This should give toc and spine.

Thanks for this. Works perfectly in my implementation, after adjusting the replacement regex to "$4$2$3$1"

When I tried this, I get to step 3 and base64 says X@OT&zӮ;}=Ȣpbase64: invalid input

Not sure what I'm doing wrong. I'm using the larger of the two images in the page (favicon vs book), the content does look encoded, I'm starting with this shell command:
cat bookname.jpg | cut -d ',' -f 2 | base64 -di

What did you use?

@curtisgibby
Copy link

Steps to extract the toc and spine:

  1. There is a image/jpg item that loads in with a large amount of data included inline

@username1233414125: What is the URL format of the request/response that's made? I'm not seeing it in Firefox or Chrome.

image

@curtisgibby
Copy link

curtisgibby commented Aug 1, 2024

I was able to get the TOC JSON on my Mac by removing the -i part of the base64 commands, i.e.

cat toc.txt | cut -d "," -f 2 | base64 -d | awk -F- '{ print $1$5 }' | perl -lape 's/\./=/g' | perl -lape 's/(.)(.)(.)(.)/$4$2$3$1/g' | base64 -d

(That's good!)

The JSON contains references to the actual MP3 files, but they're relative to some unknown server, so I'm unsure what the full URL to download them would be.

(That's bad!)

Is there a way to reverse-engineer what's happening in the JS in the Libby page, so that this whole process can be automated again? e.g. complete the steps 1-8 as listed here, then download the MP3s as before, package it all up as before, etc.?

@ahxxm
Copy link
Contributor

ahxxm commented Aug 3, 2024

When downloading using dev console, there's no need to reverse engineer the process. Consider it this way: despite the obfuscation, the tab contains spine and actual links to the actual media files. The interaction remains click -> JavaScript -> load media files, inspect the javascript object BIF(book information f.......?) and go from there

@skittlesvampir skittlesvampir linked a pull request Aug 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.