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

Can't decrypt kobo's book #57

Open
grtfou opened this issue Mar 28, 2022 · 40 comments
Open

Can't decrypt kobo's book #57

grtfou opened this issue Mar 28, 2022 · 40 comments

Comments

@grtfou
Copy link

grtfou commented Mar 28, 2022

Question / bug report

The same error as this

Which version of Calibre are you running?

5.39.1

Which version of the DeDRM plugin are you running?

v10.0.2 and v7.2.1

If applicable, which version of the Kindle software are you running?

No response

Log output

    Traceback (most recent call last):
      File "calibre\customize\ui.py", line 451, in set_file_type_metadata
      File "calibre\customize\builtins.py", line 439, in set_metadata
      File "calibre\ebooks\metadata\epub.py", line 261, in set_metadata
      File "calibre\ebooks\metadata\epub.py", line 155, in read_bytes
      File "calibre\utils\zipfile.py", line 1005, in read
      File "calibre\utils\zipfile.py", line 1033, in open
      File "calibre\utils\zipfile.py", line 994, in getinfo
    KeyError: "There is no item named 'OPS/advanced.opf' in the archive"
  • Windows 10
  • Calibre: 5.39.1
  • DeDRM: 10.0.2 and v7.2.1
  • Obok DeDRM: 10.0.0
  • Adobe Digital Editions: 4.5.11

Thank you.

@ElleKayEm
Copy link

Are you using Kobo and Obok or ADE and DeDRM? Or are you getting the same error with both?

@grtfou
Copy link
Author

grtfou commented Mar 28, 2022

Yes.
(O) ADE and Kobo can open the book with DRM exist.
(X) Export the EPUB book from ADE. It can't use Calibre to remove DRM by DeDRM.
(X) Calibre's bottom "Obok DeDRM" also got remove DRM fail.


test1
abc1

@noDRM
Copy link
Owner

noDRM commented Mar 28, 2022

This log you posted is from you trying to open the book. You need to post a log from the import attempt.

@grtfou
Copy link
Author

grtfou commented Mar 28, 2022

I can import the book. No error.
But convert, open or remove DRM will get error.

Does this log can help?

Convert book 1 / 1 (mybook)
DeDRM v10.0.2: Trying to decrypt cf_lgj1i.epub
DeDRM v10.0.2: Verifying zip archive integrity
DeDRM v10.0.2: Post-processing took 0.0 seconds
DeDRM v10.0.2: Finished after 2.2 seconds
Conversion options changed from defaults:
  dont_compress: True
  read_metadata_from_opf: 'C:\\Users\\Leo\\AppData\\Local\\Temp\\calibre_4zxgvew3\\gwfdaa15.opf'
  verbose: 2
  output_profile: 'kindle_pw3'
Resolved conversion options
calibre version: 5.39.1
{'asciiize': False,
 'author_sort': None,
 'authors': None,
 'base_font_size': 0.0,
 'book_producer': None,
 'change_justification': 'original',
 'chapter': "//*[((name()='h1' or name()='h2') and re:test(., "
            "'\\s*((chapter|book|section|part)\\s+)|((prolog|prologue|epilogue)(\\s+|$))', "
            "'i')) or @class = 'chapter']",
 'chapter_mark': 'pagebreak',
 'comments': None,
 'cover': None,
 'debug_pipeline': None,
 'dehyphenate': True,
 'delete_blank_paragraphs': True,
 'disable_font_rescaling': False,
 'dont_compress': True,
 'duplicate_links_in_toc': False,
 'embed_all_fonts': False,
 'embed_font_family': None,
 'enable_heuristics': False,
 'expand_css': False,
 'extra_css': None,
 'extract_to': None,
 'filter_css': '',
 'fix_indents': True,
 'font_size_mapping': None,
 'format_scene_breaks': True,
 'html_unwrap_factor': 0.4,
 'input_encoding': None,
 'input_profile': <calibre.customize.profiles.InputProfile object at 0x0000029C51177310>,
 'insert_blank_line': False,
 'insert_blank_line_size': 0.5,
 'insert_metadata': False,
 'isbn': None,
 'italicize_common_cases': True,
 'keep_ligatures': False,
 'language': None,
 'level1_toc': None,
 'level2_toc': None,
 'level3_toc': None,
 'line_height': 0.0,
 'linearize_tables': False,
 'margin_bottom': 5.0,
 'margin_left': 5.0,
 'margin_right': 5.0,
 'margin_top': 5.0,
 'markup_chapter_headings': True,
 'max_toc_links': 50,
 'minimum_line_height': 120.0,
 'mobi_file_type': 'old',
 'mobi_ignore_margins': False,
 'mobi_keep_original_images': False,
 'mobi_toc_at_start': False,
 'no_chapters_in_toc': False,
 'no_inline_navbars': True,
 'no_inline_toc': False,
 'output_profile': <calibre.customize.profiles.KindlePaperWhite3Output object at 0x0000029C51177880>,
 'page_breaks_before': '/',
 'personal_doc': '[PDOC]',
 'prefer_author_sort': False,
 'prefer_metadata_cover': False,
 'pretty_print': False,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': 'C:\\Users\\Leo\\AppData\\Local\\Temp\\calibre_4zxgvew3\\gwfdaa15.opf',
 'remove_fake_margins': True,
 'remove_first_image': False,
 'remove_paragraph_spacing': False,
 'remove_paragraph_spacing_indent_size': 1.5,
 'renumber_headings': True,
 'replace_scene_breaks': '',
 'search_replace': '[]',
 'series': None,
 'series_index': None,
 'share_not_sync': False,
 'smarten_punctuation': False,
 'sr1_replace': None,
 'sr1_search': None,
 'sr2_replace': None,
 'sr2_search': None,
 'sr3_replace': None,
 'sr3_search': None,
 'start_reading_at': None,
 'subset_embedded_fonts': False,
 'tags': None,
 'timestamp': None,
 'title': None,
 'title_sort': None,
 'toc_filter': None,
 'toc_threshold': 6,
 'toc_title': None,
 'transform_css_rules': '[]',
 'transform_html_rules': '[]',
 'unsmarten_punctuation': False,
 'unwrap_lines': True,
 'use_auto_toc': False,
 'verbose': 2}
DeDRM v10.0.2: Trying to decrypt 3k1l0ja_.epub
DeDRM v10.0.2: Verifying zip archive integrity
DeDRM v10.0.2: Post-processing took 0.0 seconds
DeDRM v10.0.2: Finished after 2.1 seconds
InputFormatPlugin: EPUB Input running
on C:\Users\Leo\AppData\Local\Temp\calibre_4zxgvew3\f3brhmon.epub
Parsing all content...
Parsing OPS/navigation_standard.xhtml ...
Referenced file 'js/kobo.js' not found
The item OPS/images/08X10000000019511300_cover.jpg is not a XML document. Removing it from spine.
The item OPS/images/08_X10000_000019_1_dorigin_01_001.jpg is not a XML document. Removing it from spine.
The item OPS/images/08_X10000_000019_3_001_001.jpg is not a XML document. Removing it from spine.
The item OPS/images/08_X10000_000019_3_002_001.jpg is not a XML document. Removing it from spine.
...
Traceback (most recent call last):
  File "runpy.py", line 194, in _run_module_as_main
  File "runpy.py", line 87, in _run_code
  File "site.py", line 82, in <module>
  File "site.py", line 77, in main
  File "site.py", line 49, in run_entry_point
  File "calibre\utils\ipc\worker.py", line 215, in main
  File "calibre\gui2\convert\gui_conversion.py", line 38, in gui_convert_override
  File "calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
  File "calibre\ebooks\conversion\plumber.py", line 1118, in run
  File "calibre\ebooks\conversion\plumber.py", line 1323, in create_oebbook
  File "calibre\ebooks\oeb\reader.py", line 71, in __call__
  File "calibre\ebooks\oeb\reader.py", line 698, in _all_from_opf
  File "calibre\ebooks\oeb\reader.py", line 343, in _spine_from_opf
calibre.ebooks.oeb.base.OEBError: Spine is empty

@ElleKayEm
Copy link

@grtfou
Copy link
Author

grtfou commented Mar 28, 2022

Thanks for your help, @ElleKayEm. I got the log.

calibre Debug log
calibre 5.39.1 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (10, 0, 2) && Obok DeDRM (10, 0, 0)
calibre 5.39.1 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (10, 0, 2) && Obok DeDRM (10, 0, 0)
Turning on automatic hidpi scaling
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 81.55183946488295 x 81.64285714285714
Using calibre Qt style: True
[0.00] Starting up...
[0.00] Showing splash screen...
[0.55] splash screen shown
[0.55] Initializing db...
[0.56] db initialized
[0.56] Constructing main UI...
DEBUG:    0.0 obok::utilities.py - loading translations
DEBUG:    0.0 obok::dialogs.py - loading translations
DEBUG:    0.0 obok::config.py - loading translations
DEBUG:    0.0 obok::action_err.py - loading translations
[1.20] main UI initialized...
[1.20] Hiding splash screen
Starting QuickView
DeDRM v10.0.2: Trying to decrypt mybook.epub
DeDRM v10.0.2: Verifying zip archive integrity
DeDRM v10.0.2: mybook.epub is a secure Adobe Adept ePub for UUID 040a024d-f220-457d-854d-9409f08bfdbd
DeDRM v10.0.2: Trying Encryption key default_key
vvqnvjsn.epub is a secure Adobe Adept ePub.
[2.95] splash screen hidden
[2.95] Started up in 2.95 seconds with 312 books
DeDRM v10.0.2: Decrypted with key default_key after 2.3 seconds
DeDRM v10.0.2: Post-processing took 0.0 seconds
DeDRM v10.0.2: Finished after 2.3 seconds
Traceback (most recent call last):
  File "calibre\customize\ui.py", line 432, in get_file_type_metadata
  File "calibre\customize\builtins.py", line 167, in get_metadata
  File "calibre\ebooks\metadata\epub.py", line 217, in get_metadata
  File "calibre\ebooks\metadata\epub.py", line 155, in read_bytes
  File "calibre\utils\zipfile.py", line 1005, in read
  File "calibre\utils\zipfile.py", line 1033, in open
  File "calibre\utils\zipfile.py", line 994, in getinfo
KeyError: "There is no item named 'OPS/advanced.opf' in the arAdded mybook to db in: 0.2
Added 1 books in 2.7 seconds

@nephtys59
Copy link

I have same problem. Obok sees the books as DRM free, but in the reality they are all protected by Adobe DRM.
The ebooks are imported without errors, but then they are unreadable with strange symbols.
2022-03-29 22_23_23-Window

@ElleKayEm
Copy link

@nephtys59 Are you able to decrypt these books using ADE and DeDRM instead of Kobo and Obok?

@nephtys59
Copy link

No, it doesn't work anyway.

@ElleKayEm
Copy link

@nephtys59 Your issue seems different as Obok thinks the books are DRM-free to begin with. Does DeDRM do the same?

@nephtys59
Copy link

Yes, the book is imported without errors in calibre but not dedrm-ed and it's unreadable. I want to mention that I tried other methods outside calibre, and none of them works on these ebooks. Kobo declares that those books are Adobe DRM protected, but I can't seem to find anything that manages to remove that DRM. Maybe an update of the plugin is needed, so that it may recognize the hidden DRM? I'm not an expert, but I'm wondering ... if you need logs or other screenshots, let me know.

@nephtys59
Copy link

These log shows 3 import attempt (each time I deleted the file).
First attempt: add file with its original file name from kobo folder '7239227e-efc6-4761-9f64-187b18bc6e57' - error (not imported)
Second attempt: add file renamed (prova.epub) - added without errors (unreadable)
Third attempt: import through Obok - imported without errors (unreadable)

EpubMerge: DEBUG: 2022-03-30 17:08:31,966: calibre_plugins.epubmerge.epubmerge_plugin(155): macmenuhack file_path:D:\Biblioteca\Calibre Portable\Calibre Settings\plugins\fanficfare_macmenuhack.txt
FFF: DEBUG: 2022-03-30 17:08:31,983: calibre_plugins.fanficfare_plugin.fff_plugin(218): Plugin FanFicFare macmenuhack file_path:D:\Biblioteca\Calibre Portable\Calibre Settings\plugins\fanficfare_macmenuhack.txt
calibre Log di debug
calibre 5.39 Portable embedded-python: True is64bit: False
Windows-10-10.0.19041 Windows ('32bit', 'WindowsPE')
32bit process running on 64bit windows
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: it
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 47, 0) && DeDRM (10, 0, 1) && Package KFX (from KFX Input) (1, 47, 0) && Amazon.com Multiple Countries (1, 0, 0) && Count Pages (1, 11, 2) && Diaps Editing Toolbag (0, 3, 7) && EpubCheck (0, 2, 4) && EpubMerge (2, 12, 0) && Extract ISBN (1, 5, 0) && FanFicFare (4, 11, 0) && Find Duplicates (1, 9, 4) && Generate Cover (2, 1, 0) && Goodreads (1, 5, 3) && KFX metadata reader (from KFX Input) (1, 47, 0) && KFX Input (1, 47, 0) && KindleUnpack - The Plugin (0, 83, 1) && Last Modified (0, 8, 2) && Modify ePub (1, 7, 0) && Obok DeDRM (10, 0, 0) && Reading List (1, 8, 0)
calibre 5.39 Portable embedded-python: True is64bit: False
Windows-10-10.0.19041 Windows ('32bit', 'WindowsPE')
32bit process running on 64bit windows
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: it
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 47, 0) && DeDRM (10, 0, 1) && Package KFX (from KFX Input) (1, 47, 0) && Amazon.com Multiple Countries (1, 0, 0) && Count Pages (1, 11, 2) && Diaps Editing Toolbag (0, 3, 7) && EpubCheck (0, 2, 4) && EpubMerge (2, 12, 0) && Extract ISBN (1, 5, 0) && FanFicFare (4, 11, 0) && Find Duplicates (1, 9, 4) && Generate Cover (2, 1, 0) && Goodreads (1, 5, 3) && KFX metadata reader (from KFX Input) (1, 47, 0) && KFX Input (1, 47, 0) && KindleUnpack - The Plugin (0, 83, 1) && Last Modified (0, 8, 2) && Modify ePub (1, 7, 0) && Obok DeDRM (10, 0, 0) && Reading List (1, 8, 0)
Turning on automatic hidpi scaling
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 95.81139489194499 x 95.9160839160839
Using calibre Qt style: True
[0.00] Starting up...
[0.00] Showing splash screen...
[0.64] splash screen shown
[0.64] Initializing db...
[0.64] db initialized
[0.64] Constructing main UI...
DEBUG: 0.0 obok::utilities.py - loading translations
DEBUG: 0.0 obok::dialogs.py - loading translations
DEBUG: 0.0 obok::config.py - loading translations
DEBUG: 0.0 obok::action_err.py - loading translations
D:\Download\Ebook is not a valid directory to watch for new ebooks, ignoring
[3.08] main UI initialized...
[3.08] Hiding splash screen
Starting QuickView
[19.33] splash screen hidden
[19.33] Started up in 19.33 seconds with 19 books
stdout+stderr from file dialog helper: [b'', b'']
piped data from file dialog helper: [b"\xf9&'\x9d\x8dM\xae\x97\x19\xb5;\x0f\xfb\xbeY\x14\x89f\x8dR\xcbM5\x93:\xae_\x1a\x9b\x800\x94", b'C:\Users\nepht\AppData\Local\Kobo\Kobo Desktop Edition\kepub\7239227e-efc6-4761-9f64-187b18bc6e57']
Added 7239227e-efc6-4761-9f64-187b18bc6e57 to db in: 1.0
DeDRM v10.0.1: Trying to decrypt prova.epub
DeDRM v10.0.1: Verifying zip archive integrity
Added 1 books in 1.5 seconds
stdout+stderr from file dialog helper: [b'', b'']
piped data from file dialog helper: [b'\xbf\x8f<\xb3\xd1\xed\xbdM(\xef\xe6\x9a\xca\xab\xea\x8f$g\xd4WP\x80f,\xe8\xe9V\xe7v\xa0\xf4\xda', b'C:\Users\nepht\AppData\Local\Kobo\Kobo Desktop Edition\kepub\prova.epub']
DeDRM v10.0.1: “prova.epub” is neither an Adobe Adept nor a Barnes & Noble encrypted ePub
DeDRM v10.0.1: Finished after 2.4 seconTraceback (most recent call last):
File "calibre\db\cache.py", line 1457, in set_metadata
File "calibre\db\cache.py", line 1380, in set_cover
File "calibre\db\backend.py", line 1531, in set_cover
File "calibre\utils\img.py", line 287, in save_cover_data_to
File "calibre\utils\img.py", line 195, in image_to_data
ValueError: Failed to export image as JPEG with error: Image is empty
Traceback (most recent call last):
File "calibre\db\cache.py", line 1457, in set_metadata
File "calibre\db\cache.py", line 1380, in set_cover
File "calibre\db\backend.py", line 1531, in set_cover
File "calibre\utils\img.py", line 287, in save_cover_data_to
File "calibre\utils\img.py", line 195, in image_to_data
ValueError: Failed to export image as JPEG with error: Image is empty
Added Forever Young - Gemini, Apollo, Shuttle: una vita per lo spazio to db in: 1.5
Added 1 books in 4.4 seconds
Running Obok DeDRM v10.0.0
DEBUG: 125.3 didn't find device
Obok v4.0.0
Copyright © 2012-2020 Physisticated et al.
C:\Users\nepht\AppData\Local\Temp\tmp09sb0zh9
DEBUG: 125.3 got kobodir C:/Users/nepht/AppData/Local/Kobo/Kobo Desktop Edition
Found 8 possible keys to try.
DEBUG: 131.2 BookListTableWidget:get_books - book_num: 1
DEBUG: 131.2 BookListTableWidget:get_books - book: Forever Young – Gemini, Apollo, Shuttle: una vita per lo spazio
DEBUG: 131.2 InterfacePluginAction::launchObok - number of books to decrypt: 1
Obok DeDRM v10.0.0 - Decrypting Forever Young – Gemini, Apollo, Shuttle: una vita per lo spazio
Trying key: b'ece6e607dc685389aacdc94de1cc0d37'
Success!
DEBUG: 133.4 DecryptAddProgressDialog::do_book_action - decrypted book: 'Forever Young – Gemini, Apollo, Shuttle: una vita per lo spazio'
Obok DeDRM v10.0.0 - Added Forever Young - Gemini, Apollo, Shuttle: una vita per lo spazio
Obok DeDRM v10.0.0 - wrapping up results.

2022-03-30 17_10_51-Window
2022-03-30 17_10_06-Window

OS: Windows 10 - Calibre 5.39

@ElleKayEm
Copy link

Books downloaded with Kobo apps/devices can only be decrypted with Obok. To see if DeDRM will work on them, you need to download the Adobe DRM versions.

@nephtys59
Copy link

I tried with Obok ---> doesn't work (file unreadable)
I tried with Dedrm ---> doesn't work (file unreadable)
I can download ebooks ONLY through Kobo Desktop App, there's no other way.
Is there a solution or should I give up and cancel my Kobo subscription? I don't like their app to read ebooks, I prefer a different reader, that is the reason why I need to remove DRM.

@ElleKayEm
Copy link

@nephtys59 To download the Adobe DRM versions, go to "My Books" on the Kobo website. You'll get the acsm file which you open with Adobe Digital Editions. (Needs to be authorized with an Adobe ID and on the same machine and user as calibre with DeDRM).

@nephtys59
Copy link

Sorry but there's no download option for that book
2022-03-30 17_52_49-Window

@ElleKayEm
Copy link

@nephtys59 Ah, is it borrowed instead of purchased? If so, that may be why Obok isn't working on it.

@nephtys59
Copy link

@nephtys59 Ah, is it borrowed instead of purchased? If so, that may be why Obok isn't working on it.

oh ok, so Obok works only on purchased ebooks and not on borrowed ones - thanks

@ElleKayEm
Copy link

@nephtys59 Ah, is it borrowed instead of purchased? If so, that may be why Obok isn't working on it.

oh ok, so Obok works only on purchased ebooks and not on borrowed ones - thanks

Just a guess on my part that Kobo does something different with those books that Obok isn't setup for.

@grtfou
Copy link
Author

grtfou commented Mar 31, 2022

@nivevas Yes, it is manga and picture albums.
It can work last year by my other manga books.
Not sure why it can't work on my new manga books.
Maybe I could try KCC. Thanks for your advice. :)

@noDRM
Copy link
Owner

noDRM commented Mar 31, 2022

The question is, does it not work because the DRM removal actually fails, or does it not work because Calibre cannot open / read these manga books.

Try opening the imported file with another eBook reader, or just extract its ZIP file and see if the contents are readable.

@federicorosso1993
Copy link

I got the same problem with acquired manga. When I extract the epub images (open it as a zip) the images are not readable.
the manga is not borrowed in my case so I can use the alternative ADE epub that works. Still Obok for me is broken right now for manga/comics, it still works for ebooks (I just tried it again to be sure).
It worked in the past for manga too, so I'm not sure what changed

@federicorosso1993
Copy link

federicorosso1993 commented Mar 31, 2022

PS. I understand the problem now (at least my problem, not sure if it's the same as the op problem anymore).
When I download a manga while both calibre and kobo are open (and I only got one manga downloaded) it will see it as drm-free (even when it's not) so it will not even try to decrypt it (at least in my case). When I tried to click on Obok again after I closed Kobo (or if I download an ebook) it will see it as drm so it will decrypt it.
If after that I download another manga it will see only the new manga as drm-free (even if it's not) but only if I don't have any ebook downloaded (for some reason one ebook downloaded from kobo with drm, will list every other manga as drm like it should).

@ElleKayEm
Copy link

The OP is getting the same error with both Obok and DeDRM:

KeyError: "There is no item named 'OPS/advanced.opf' in the archive"

So it looks like an error in the book itself that is tripping up both of the tools.

@davidfor
Copy link

davidfor commented Apr 1, 2022

I have same problem. Obok sees the books as DRM free, but in the reality they are all protected by Adobe DRM.

That is not correct. Kobo uses their own DRM for books books downloaded directly to Kobo ereaders or using their desktop application. This is why Obok exist. These books cannot be decrypted with the same tools used for Adobe DRM.

As to the error, it is either a fault in the book (that there is no "OPS/advanced.opf" in the book) or it is because it is a borrowed book (either from a library or using Kobo Plus) uses a different DRM that Obok does not support.

@federicorosso1993
Copy link

federicorosso1993 commented Apr 1, 2022

I have same problem. Obok sees the books as DRM free, but in the reality they are all protected by Adobe DRM.

That is not correct. Kobo uses their own DRM for books books downloaded directly to Kobo ereaders or using their desktop application. This is why Obok exist. These books cannot be decrypted with the same tools used for Adobe DRM.

As to the error, it is either a fault in the book (that there is no "OPS/advanced.opf" in the book) or it is because it is a borrowed book (either from a library or using Kobo Plus) uses a different DRM that Obok does not support.

Or, like I said in my last post, you need to close the Kobo app/download a book.
For some reason when I download a manga/comic without closing the Kobo app (or downloading a book) Obok see the file as DRM-Free. The issues will solve itself when you close the Kobo app (Obok will start to see the manga/comic ebook as drm and will decrypt it correctly).
That's true at least for bought manga/comic

@nephtys59
Copy link

For me, with borrowed books, it doesn't work even if I close the kobo app. Obok see the DRM-ed books as they were DRM free and doesn't decrypt them.

@fatima-toothpaste
Copy link

fatima-toothpaste commented Sep 7, 2022

DRM has not been changed. But there's a difference in file structure for newer manga/comic.

Fisrt, you can just delete "OPS/advanced.opf" line in "container.xml" using e-book editor bundled with calibre. And importing it after deletion still produces invalid epub. But unzip that epub and you can see those images decrypted.

Second, They are directly using image in spine instead of xml. That is the reason what makes epub unreadable. Maybe we should create xhtml by ourselves and replace those occurrences on "OPS/standard.opf", "OPS/navigation_standard.ncx".

@nephtys59
Copy link

I have discovered that, if the borrowed books are downloaded directly on the kobo e-reader and then you connect the device to calibre, obok decrypts them perfectly. So, the issue is limited to books downloaded with kobo desktop app for PC.

@fmdmf
Copy link

fmdmf commented Sep 27, 2022

I tried it again today with the new version of Kobo desktop app on Windows 11 and noDRM's latest version of tools, and the error still persists. If it's limited to the desktop app, I wonder if other versions of the app will have the same issue.

@ElleKayEm
Copy link

@fmdmf Is it just a specific book you're unable to decrypt or all of your Kobo books?

@fmdmf
Copy link

fmdmf commented Sep 27, 2022

@ElleKayEm Of the 70+ books I have on Kobo's desktop app, only about 3 could be successfully de-DRMed with Obok. The rest of them still give me the same issue I had in my previous issue report, linked to in OP's post.

@ElleKayEm
Copy link

You were also getting that error on the Adobe DRM books with DeDRM, right?

"There is no item named 'OPS/advanced.opf' in the archive"

@fmdmf
Copy link

fmdmf commented Sep 27, 2022

That's exactly right, yes.

@japzone1
Copy link

japzone1 commented Jan 6, 2023

PS. I understand the problem now (at least my problem, not sure if it's the same as the op problem anymore). When I download a manga while both calibre and kobo are open (and I only got one manga downloaded) it will see it as drm-free (even when it's not) so it will not even try to decrypt it (at least in my case). When I tried to click on Obok again after I closed Kobo (or if I download an ebook) it will see it as drm so it will decrypt it. If after that I download another manga it will see only the new manga as drm-free (even if it's not) but only if I don't have any ebook downloaded (for some reason one ebook downloaded from kobo with drm, will list every other manga as drm like it should).

This was it! If the Kobo app is open, Obok acts like the books are DRM-free for some reason. As soon as I close Kobo, Obok detects the DRM and properly removes it.

@fmdmf
Copy link

fmdmf commented Jan 10, 2023

I updated Calibre and deDRM + Obok and tried again, but unfortunately had no luck. I still get

KeyError: "There is no item named 'OPS/advanced.opf' in the archive"

@japzone1 Might I enquire as to which version of Calibre, the plugins and Kobo Desktop app you're currently using?

@japzone1
Copy link

japzone1 commented Jan 10, 2023

I updated Calibre and deDRM + Obok and tried again, but unfortunately had no luck. I still get

KeyError: "There is no item named 'OPS/advanced.opf' in the archive"

@japzone1 Might I enquire as to which version of Calibre, the plugins and Kobo Desktop app you're currently using?

@fmdmf
Calibre v5.23
Kobo Desktop v4.35.18074
Obok v10.0.3

@fmdmf
Copy link

fmdmf commented Jan 10, 2023

@japzone1 Thank you.

Can confirm it doesn't work with my versions of the apps:

Calibre 6.11.0
Obok 10.0.3
Kobo Desktop v4.34.17799

@tonysprenk
Copy link

I have the same issue. Kobo books that were bought work fine but kobo books that were rented in Kobo Plus are recognised as not having DRM by obok. Which means the conversion fails. Any workaround?

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

No branches or pull requests

11 participants