Skip to content
This repository was archived by the owner on Jul 8, 2026. It is now read-only.
This repository was archived by the owner on Jul 8, 2026. It is now read-only.

Auto Configuration Failed - libproviders.so: No such file or directory #680

Closed

Description

@danielmnetto

I was trying to create to parse HTML to PDF Buffer in NodeJS using the following code...

pdf.create(html, { format: 'A4', header: { height: "5cm" }, footer: { height: '0.4cm' }, border: { left: '1cm', right: '1cm' } })
      .toBuffer((error, buffer) => {
          if (error) {
               console.log(error.stack)
               return res.status(500).json(null).end()
          }
}

But it returned this error:

Error: html-pdf: Unknown Error
Auto configuration failed
139921337243584: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
139921337243584:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139921337243584:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers
139921337243584:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers

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

The OS used to is Ubuntu Server 22.04
NodeJS = v16.15.0
html-pdf = v.3.0.1

It looks like the same issue of #563 from ZBilel but the difference is that the error log says libproviders.so: cannot open shared object file: No such file or directory

Activity

  1. danielmnetto commented on May 24, 2022

    @danielmnetto
    Author

    UPDATE: I found a solution by adding an option for pdf.create which is:

    childProcessOptions: {
       env: {
          OPENSSL_CONF: '/dev/null',
       },
    }
    

    With this options the code will stay like this:

    pdf.create(html, {/*...*/ childProcessOptions: { env: { OPENSSL_CONF: '/dev/null' } } } )
          .toBuffer((error, buffer) => {
              if (error) {
                   console.log(error.stack)
                   return res.status(500).json(null).end()
              }
    }

    Thanks to opengeekslabap answer on the issue #531.

  2. shankarsingh2111 commented on Sep 12, 2024

    @shankarsingh2111

    Thanks, it is extremely helpful.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions