hajareshyam / pdf-creator-node

This package is used to generate HTML to PDF in Nodejs
MIT License
238 stars 79 forks source link

Error: html-pdf: Unknown Error #84

Open novilfahlevy opened 2 years ago

novilfahlevy commented 2 years ago

Screenshot from 2022-07-08 21-36-00

I get this error on production (but works perfectly on local), I have been searching it and found a similar issues like these: https://github.com/marcbachmann/node-html-pdf/issues/531#issue-499930843 and https://stackoverflow.com/questions/60966814/node-html-pdf-auto-configuration-failed

those issues above tell that the problem was about the the ssl but I still don't understand it.

My code: Screenshot from 2022-07-08 21-56-27

My os specifications: Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04

nginx version: nginx/1.18.0 (Ubuntu)

daniilFreiYS commented 2 years ago

have sane problem with same os specifications

scush989898 commented 2 years ago

i got the same problem on production using heroku. The solution for me was creating a new env var OPENSSL_CONF with value /dev/null.

https://prnt.sc/VaOabzLAXFlO

i added to heroku env vars and it worked for me.

pp19dd commented 1 year ago

Ran into this problem while prototyping on WSL / Debian (Windows Subsystem for Linux) and a common solution from OP's stack overflow hit worked: edit /etc/ssl/openssl.conf and comment out the openssl_conf = default_conf line.