hajareshyam / pdf-creator-node

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

PDF create doesn't work on ubuntu 22.04 #92

Open MakerMark opened 1 year ago

MakerMark commented 1 year ago

After Updating the Operating System to ubuntu 22.04 the pdf creation doesn't work, it couldn't find a lib named libproviders.so

Error: html-pdf: Received the exit code '1'
Auto configuration failed
140346356578240:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libproviders.so): libproviders.so: cannot open shared object file: No such file or directory
140346356578240:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
140346356578240:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers
140346356578240:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers

    at ChildProcess.respond (/home/ubuntu/remoteHelipadManagingSystemBE/node_modules/html-pdf/lib/pdf.js:121:31)
    at ChildProcess.emit (node:events:527:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)

After reading some stackoverflow issue someone suggest to comment the row providers = provider_sect and the exception now is that one

Error: html-pdf: Received the exit code '1'
Auto configuration failed
139796807059392:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
139796807059392:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139796807059392:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
139796807059392:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf

    at ChildProcess.respond (/home/ubuntu/remoteHelipadManagingSystemBE/node_modules/html-pdf/lib/pdf.js:121:31)
    at ChildProcess.emit (node:events:527:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
Ntwali-Josue commented 1 year ago

Having the same issue on my side too, I am still wondering the solution for this.

EduBarrros commented 1 year ago

I had the same problem, I searched but didn't find anything to fix it.

ProbablyClem commented 1 year ago

running export OPENSSL_CONF=/dev/null before npm start fixed it for me

ralexrdz commented 1 year ago

If using inside docker container, instead of using export OPENSSL_CONF=/dev/null you should use ENV OPENSSL_CONF=/dev/null

nanjeribrian commented 1 year ago

Error: html-pdf: Unknown Error Auto configuration failed 140143545776064:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libproviders.so): libproviders.so: cannot open shared object file: No such file or directory 140143545776064:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 140143545776064:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers 140143545776064:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers

at ChildProcess.emit (node:events:513:28)  

experiencing the same issue to

satish2352 commented 11 months ago

Hi @all Please add in your code process.env.OPENSSL_CONF = '/dev/null';

before pdf.create