apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.52k stars 1.51k forks source link

B&N error: invalid code lengths set (or Nook for PC Sign in: 1017 error) #595

Closed vanessa-luna closed 6 years ago

vanessa-luna commented 6 years ago

I have jumped through many hoops and cannot seem to find the answer.

I have also tried just taking a copy of the file from the SD card on the phone. Sometimes I get different errors, such as "invalid block length". I also tried setting up a virtual machine with Windows 7 to see if that would make it easier. No difference. Same errors.

I am guessing it is related to the book? The way I downloaded it? Plz Any thoughts would be wondrous, I'm getting discouraged.

----------

DeDRM v6.6.1: Trying to decrypt 9781849352611_epub.v2.epub DeDRM v6.6.1: Verifying zip archive integrity DeDRM v6.6.1: “9781849352611_epub.v2.epub” is a secure Barnes & Noble ePub

DeDRM v6.6.1: Trying Encryption key bnepubkey

Could not decrypt nZ4lSn.epub because of an exception: Traceback (most recent call last): File "calibre_plugins.dedrm.ignobleepub", line 316, in decryptBook File "calibre_plugins.dedrm.ignobleepub", line 234, in decrypt File "calibre_plugins.dedrm.ignobleepub", line 224, in decompress

error: Error -3 while decompressing: invalid code lengths set

DeDRM v6.6.1: Failed to decrypt with key bnepubkey after 0.1 seconds DeDRM v6.6.1: Looking for new NOOK Study Keys after 0.1 seconds DeDRM v6.6.1: Running ignoblekey.py under Wine DeDRM v6.6.1: Command line: 'WINEPREFIX="/home/USER" wine python.exe "/home/USER/.config/calibre/plugins/DeDRM/libraryfiles/ignoblekey.py" "/home/USER/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir"' /bin/sh: 1: wine: not found DeDRM v6.6.1: Found and decrypted 0 key files DeDRM v6.6.1: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "site-packages/calibre/customize/ui.py", line 171, in _run_filetype_plugins File "calibre_plugins.dedrm.init", line 632, in run File "calibre_plugins.dedrm.init", line 301, in ePubDecrypt DeDRMError: DeDRM v6.6.1: Ultimately failed to decrypt after 0.1 seconds.

ElleKayEm commented 6 years ago

You're able to successfully retrieve your B&N key by entering your account email and password into the plugin customization?

You could try installing the old Nook for PC program in your Windows 7 virtual machine and importing books downloaded there.

http://images.barnesandnoble.com/PResources/download/eReader2/bndr2_setup_latest.exe

vanessa-luna commented 6 years ago

Thank you for a quick reply <3

Yes I was able to get my key with no problem. I retrieved it using the plugin customization and using the standalone scripts and got the same info.

I installed the software you linked. When I try to login I get an error

We've encountered a network error - please try again. (Sign in: 1017)

Maybe that's because they totally shut down support for it? The only thread I found in a few minutes was from years ago talking about them dropping support..

ElleKayEm commented 6 years ago

It still works for me, but I know others have issues. There was some discussion about Nook for PC relying on IE -- see posts #1418 & 1420 here:

https://www.mobileread.com/forums/showthread.php?t=246519&page=95

Or you might be able to retrieve a different key for your Android nookbooks with this info:

https://apprenticealf.wordpress.com/2012/09/10/drm-removal-tools-for-ebooks/comment-page-40/#comment-63891

vanessa-luna commented 6 years ago

Thanks again for the input!

Changing my internet options to Include TLS 1.2 worked.

I have successfully logged onto Nook for PC in my Win7 VM, downloaded the .epub, imported the book into Calibre (after the plugin was installed). I then took the new .epub, put it on my Android and opened using Moon Reader.

vanessa-luna commented 6 years ago

Review:

Unfortunately, I did not resolve the issue locally on my Linux environment. Still I cannot convert my B&N books there. However, I am lucky enough to have a Win7 key and .iso for a Virtual Machine.

Steps I took:

  1. In Windows 7 install Calibre and the DeDRM plugin.
  2. Retrieve your encryption key in the plugin customizations
  3. Following the instructions here, Open the Control Panel, type "Internet Options" and open those settings. In the dialog select the Advanced tab. Scroll to the Security header (near the bottom) and enable "Use TLS 1.2"
  4. Download and install the old Nook For PC app
  5. Login to Nook for PC app
  6. In Library click the download button for your book(s)
  7. In calibre, click add books, and navigate to My Documents > My Barnes & Noble eBooks. You will find your books in there.

Hopefully this helps anyone else if they stumble on this.

ElleKayEm commented 6 years ago

You're using books from the Nook Android app in the Linux setup? Seems like they might have a different key. Some (most?) B&N accounts use the same key no matter how books are downloaded. Occasionally I've seen people have a different key for some apps. No idea why.

vanessa-luna commented 6 years ago

In Linux, I couldn't find another way to download the books. The B&N helper greasemonkey script no longer works with their new "library" page. I did not look very hard before thinking it would easier if I just downloaded the book on my phone and transfered it in. I am very grateful for your comments.