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

QSslSocket: cannot resolve SSLv3_client_method / SSLv3_server_method #3001

Closed
cdfre opened this issue Jun 14, 2016 · 179 comments
Closed

QSslSocket: cannot resolve SSLv3_client_method / SSLv3_server_method #3001

cdfre opened this issue Jun 14, 2016 · 179 comments
Labels
Milestone

Comments

@cdfre
Copy link

@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
Copy link

@rozwell rozwell commented Jun 20, 2016

Same system, same issue here.

@grevus
Copy link

@grevus grevus commented Jun 22, 2016

Archlinux +1

@auroraeosrose
Copy link

@auroraeosrose 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
Copy link

@hexfusion hexfusion commented Jul 7, 2016

Any workarounds?

@auroraeosrose
Copy link

@auroraeosrose 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
Copy link

@jonathanjuursema jonathanjuursema commented Jul 7, 2016

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

@rozwell
Copy link

@rozwell rozwell commented Jul 7, 2016

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

@amenk
Copy link

@amenk amenk commented Dec 4, 2016

Can this be fixed?

@ashkulz
Copy link
Member

@ashkulz ashkulz commented Dec 4, 2016

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

@amenk
Copy link

@amenk amenk commented Dec 4, 2016

@ksdev-pl
Copy link

@ksdev-pl 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
Copy link

@amenk amenk commented Dec 7, 2016

@ksdev-pl
Copy link

@ksdev-pl 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
Copy link
Member

@ashkulz ashkulz commented Dec 8, 2016

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

@ksdev-pl
Copy link

@ksdev-pl 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-
Copy link

@TheSin- 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
Copy link

@motorkar 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
Copy link

@Dayjo 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-
Copy link

@TheSin- 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
Copy link

@k0lter 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).

@newtonjose
Copy link

@newtonjose newtonjose commented Jun 24, 2017

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

@bios-ben
Copy link

@bios-ben 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
Copy link

@tobiasvielmetter 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
Copy link

@bios-ben bios-ben commented Jun 30, 2017

@tobiasvielmetter
Copy link

@tobiasvielmetter 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
Copy link

@bios-ben bios-ben commented Jun 30, 2017

@tobiasvielmetter
Copy link

@tobiasvielmetter tobiasvielmetter commented Jun 30, 2017

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

@bradleybernard
Copy link

@bradleybernard 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.

@rmoriz
Copy link

@rmoriz rmoriz commented Feb 14, 2019

@SamMorrowDrums
I became suspicious, because you missed it 2 times to post the version output (--version), once in your opening question and in the reply to my questions…

@AugmentBLU
Copy link

@AugmentBLU AugmentBLU commented Mar 6, 2019

This issue is still hanging about. I've updated to 0.12.5 and still getting the same error.

@bradleybernard did you ever get this working with Forge?

@wrkhenddher
Copy link

@wrkhenddher wrkhenddher commented Mar 7, 2019

I confirmed 0.12.5 works out-of-the-box as pointed out by @TerjeBr et al #3001 (comment)

On my docker image (python 3.6 stretch):

FROM python:3.6
...
ENV WKHTML2PDF_VERSION 0.12.5
wget "https://downloads.wkhtmltopdf.org/0.12/${WKHTML2PDF_VERSION}/wkhtmltox_${WKHTML2PDF_VERSION}-1.stretch_amd64.deb" \
&& apt-get install -y ./wkhtmltox_${WKHTML2PDF_VERSION}-1.stretch_amd64.deb 

NOTE that it's not checking checksums!!! (which is not recommended)

@jayprakashji
Copy link

@jayprakashji jayprakashji commented Mar 12, 2019

A note to all those who suggest upgrading to 0.12.5 .
That version has bugs which make it unusable in certain conditions, i.e #3242

@sumityadavbadli
Copy link

@sumityadavbadli sumityadavbadli commented Mar 13, 2019

I am using laravel homestead, and i ran into the same issue.
sudo apt-get install libssl1.0-dev
fixed issue for me.

@AugmentBLU
Copy link

@AugmentBLU AugmentBLU commented Mar 13, 2019

Can someone confirm if using sudo apt-get install libssl1.0-dev is safe on a production site please?

@LukasSmith
Copy link

@LukasSmith LukasSmith commented Mar 20, 2019

apt-get install libssl1.0-dev

Love U :*

@jayprakashji
Copy link

@jayprakashji jayprakashji commented Mar 20, 2019

No, libssl1.0-dev is not safe on production, when you on the same system compile some packages. (Those packages would be compiled with an old ssl)
On production we have created 2 solutions:

  1. remove all https from converted files. Css, js, images, cover, header-html. I wasn't trivial, but possible on our setup. Then you don't need to downgrade ssl-dev.
  2. create docker image which you use instead of wkhtml binary. https://github.com/jayprakashji/dockerfiles/blob/master/wkhtmltopdf/0.12.3-stretch/Dockerfile
@Jcs1994
Copy link

@Jcs1994 Jcs1994 commented Apr 30, 2019

Can I fix this issue on Ubuntu 19.04 ? package is not found using apt-get install libssl1.0-dev (after apt-get update of course)

@surelygroup
Copy link

@surelygroup surelygroup commented Apr 30, 2019

If you do not need the old version for other reasons, your best bet is to upgrade to wkhtmltopdf version 0.12.5

@takman1
Copy link

@takman1 takman1 commented Jul 22, 2019

Hello,
For Ubuntu 16.04 (xenial), I tried this fix and it worked for me.

  1. curl https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.xenial_amd64.deb --location -o /tmp/wkhtmltox_0.12.5-1.xenial_amd64.deb
  2. sudo apt-get --assume-yes install /tmp/wkhtmltox_0.12.5-1.xenial_amd64.deb
  3. rm /tmp/wkhtmltox_0.12.5-1.xenial_amd64.deb
  4. wkhtmltopdf 'https://www.google.com' /tmp/google.pdf
@LindolfoJunior
Copy link

@LindolfoJunior LindolfoJunior commented Aug 3, 2019

For Debian 9-10

$ cd ~
$ wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb
$ sudo dpkg -i wkhtmltox_0.12.5-1.stretch_amd64.deb
$ sudo apt -f install
$ wkhtmltopdf 'https://www.google.com' google.pdf

if ou have this response:

Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done

then, change the config/snappy.php like this:
'binary' => 'wkhtmltopdf',

It's works for me...

@olotintemitope
Copy link

@olotintemitope olotintemitope commented Mar 3, 2020

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).

@SamMorrowDrums
Copy link

@SamMorrowDrums SamMorrowDrums commented Mar 3, 2020

@andela-tolotin this instruction is dangerous. Nobody should be downgrading SSL libs. It's been said many times above, this solution is not a good idea. Look at other comments for advice.

#3001 (comment)

@JanisE
Copy link

@JanisE JanisE commented Apr 16, 2020

I used wkhtmltopdf 0.10.0 rc2.
For me, recompiling openssl with no-ssl2 removed didn't help.
But wkhtmltopdf 0.11.0 rc1 worked all right. (OK, actually just noticed there is a difference in letter spacing...)

I cannot go higher than 0.11.0 rc1 (tried up to 0.12.5), as that introduces margin/zoom problems I don't know how to deal with.

@vinothvkr
Copy link

@vinothvkr vinothvkr commented Apr 30, 2020

In Ubuntu 18.04.4 worked after installing libssl1.0-dev package.

@SamMorrowDrums
Copy link

@SamMorrowDrums SamMorrowDrums commented Apr 30, 2020

In Ubuntu 18.04.4 worked after installing libss
l1.0-dev package.

I'm not sure if you've actually read the thread above, but just making it work is not good enough. Your suggestion has been pointed out as risky numerous times above and real fixes have been proposed.

@vinothvkr
Copy link

@vinothvkr vinothvkr commented Apr 30, 2020

what is the real fix?

@SamMorrowDrums
Copy link

@SamMorrowDrums SamMorrowDrums commented Apr 30, 2020

what is the real fix?

Edited as I think you are on Bionic

You can uninstall distro package of this and then visit https://github.com/wkhtmltopdf/wkhtmltopdf/releases and check for the correct file for your distro and do something like:

wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb

To manually install the new version (change the 0.12.5/wkhtmltox_0.12.5-1.trusty_amd64.deb to correct value for your needs).

That's fastest solution.

@vinothvkr
Copy link

@vinothvkr vinothvkr commented Apr 30, 2020

@SamMorrowDrums thanks a lot for quick help.
So here is what I have done.

  • I removed libssl1.0-dev package
  • Installed version 0.12.5
    and it works. Thank you...
@tanzerm
Copy link

@tanzerm tanzerm commented Jun 6, 2020

For Debian 9-10

$ cd ~
$ wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb
$ sudo dpkg -i wkhtmltox_0.12.5-1.stretch_amd64.deb
$ sudo apt -f install
$ wkhtmltopdf 'https://www.google.com' google.pdf

if ou have this response:

Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done

then, change the config/snappy.php like this:
'binary' => 'wkhtmltopdf',

Worked for me - Thank you!

@ashkulz
Copy link
Member

@ashkulz ashkulz commented Jun 6, 2020

Please do not downgrade the SSL library -- use 0.12.5 or a later version, and request a binary for your distribution in the packaging repository if it isn't supported. I'm locking this issue to prevent further discussion.

@wkhtmltopdf wkhtmltopdf locked as resolved and limited conversation to collaborators Jun 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.