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

DSO support routines:dlfcn_load:could not load the shared library #826

Closed
suyashmohan opened this issue May 12, 2022 · 2 comments
Closed

Comments

@suyashmohan
Copy link

suyashmohan commented May 12, 2022

Description

Our working code has been throwing error on latest version of Fedora 36. Same error is also observed on Ubuntu 22.04 under WSL2.

Error Stack:
Error: error:25066067:DSO support routines:dlfcn_load:could not load the shared library
    at Sign.sign (node:internal/crypto/sig:131:29)
    at Object.sign (/home/#####/node_modules/jwa/index.js:152:45)
    at Object.jwsSign [as sign] (/home/#####/node_modules/jws/lib/sign-stream.js:32:24)
    at Object.module.exports [as sign] (/home/#####/node_modules/jsonwebtoken/sign.js:204:16)
    at Object.generateToken (/home/#####/services/jwt.service.js:8:16)
    at AuthController.login (/home/#####/controllers/auth.controller.js:71:25)

^ Used ##### to hide local folder path

return jwt.sign in following code snippet represents line number 8 in jwt.service.js from above error.

generateToken: (payload, { expiresIn = null } = {}) => {
    return jwt.sign(payload, privateKey, {
      algorithm: "RS256",
      ...(expiresIn ? { expiresIn } : {}),
    });
  },

Environment

  • Version Used: ^8.5.1
  • OS: Linux fedora 5.17.5-300.fc36.x86_64 #1 SMP PREEMPT Thu Apr 28 15:51:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Node: v16.15.0

I am guessing it has something to do with Node.js, OpenSSL and latest kernel. But positing here hoping someone can guide me in right direction to fix this.

@emanuelet
Copy link

had the same exact problem. eventually I figured out that with openssl v3 you need to use node v18

https://stackoverflow.com/questions/72104449/node-js-crypto-fails-to-sign-pem-key-string-from-file-with-error25066067dso-su#comment127440640_72104449

@suyashmohan
Copy link
Author

had the same exact problem. eventually I figured out that with openssl v3 you need to use node v18

https://stackoverflow.com/questions/72104449/node-js-crypto-fails-to-sign-pem-key-string-from-file-with-error25066067dso-su#comment127440640_72104449

Thanks for above link. For now I just used OPENSSL_CONF=/dev/null and it worked fine. Later I will try with v18 also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants