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

Exception when installing plugin in Flatpak Calibre #67

Open
fkrull opened this issue Sep 23, 2023 · 7 comments
Open

Exception when installing plugin in Flatpak Calibre #67

fkrull opened this issue Sep 23, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@fkrull
Copy link

fkrull commented Sep 23, 2023

Bug description

When trying to import the plugin, Calibre installed via Flatpak shows the following exception:

Traceback (most recent call last):
  File "calibre/customize/ui.py", line 710, in initialize_plugin
  File "calibre_plugins.deacsm.__init__", line 226, in initialize
    from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
  File "/home/mara/Downloads/DeACSM_0.0.16.zip/libadobe.py", line 59, in <module>
    from oscrypto import keys
  File "/home/mara/.var/app/com.calibre_ebook.calibre/config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in <module>
    from ._asymmetric import parse_certificate, parse_private, parse_public
  File "/home/mara/.var/app/com.calibre_ebook.calibre/config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in <module>
    from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
  File "/home/mara/.var/app/com.calibre_ebook.calibre/config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in <module>
    from .util import rand_bytes
  File "/home/mara/.var/app/com.calibre_ebook.calibre/config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in <module>
    from ._openssl.util import rand_bytes
  File "/home/mara/.var/app/com.calibre_ebook.calibre/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/mara/.var/app/com.calibre_ebook.calibre/config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 24, in <module>
    from ._libcrypto_ctypes import (
  File "/home/mara/.var/app/com.calibre_ebook.calibre/config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 47, in <module>
    raise LibraryNotFoundError('Error detecting the version of libcrypto')
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto

This appears due to a bug in oscrypto with libssl version numbers that contain multiple digits (the runtime used by the Calibre Flatpak currently has OpenSSL 3.0.10). This was fixed in oscrypto (wbond/oscrypto@d5f3437) but not yet included in a release (wbond/oscrypto#78).

Would it be possible to make a new release of DeACSM with a fixed bundled version of oscrypto?

Operating system

Linux

Which version of Calibre are you running?

6.26

Which version of the ACSM Input plugin are you running?

v0.0.16

Import type

No response

Further information

No response

@LaHaine
Copy link

LaHaine commented Sep 26, 2023

I can confirm that DeACSM doesn't work with flatpak calibre, that's why I have reported this: flathub/com.calibre_ebook.calibre#189

I can confirm that this workaround worked:

  1. Download DeACSM v0.0.16
  2. git clone https://github.com/wbond/oscrypto
  3. zip -r oscypto.zip oscrypto
  4. unzip DeACSM
  5. replace oscrypto.zip
  6. zip it up again

Then I could install the plugin in flatpak calibre.

@Leseratte10
Copy link
Owner

This has nothing to do with Flatpak vs. non Flatpak. This is a bug in oscrypto that causes it to fail with OpenSSL 3.0.10 and newer. I'll try to add another patch for that later.

@thilakm-git
Copy link

Experiencing the same here.

@Leseratte10 Leseratte10 added the bug Something isn't working label Oct 13, 2023
@edent
Copy link

edent commented Nov 10, 2024

FWIW, the latest version worked find with my Flatpak install of Calibre.

@LaHaine
Copy link

LaHaine commented Nov 12, 2024

FWIW, the latest version worked find with my Flatpak install of Calibre.

There wasn't a new release of the plug-in since this bug was opened.

@Leseratte10
Copy link
Owner

Correct, 0.1.0 is still not released since there's still issues with migrating from 0.0.16 to 0.1.0. It can be downloaded from github and then be manually installed, though.

@edent
Copy link

edent commented Nov 12, 2024

Yes, I'm using the .16 one from GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants