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

QSslSocket: cannot resolve SSLv3_client_method / SSLv3_server_method #3001

Closed
cdfre opened this Issue Jun 14, 2016 · 149 comments

Comments

Projects
None yet
@cdfre

cdfre commented Jun 14, 2016

Edit

Fixed in 0.12.5 - Please update to this version.

!! Note that downgrading openssl is not a solution !!

Original issue

Ubuntu Ubuntu 14.04.4 LTS

Loading pages (1/6)
QSslSocket: cannot resolve SSLv3_client_method               ] 10%
QSslSocket: cannot resolve SSLv3_server_method

I have libssl-dev and openssl installed.

wkhtmltopdf --version
wkhtmltopdf 0.12.3 (with patched qt)
@rozwell

This comment has been minimized.

rozwell commented Jun 20, 2016

Same system, same issue here.

@grevus

This comment has been minimized.

grevus commented Jun 22, 2016

Archlinux +1

@auroraeosrose

This comment has been minimized.

auroraeosrose commented Jul 1, 2016

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797926 that's because debian has DROPPED these symbols completely from the packages, the code needs to be adjusted to not use them please!!

ouch!

@hexfusion

This comment has been minimized.

hexfusion commented Jul 7, 2016

Any workarounds?

@auroraeosrose

This comment has been minimized.

auroraeosrose commented Jul 7, 2016

The only workaround I've been able to figure out is to NOT use any https:// urls in anything I"m rendering (luckily s3 works with both) - so all local files or all https

@jonathanjuursema

This comment has been minimized.

jonathanjuursema commented Jul 7, 2016

What temporarily works for images is to use base64 images in your PDF.

@rozwell

This comment has been minimized.

rozwell commented Jul 7, 2016

Well, because wkhtmltopdf has those issues and it's very slow... I switched to TCPDF

@amenk

This comment has been minimized.

amenk commented Dec 4, 2016

Can this be fixed?

@ashkulz

This comment has been minimized.

Member

ashkulz commented Dec 4, 2016

@amenk: Unless you build distro-specific packages, not really easy to do.

@amenk

This comment has been minimized.

amenk commented Dec 4, 2016

@ksdev-pl

This comment has been minimized.

ksdev-pl commented Dec 7, 2016

Debian Stretch :(

QSslSocket: cannot resolve CRYPTO_num_locks
QSslSocket: cannot resolve CRYPTO_set_id_callback
QSslSocket: cannot resolve CRYPTO_set_locking_callback
QSslSocket: cannot resolve sk_free
QSslSocket: cannot resolve sk_num
QSslSocket: cannot resolve sk_pop_free
QSslSocket: cannot resolve sk_value
QSslSocket: cannot resolve SSL_library_init
QSslSocket: cannot resolve SSL_load_error_strings
QSslSocket: cannot resolve SSLv3_client_method
QSslSocket: cannot resolve SSLv23_client_method
QSslSocket: cannot resolve SSLv3_server_method
QSslSocket: cannot resolve SSLv23_server_method
QSslSocket: cannot resolve X509_STORE_CTX_get_chain
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
QSslSocket: cannot resolve SSLeay
@amenk

This comment has been minimized.

amenk commented Dec 7, 2016

@ksdev-pl

This comment has been minimized.

ksdev-pl commented Dec 7, 2016

I think it's related to the discussed problem - auroraeosrose writes about the changes in debian above. Wkhtmltopdf doesn't work in stretch with https links in html content. Hopefully it will be working when stretch will be released (?).

@ashkulz

This comment has been minimized.

Member

ashkulz commented Dec 8, 2016

Does it not work totally or it just gives a warning message?

@ksdev-pl

This comment has been minimized.

ksdev-pl commented Dec 8, 2016

Sorry I did not check it earlier. I'm using knplabs/knp-snappy as a wrapper, so when the exit status code is 1 (because of the warning message) an exception is thrown. But the generated file is indeed there. So it may be enough for me to catch the exception...

@TheSin-

This comment has been minimized.

TheSin- commented May 9, 2017

is there a switch when building form source to build and link a static ssl lib maybe? sure would be nice to have an option here.

@motorkar

This comment has been minimized.

motorkar commented May 12, 2017

On Debian 9 Stretch:

After trying to run this:

./wkhtmltopdf https://google.com google.pdf

We have this error result:

QSslSocket: cannot resolve CRYPTO_num_locks                  ] 10%
QSslSocket: cannot resolve CRYPTO_set_id_callback
QSslSocket: cannot resolve CRYPTO_set_locking_callback
QSslSocket: cannot resolve sk_free
QSslSocket: cannot resolve sk_num
QSslSocket: cannot resolve sk_pop_free
QSslSocket: cannot resolve sk_value
QSslSocket: cannot resolve SSL_library_init
QSslSocket: cannot resolve SSL_load_error_strings
QSslSocket: cannot resolve SSLv3_client_method
QSslSocket: cannot resolve SSLv23_client_method
QSslSocket: cannot resolve SSLv3_server_method
QSslSocket: cannot resolve SSLv23_server_method
QSslSocket: cannot resolve X509_STORE_CTX_get_chain
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
QSslSocket: cannot resolve SSLeay
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function sk_num
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
Error: Failed to load https://google.com/, with network status code 99 and http status code 0
Error: Failed loading page https://google.com (sometimes it will work just to ignore this error with --load-error-handling ignore)
Exit with code 1 due to network error: UnknownNetworkError
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback

We've tried to compile version from git and precompiled package version from this site and results are the same.

This problem is only on HTTPS, on the HTTP it works correctly.

Thanks for looking into it.

@Dayjo

This comment has been minimized.

Dayjo commented May 16, 2017

I updated from wkhtmltoimage 0.12.2.1 (with patched qt) to wkhtmltoimage 0.12.4 (with patched qt) and suddenly started getting this error.

Any information on how to avoid it?

@TheSin-

This comment has been minimized.

TheSin- commented May 16, 2017

honestly I tried everything and couldn't get it working the build system is very complex and unique. That is all I'll say on that part.

I had to make a php wget script to make a temp dir, parse the wkhtmltopdf params for post vars and fetch the page then inject it into wkhtmltopdf, it was and is a huge PITA, but it's all I could do to get it working.

@k0lter

This comment has been minimized.

k0lter commented Jun 20, 2017

For Debian Stretch users and others with the QSslSocket: cannot resolve $func issue, you just need to install the package libssl1.0-dev (or similar package in your distro).

@n3wt0nSAN

This comment has been minimized.

n3wt0nSAN commented Jun 24, 2017

I have this problem went try run Mendely on Debian 9. Tks for you suggestions!!!

@bios-ben

This comment has been minimized.

bios-ben commented Jun 30, 2017

on ubuntu 16.04 it's libssl-dev which didn't seem to install at first, so you may need to add architecture i386 and install libssl-dev:i386 ... but since this has been a nightmare and it works I'm not messing with it anymore

@tobiasvielmetter

This comment has been minimized.

tobiasvielmetter commented Jun 30, 2017

@bios-ben that does not seem to help. I have Ubuntu 16.04.2 LTS with wkhtmltopdf 0.12.3 from composer ("h4cc/wkhtmltopdf-amd64": "^0.12.3", "h4cc/wkhtmltoimage-amd64": "^0.12.3"). This used to work fine and still works fine on my test machine but on my production system everything stopped working yesterday (presumably through an automated update).
I have added i386 architecture and have installed libssl-dev:i386, but that does not change anything (also restarted, just to make sure).
I always get:

forge@somemachinec6vh:~/default$ ./vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64 --lowquality --margin-bottom '5mm' --margin-left '5mm' --margin-right '5mm' --margin-top '5mm' --orientation 'portrait' --page-size 'letter' --load-error-handling 'ignore' --load-media-error-handling 'ignore' 'test.html' 'something.pdf'
Loading pages (1/6)
QSslSocket: cannot resolve CRYPTO_num_locks                  ] 10%
QSslSocket: cannot resolve CRYPTO_set_id_callback
QSslSocket: cannot resolve CRYPTO_set_locking_callback
QSslSocket: cannot resolve sk_free
QSslSocket: cannot resolve sk_num
QSslSocket: cannot resolve sk_pop_free
QSslSocket: cannot resolve sk_value
QSslSocket: cannot resolve SSL_library_init
QSslSocket: cannot resolve SSL_load_error_strings
QSslSocket: cannot resolve SSLv3_client_method
QSslSocket: cannot resolve SSLv23_client_method
QSslSocket: cannot resolve SSLv3_server_method
QSslSocket: cannot resolve SSLv23_server_method
QSslSocket: cannot resolve X509_STORE_CTX_get_chain
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
QSslSocket: cannot resolve SSLeay
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function sk_num
QSslSocket: cannot call unresolved function SSLv23_client_method2%
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
Counting pages (2/6)                                               
Resolving links (4/6)                                                       
Loading headers and footers (5/6)                                           
Printing pages (6/6)
Done                                                                      
Exit with code 1 due to network error: UnknownNetworkError
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback

The html is basically breaking the creation with any https:// link. even font files from google. Upgrading wkhtmltopdf to 0.12.4 via apt-get (instead of composer, as the composer packages are outdated) works, but messes with the entire styling of my existing templates.

Has anyone any tips on how to get this working again?

@bios-ben

This comment has been minimized.

bios-ben commented Jun 30, 2017

@tobiasvielmetter

This comment has been minimized.

tobiasvielmetter commented Jun 30, 2017

@bios-ben thanks for your input. I am at my wits end with this. Funny enough I have done similar things. My compile version does also not work. The version that I have installed with apt-get only runs via xvfb-run wkhtmltopdf and messes with my styling (probably different dpi, font is off, other handling of some css). The composer version is the one that works fine on my test system (vagrant homestead, also Ubuntu 16.04.2) but not on my production system. I haven't figured out what the difference is yet.
Anyhow, if there is anything ales someone can contribute in how to get this working again, that would be great! Thanks

@bios-ben

This comment has been minimized.

bios-ben commented Jun 30, 2017

@tobiasvielmetter

This comment has been minimized.

tobiasvielmetter commented Jun 30, 2017

@bios-ben thanks. i wasnt able to get it to work yet, but thanks for trying.

@bradleybernard

This comment has been minimized.

bradleybernard commented Jul 5, 2017

Version:

$ wkhtmltopdf --version
wkhtmltopdf 0.12.4 (with patched qt)

Same errors. Works on my Laravel Homestead machine:

$ uname -a
Linux cad 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

but not on my provisioned Laravel Forge machine:

$ uname -a
Linux lively-moon 4.9.15-x86_64-linode81 #1 SMP Fri Mar 17 09:47:36 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux

Errors:

"Loading pages (1/6)
[>                                                           ] 0%
[===>                                                        ] 5%
[======>                                                     ] 10%
[==================>                                         ] 30%
[=================================>                          ] 55%
QSslSocket: cannot resolve CRYPTO_num_locks
QSslSocket: cannot resolve CRYPTO_set_id_callback
QSslSocket: cannot resolve CRYPTO_set_locking_callback
...

I have libssl-dev installed on both machines. Worked a week ago on another Ubuntu Xenial server but now it doesn't. I tried everything in this issue already with no luck.

@ashkulz

This comment has been minimized.

Member

ashkulz commented May 22, 2018

Use the package for 18.04 linked above.

@ashkulz

This comment has been minimized.

Member

ashkulz commented May 30, 2018

A release candidate is available which includes updated packages which would fix this issue -- please test and report your findings before the final release.

@jacobhaven

This comment has been minimized.

jacobhaven commented Jun 1, 2018

@ashkulz This RC fixed the issue for us. Thanks!

@csiefer

This comment has been minimized.

csiefer commented Jun 1, 2018

Thanks a lot!

@rmoriz

This comment has been minimized.

rmoriz commented Jun 7, 2018

Issue seems to be fixed with 0.12.5-rc - no need to downgrade openssl anymore!
Packages can be found at https://wkhtmltopdf.org/downloads.html => Release Candidate => package your distro

@ardabeyazoglu

This comment has been minimized.

ardabeyazoglu commented Jun 10, 2018

Didnt fix for me. I tried both downgrading libbssl-dev and using 0.12.5-rc on ubuntu 14.04. The only difference is that ssl error messages disappeared in both methods. It is still stuck in the middle of loading pages.

@ashkulz

This comment has been minimized.

Member

ashkulz commented Jun 11, 2018

@ardabeyazoglu: looks like a separate issue, then. I've already tagged 0.12.5 and started making the builds for all platforms.

@EngEryx

This comment has been minimized.

EngEryx commented Jun 12, 2018

I also noted that the URL to site or the path to HTML file to generate the PDF from, should not have a space anywhere due to the commands parsing.

For example: I was getting this error when I use this command: wkhtmltopdf /var/www/html/report farm a.html myawesomepdf.pdf

It will try to resolve the path from online which causes it to throw the error as in the first post of this thread.

@nam-co

This comment has been minimized.

nam-co commented Jun 12, 2018

Hi @ashkulz , thanks for your work, I trying composer update with "h4cc/wkhtmltopdf-amd64": "0.12.5" but Im getting a "Your requirements could not be resolved to an installable set of packages.", what can I be doing wrong?

thanks for your time

@ashkulz

This comment has been minimized.

Member

ashkulz commented Jun 13, 2018

you'll have to ask whoever maintains that composer package, probably not updated.

@okdewit

This comment has been minimized.

okdewit commented Jun 25, 2018

@nam-co

If you are using the h4cc composer package, you could check out my PR/fork,
which includes the 0.12.5 updated binary: h4cc/wkhtmltopdf-amd64#30 (comment)

You can install it by adding the repository link to your composer, as described in the comment.

@doroshenkoss

This comment has been minimized.

doroshenkoss commented Jun 27, 2018

Downgrade libssl did the trick! Thanks!

@nam-co

This comment has been minimized.

nam-co commented Jun 27, 2018

Hi @doroshenkoss thanks,
but how for Ubuntu 18? What is the command

I also though of installing it (0.12.5) directly in the server and not with composer

@zdesignpmp

This comment has been minimized.

zdesignpmp commented Aug 23, 2018

For ubuntu 18.04 i had success with this:

mkdir wkhtmltopdf_download
cd wkhtmltopdf_download
wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo apt install ./wkhtmltox_0.12.5-1.bionic_amd64.deb
cd ..
rm -rf wkhtmltopdf_download/

// verify version
wkhtmltopdf --version
@Boulboulouboule

This comment has been minimized.

Boulboulouboule commented Aug 31, 2018

Fixed on my case on Ubuntu 18.04 by installing the dev version of libssl
apt install libssl1.0-dev

@rmoriz

This comment has been minimized.

rmoriz commented Aug 31, 2018

@Boulboulouboule this is not a fix. please read the whole issue. Downgrading system-wide openssl is very bad.

@TerjeBr

This comment has been minimized.

TerjeBr commented Aug 31, 2018

@Boulboulouboule please upgrade to version 0.12.5 where this is fixed. No need to downgrade the libssl version any more, that was just a workaround before this issue was fixed in version 0.12.5

@rmoriz

This comment has been minimized.

rmoriz commented Aug 31, 2018

maybe @cdfre or @ashkulz or another maintainer can update the opening message to clarify that downgrading openssl is not a solution. or just close/block this issue. Thanks

@Tomsgu

This comment has been minimized.

Contributor

Tomsgu commented Sep 5, 2018

@rmoriz The opening issue has been updated. Hope it's more clear for people experiencing the problem.

@rafwell

This comment has been minimized.

rafwell commented Sep 7, 2018

Fixed in 0.12.5 tested on ubuntu 18.04. Thank you.

@techunits

This comment has been minimized.

techunits commented Sep 13, 2018

For Debian Stretch users and others with the QSslSocket: cannot resolve $func issue, you just need to install the package libssl1.0-dev (or similar package in your distro).

This worked for me perfectly. Thanks a lot.
sudo apt install libssl1.0-dev

@riazXrazor

This comment has been minimized.

riazXrazor commented Oct 1, 2018

thanks @kheengz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment