05-11-2022, 12:57 AM | #166 |
Groupie
Posts: 182
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
|
If an error code is generated / returned by the server, it will be included in the log output. It won't be shown to the user (since a FileTypePlugin isn't allowed / able to show a popup message), but it can be seen in the log.
In this case, the plugin can't even send anything to the server as it fails to decrypt some of the activation information, so there's no error message for it to generate. In the next version it'll print a more useful error message (like "Authorization corrupt, try to re-authorize) into the log. As for the adobe error codes, I've started a list of all of them I could find during development of this plugin: https://github.com/Leseratte10/acsm-...be-error-codes Though, most of these are errors a normal end user will never encounter. |
05-14-2022, 08:57 AM | #167 |
Connoisseur
Posts: 53
Karma: 10
Join Date: Feb 2015
Device: Sony PRS-T1
|
Today I wanted to load an ASCM file, but the plugin was inactive, yesterday it worked. So I wanted to reinstall DeACSM 0.0.15, but it aborts with an error message.
Code:
calibre, version 5.42.0 ERROR: Unhandled exception: <b>InvalidPlugin</b>:Initialization of plugin Traceback (most recent call last): File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 304, in <module> libcrypto.EVP_PKEY_size.argtypes = [ File "/usr/lib/python3.10/ctypes/__init__.py", line 387, in __getattr__ func = self.__getitem__(name) File "/usr/lib/python3.10/ctypes/__init__.py", line 392, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /lib/x86_64-linux-gnu/libcrypto.so.3: undefined symbol: EVP_PKEY_size During handling of the above exception, another exception occurred: Traceback (most recent call last): File "calibre_plugins.deacsm.__init__", line 184, in initialize from calibre_plugins.deacsm.libadobe import createDeviceKeyFile, update_account_path File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 191, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.deacsm.libadobe", line 29, in <module> from oscrypto import keys File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in <module> from ._asymmetric import parse_certificate, parse_private, parse_public File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in <module> from .kdf import pbkdf1, pbkdf2, pkcs12_kdf File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in <module> from .util import rand_bytes File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in <module> from ._openssl.util import rand_bytes File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in <module> from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 15, in <module> from ._libcrypto_ctypes import ( File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 688, in <module> raise FFIEngineError('Error initializing ctypes') oscrypto._ffi.FFIEngineError: Error initializing ctypes During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/calibre/calibre/customize/ui.py", line 673, in initialize_plugin p.initialize() File "calibre_plugins.deacsm.__init__", line 187, in initialize from libadobe import createDeviceKeyFile, update_account_path ModuleNotFoundError: No module named 'libadobe' failed with traceback: Traceback (most recent call last): File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 304, in <module> libcrypto.EVP_PKEY_size.argtypes = [ File "/usr/lib/python3.10/ctypes/__init__.py", line 387, in __getattr__ func = self.__getitem__(name) File "/usr/lib/python3.10/ctypes/__init__.py", line 392, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /lib/x86_64-linux-gnu/libcrypto.so.3: undefined symbol: EVP_PKEY_size During handling of the above exception, another exception occurred: Traceback (most recent call last): File "calibre_plugins.deacsm.__init__", line 184, in initialize from calibre_plugins.deacsm.libadobe import createDeviceKeyFile, update_account_path File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 191, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.deacsm.libadobe", line 29, in <module> from oscrypto import keys File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in <module> from ._asymmetric import parse_certificate, parse_private, parse_public File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in <module> from .kdf import pbkdf1, pbkdf2, pkcs12_kdf File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in <module> from .util import rand_bytes File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in <module> from ._openssl.util import rand_bytes File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in <module> from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 15, in <module> from ._libcrypto_ctypes import ( File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 688, in <module> raise FFIEngineError('Error initializing ctypes') oscrypto._ffi.FFIEngineError: Error initializing ctypes During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/calibre/calibre/customize/ui.py", line 673, in initialize_plugin p.initialize() File "calibre_plugins.deacsm.__init__", line 187, in initialize from libadobe import createDeviceKeyFile, update_account_path ModuleNotFoundError: No module named 'libadobe' calibre 5.42 embedded-python: False is64bit: True Linux-5.17.7-2-siduction-amd64-x86_64-with-glibc2.33 Linux ('64bit', 'ELF') ('Linux', '5.17.7-2-siduction-amd64', '#1 SMP PREEMPT siduction 5.17-7.1 (2022-05-13)') Python 3.10.4 Interface language: None Successfully initialized third party plugins: DeDRM (7, 0, 0) && EpubMerge (2, 13, 0) && Extract ISBN (1, 5, 0) && Open With (1, 7, 0) && Search The Internet (1, 8, 1) Traceback (most recent call last): File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 304, in <module> libcrypto.EVP_PKEY_size.argtypes = [ File "/usr/lib/python3.10/ctypes/__init__.py", line 387, in __getattr__ func = self.__getitem__(name) File "/usr/lib/python3.10/ctypes/__init__.py", line 392, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /lib/x86_64-linux-gnu/libcrypto.so.3: undefined symbol: EVP_PKEY_size During handling of the above exception, another exception occurred: Traceback (most recent call last): File "calibre_plugins.deacsm.__init__", line 184, in initialize from calibre_plugins.deacsm.libadobe import createDeviceKeyFile, update_account_path File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 191, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.deacsm.libadobe", line 29, in <module> from oscrypto import keys File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in <module> from ._asymmetric import parse_certificate, parse_private, parse_public File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in <module> from .kdf import pbkdf1, pbkdf2, pkcs12_kdf File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in <module> from .util import rand_bytes File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in <module> from ._openssl.util import rand_bytes File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in <module> from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 15, in <module> from ._libcrypto_ctypes import ( File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 688, in <module> raise FFIEngineError('Error initializing ctypes') oscrypto._ffi.FFIEngineError: Error initializing ctypes During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/calibre/calibre/customize/ui.py", line 673, in initialize_plugin p.initialize() File "calibre_plugins.deacsm.__init__", line 187, in initialize from libadobe import createDeviceKeyFile, update_account_path ModuleNotFoundError: No module named 'libadobe' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/calibre/calibre/gui2/preferences/plugins.py", line 326, in add_plugin plugin = add_plugin(path) File "/usr/lib/calibre/calibre/customize/ui.py", line 483, in add_plugin plugin = initialize_plugin(plugin, path_to_zip_file, PluginInstallationType.EXTERNAL) File "/usr/lib/calibre/calibre/customize/ui.py", line 678, in initialize_plugin raise InvalidPlugin((_('Initialization of plugin %s failed with traceback:') calibre.customize.InvalidPlugin: Initialization of plugin Traceback (most recent call last): File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 304, in <module> libcrypto.EVP_PKEY_size.argtypes = [ File "/usr/lib/python3.10/ctypes/__init__.py", line 387, in __getattr__ func = self.__getitem__(name) File "/usr/lib/python3.10/ctypes/__init__.py", line 392, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /lib/x86_64-linux-gnu/libcrypto.so.3: undefined symbol: EVP_PKEY_size During handling of the above exception, another exception occurred: Traceback (most recent call last): File "calibre_plugins.deacsm.__init__", line 184, in initialize from calibre_plugins.deacsm.libadobe import createDeviceKeyFile, update_account_path File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 191, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.deacsm.libadobe", line 29, in <module> from oscrypto import keys File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in <module> from ._asymmetric import parse_certificate, parse_private, parse_public File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in <module> from .kdf import pbkdf1, pbkdf2, pkcs12_kdf File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in <module> from .util import rand_bytes File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in <module> from ._openssl.util import rand_bytes File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in <module> from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 15, in <module> from ._libcrypto_ctypes import ( File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 688, in <module> raise FFIEngineError('Error initializing ctypes') oscrypto._ffi.FFIEngineError: Error initializing ctypes During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/calibre/calibre/customize/ui.py", line 673, in initialize_plugin p.initialize() File "calibre_plugins.deacsm.__init__", line 187, in initialize from libadobe import createDeviceKeyFile, update_account_path ModuleNotFoundError: No module named 'libadobe' failed with traceback: Traceback (most recent call last): File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 304, in <module> libcrypto.EVP_PKEY_size.argtypes = [ File "/usr/lib/python3.10/ctypes/__init__.py", line 387, in __getattr__ func = self.__getitem__(name) File "/usr/lib/python3.10/ctypes/__init__.py", line 392, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /lib/x86_64-linux-gnu/libcrypto.so.3: undefined symbol: EVP_PKEY_size During handling of the above exception, another exception occurred: Traceback (most recent call last): File "calibre_plugins.deacsm.__init__", line 184, in initialize from calibre_plugins.deacsm.libadobe import createDeviceKeyFile, update_account_path File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 191, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.deacsm.libadobe", line 29, in <module> from oscrypto import keys File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in <module> from ._asymmetric import parse_certificate, parse_private, parse_public File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in <module> from .kdf import pbkdf1, pbkdf2, pkcs12_kdf File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in <module> from .util import rand_bytes File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in <module> from ._openssl.util import rand_bytes File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in <module> from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 15, in <module> from ._libcrypto_ctypes import ( File "/home/myusername/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 688, in <module> raise FFIEngineError('Error initializing ctypes') oscrypto._ffi.FFIEngineError: Error initializing ctypes During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/calibre/calibre/customize/ui.py", line 673, in initialize_plugin p.initialize() File "calibre_plugins.deacsm.__init__", line 187, in initialize from libadobe import createDeviceKeyFile, update_account_path ModuleNotFoundError: No module named 'libadobe' The plugin works under Windows without any problems. I think the problem will be the new python or ssl libraries under Debian/sid? And many thanks for the awsome DeACSM 0.0.15 plugin. |
Advert | |
|
05-14-2022, 09:20 AM | #168 |
Groupie
Posts: 182
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
|
This looks a lot like it's the same issue that currently happens on Ubuntu 22.04. Ubuntu 22.04 is based on debian unstable, so if 22.04 has the new openssl then Debian unstable / Siduction is going to have that, too.
I have already fixed this bug in the related oscrypto library (see https://github.com/wbond/oscrypto/pull/61 ), but that change hasn't been merged by the maintainer yet. I will try to make the plugin use a forked / modified version of oscrypto until that fix gets into a new release and then the plugin should work again with OpenSSL 3. |
05-14-2022, 10:16 AM | #169 |
Connoisseur
Posts: 53
Karma: 10
Join Date: Feb 2015
Device: Sony PRS-T1
|
I just saw that last night on unstable there was a big version jump on OpenSSL (from 1.1.1-1 to 3.0.3-2).
Last edited by Camelot; 05-14-2022 at 11:58 AM. |
05-14-2022, 11:52 AM | #170 |
Resident Curmudgeon
Posts: 75,746
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I take it there's no issue with this plugin under Windows?
|
Advert | |
|
05-14-2022, 11:53 AM | #171 |
Connoisseur
Posts: 53
Karma: 10
Join Date: Feb 2015
Device: Sony PRS-T1
|
No problem on Windows 11 for me
Last edited by Camelot; 05-14-2022 at 11:57 AM. |
05-14-2022, 11:54 AM | #172 |
Resident Curmudgeon
Posts: 75,746
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Last edited by JSWolf; 05-14-2022 at 01:21 PM. |
05-14-2022, 12:42 PM | #173 | |
Groupie
Posts: 182
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
|
Quote:
As I haven't received a response from the oscrypto maintainer within the last week as to when my bugfix is going to be merged, I'm just going to make my plugin patch the oscrypto code during plugin installation, so I don't have to wait for the oscrypto update. Windows or MacOS or older Linux distributions are not affected by this bug, at least not currently. I'm not sure if MacOS also uses OpenSSL and if so, when that'll be updated to version 3. |
|
05-14-2022, 01:24 PM | #174 |
Resident Curmudgeon
Posts: 75,746
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I can't see MACOS coming with OpenSSL since it would be out with Apple's control.
|
05-14-2022, 01:31 PM | #175 |
Groupie
Posts: 182
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
|
That's good, because it means MacOS is not going to be affected by this bug then :P I don't know that much about MacOS, so I didn't know if they used OpenSSL or not.
The test version is now ready, in the 2nd post of this thread you can now download an experimental build of the plugin that works on Ubuntu 22.04. Note that this version might require *two* restarts of Calibre after the installation (instead of the usual one restart) until it works properly, due to how I'm messing with the oscrypto library to get it to work. Once my changes are merged and a new version of oscrypto is released, this will no longer be necessary. Last edited by Leseratte_10; 05-14-2022 at 01:42 PM. |
05-14-2022, 02:01 PM | #176 |
Connoisseur
Posts: 53
Karma: 10
Join Date: Feb 2015
Device: Sony PRS-T1
|
The DeACSM_0.0.15-beta2204 works great with Siduction, Debian/unstable.
without errors from console: Code:
Notifying optional server https://ofs.contentreserve.com/ACSNotificationService.svc/Notify Weird Fulfillment Notification response: DeACSM v0.0.15: Downloading book ... DeACSM v0.0.15: Loading book from https://acs.cdn.overdrive.com/ACSStore1/(…).epub Download took 517 ms (HTTP 200) That's a ZIP file -> EPUB DeACSM v0.0.15: File successfully fulfilled ... DeACSM v0.0.15: Executing plugin DeDRM ... DeDRM v7.0.0: Trying to decrypt lh3do74u.epub DeDRM v7.0.0: Verifying zip archive integrity DeDRM v7.0.0: lh3do74u.epub is a secure Adobe Adept ePub DeDRM v7.0.0: Trying Encryption key default_key DeDRM v7.0.0: Decrypted with key default_key after 0.2 seconds DeDRM v7.0.0: Finished after 0.2 seconds DeACSM v0.0.15: Plugin returned path '/tmp/calibre_5.42.0_tmp_w902eah0/bje1t60i.epub', updating. Last edited by Camelot; 05-14-2022 at 02:13 PM. Reason: console output |
05-14-2022, 04:44 PM | #177 |
Guru
Posts: 741
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
Just a heads up, Fedora 36 (just released) has apparently switched over to OpenSSL3 as well:
https://fedoraproject.org/wiki/Changes/OpenSSL3.0 |
05-15-2022, 03:11 AM | #178 | |
Enthusiast
Posts: 25
Karma: 13112
Join Date: May 2013
Device: Sony PRS-650; Kobo H2O; Kobo Libra 2; ONYX BOOX Note Air 2 Plus
|
Quote:
But you have to cancel any data from previous installations that you can find in ~/.config/calibre/plugins Last edited by qfwfq; 05-15-2022 at 04:09 AM. |
|
05-15-2022, 03:24 AM | #179 |
Bibliophagist
Posts: 39,095
Karma: 153098470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
The last time I looked at MacOS, they were using the LibreSSL fork of the OpenSSL project as maintained by the OpenBSD people.
|
05-15-2022, 09:29 AM | #180 | |
Enthusiast
Posts: 33
Karma: 10
Join Date: May 2011
Device: Pocketbook 903
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[FileType Plugin] GetFileName | Terisa de morgan | Plugins | 417 | 07-16-2024 03:37 AM |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 01:25 AM |
help with epub on_import filetype plugin | digitalvideo | Development | 4 | 02-27-2020 05:13 AM |
Question about file_types in FileType plugin | Terisa de morgan | Plugins | 6 | 02-08-2017 05:53 AM |
Zip Filetype Plugin? | rsingley | Plugins | 7 | 02-11-2011 05:11 PM |