Closed khanof89 closed 6 years ago
@khanof89 I'm facing the same issue, please let me know if you find any solution for this.
@siddharthghedia no solutions so far, google charts doesn't work locally and it is their TOS also that you cannot use it locally, and wkhtmltopdf doesn't handle ssl properly
@khanof89 I guess problem is not with SSL, I just tried removing the SSL, and is still showing the same error :(
@siddharthghedia een if you remove https from the first url i.e https://www.gstatic.com/charts/45.2/loader.js the other scripts called by loader.js are still on ssl, gogole charts doesn't work without ssl
@khanof89 ssl is the problem yeah :D :D , was working when removed ssl, when added back, its not working :(
I found a solution that works. checkout @Kaicastledine's solution on this thread
Summary
Downgrade libssl
apt install libssl-dev=1.0.2g-1ubuntu4.8
Lock it from future upgrades
apt-mark hold libssl-dev
@nonsocode Thanks very much!!!
The downgrade libs change, right now it's 4.10 not 4.8, look here for the current version for you. https://packages.ubuntu.com/xenial/libssl1.0.0
For Ubuntu 17.10:
apt install libssl-dev=1.0.2g-1ubuntu13.3
On Ubuntu 17.10 I used the following package to fix this issue.
apt-get install libssl1.0-dev
For Ubuntu 18.04, any idea ? :-)
14.04 = apt install libssl-dev=1.0.1f-1ubuntu2.25 (Tested and worked) 18.04 = apt install libssl-dev=1.0.2n-1ubuntu5 (Not tested) @bluemountainteam
@vnetmx Tried in Ubuntu 18.04 Linux AMI (AWS)
sudo apt install libssl-dev=1.0.2n-1ubuntu5
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '1.0.2n-1ubuntu5' for 'libssl-dev' was not found
But I tried to just sudo apt install libssl1.0-dev
and I got it working, but it uninstalled php7.2-dev. =(
@icaroscherma
Try this: sudo apt install libssl1.0-dev=1.0.2n-1ubuntu5
@vnetmx
sudo apt install libssl1.0-dev=1.0.2n-1ubuntu5
Works on Ubuntu 18.04. Thx a lot!
Yeah but I'm not sure that is the best way, as you're actually downgrading lib ssl, right?
@icaroscherma Thanks! sudo apt install libssl1.0-dev
worked like a charm!
@barryvdh I think we are only installing Development Files, not downgrading lib. But this is only a workaround, maybe we need a fix to work with newer versions.
Hi @barryvdh , I understand its not a problem of you're package, but a problem with new versions of Ubuntu, anyway as you can see here https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3001#issuecomment-396815585 the issue was resolved (much better than downgrading) , but the composer package maintainer hasn't updated to the new version (0.12.5), is there any way to use another package or fork?
Appreciate any help
See https://github.com/h4cc/wkhtmltopdf-amd64/issues/31 You are free to fork or install it yourself, I don't maintain wkhtmltopdf of the composer binaries.
But glad it's solved with the latest version :)
Ubuntu 18.04.1:
sudo apt-get install libssl1.0-dev
Upgdaring wkhtmltopdf to 0.12.5 solve SSL problem.
I have the same issue. Using Ubuntu 18.04. I installed wkhtmltopdf to 0.12.5 and still have the same issues.
What is a safe way to fix this, without downgrading SSL libs?
In my case I fixed it by not using https when rendering in snappy... like
{{ request()->boolean('use_snappy') ? 'http' : 'https' }}://some-url.com/assets/style.css
update wkhtmltopdf to version 0.12.6 fixed this error
update wkhtmltopdf to version 0.12.6 fixed this error
This version doesn't exist? 0.12.4 is the latest -> https://github.com/h4cc/wkhtmltopdf-amd64/tags
Not as composer package; https://github.com/h4cc/wkhtmltopdf-amd64/pull/44 I suggest you download the binary directly: https://wkhtmltopdf.org/downloads.html
Forge recipe to install:
echo ">> Installing WkhtmltoPDF 0.12.6"
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6-1.focal_amd64.deb
sudo apt-get --yes -f install
sudo cp /usr/local/bin/wkhtmlto* /usr/bin/
Thanks @barryvdh, this worked for me! I added wkhtmltopdf as dependency to my docker configuration and pointed theWKHTMLTOPDF_PATH
value to it.
Well I found a hack for this in Laravel I did like the following and it worked
<img class="w100" editable="" mc:edit="mm-92" label="image" src="data:image/jpeg;base64,{{ \base64_encode(@file_get_contents($booking_detail['hotel_picture'])) }}">
I have the same issue. Using Ubuntu 18.04. I installed wkhtmltopdf to 0.12.5 and still have the same issues.
What is a safe way to fix this, without downgrading SSL libs?
Have you been able to solve the problem?
For me @barryvdh solutions is not working. I need wkhtmltopdf-amd64 binary solution without downgrade my OS.
My fix:
Installed wkhtmltopdf on my server
sudo apt update
sudo apt install wkhtmltopdf
After successful installation, I find the wkhtmltopdf and create a symlink
find / -name wkhtmltopdf
ln -s /usr/bin/wkhtmltopdf /usr/local/bin/whtmltopdf-amd64
For me, this is the fix for my encountered errors such as 'ssl resources not loading, error 127, libssl error, and many more' I think it is case to case basis depends on the environment and versions of platforms. Thanks.
My Platform Details:
I got stuck with Ubuntu 22.04, so here's the a recipe that works for that:
echo ">> Installing WkhtmltoPDF 0.12.6.1-2"
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo apt-get --yes -f install
sudo cp /usr/local/bin/wkhtmlto* /usr/bin/
I am trying to load a view which generates charts and bars using google charts library, because the chart library is hosted on google server with an SSL, I get the following error :
Just so you know, following is my code which I have tried
and the error is because of SSL is my wild guess, I just tried to load a simple view which also didnt work