error:25066067:DSO support routines:dlfcn_load:could not load the shared library
Environment
- Operating System version: Ubuntu 21.4
- Firebase SDK version: [email protected]
- Firebase Product: admin.auth
- Node.js version: 16.15
- NPM version: 7.12.1
- Yarn version: 1.12.19 (i use yarn)
The problem
import admin from 'firebase-admin'
admin.auth().createCustomToken(stringID, {
id: stringID,
}) // throws the error below
Error: error:25066067:DSO support routines:dlfcn_load:could not load the shared library
at Sign.sign (node:internal/crypto/sig:131:29)
at ServiceAccountSigner.sign (/node_modules/firebase-admin/lib/utils/crypto-signer.js:65:37)
at /node_modules/firebase-admin/lib/auth/token-generator.js:135:44
at processTicksAndRejections (node:internal/process/task_queues:96:5)
// removed unimportant error lines from my own code
opensslErrorStack: [
'error:0E076071:configuration file routines:module_run:unknown module name',
'error:0E07506E:configuration file routines:module_load_dso:error loading dso',
'error:25070067:DSO support routines:DSO_load:could not load the shared library'
],
library: 'DSO support routines',
function: 'dlfcn_load',
reason: 'could not load the shared library',
code: 'ERR_OSSL_DSO_COULD_NOT_LOAD_THE_SHARED_LIBRARY'
}
Steps to reproduce:
Unfornutately I cannot find a way to reproduce this issue accross platforms. I ran it in a different system, even with the same lock file, i cannot reproduce it. I do think that the problem is tied to my own system. I just dont know where to look.
I found a few problems with this issue:
- I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
- This issue does not seem to follow the issue template. Make sure you provide all the required information.
The same issue with me Operating System version: Ubuntu 22.04 Firebase SDK version: [email protected] Firebase Product: admin.auth Node.js version: 10.24.1 NPM version: 6.14.12
Upon digging just a slight more, it looks purely a problem with node crypto library.
var crypto = require('crypto')
var sign = crypto.createSign('RSA-SHA256')
sign.update(someBuffer)
return Promise.resolve(sign.sign(somePrivateKey))
This isnt reproducable on its own but this is what triggers the error in this case on
/node_modules/firebase-admin/lib/utils/crypto-signer.js:64
Same problem, I have
Operating System version: Ubuntu 22.04
"firebase-admin": "^10.2.0"
node v14.19.1 (npm v7.24.2)
Please reopen this as it seems it affects multiple people on the latest ubuntu LTS version.
I think the issue is related to the internal nodejs crypto package on the new Ubuntu 22.04 LTS version. so we need to open a bug ticket there to check, also I doubt it is the OpenSSL new version issue which was installed by default on Ubuntu 22.04 LTS. so yeah it is not firebase-admin issue, as everything is ok with me now on Ubuntu 20.04
Hi Guys, I found a workaround while facing this issue using firebase-admin. Hence, we suggest you to comment out the lines providers = provider_sectin the file/etc/ssl/openssl.cnf` and restart application once.
I took it off https://help.zoho.com/portal/en/community/topic/cant-install-zoho-workdrive-app-in-ubuntu-22-04
@k0d3d thanks a lot! This does seem to work for me on my machine.
Thanks a lot! it works on my machine :') @k0d3d
for anyone who find the cnf file,
You can run the following command to get the location of openssl.cnf file:
openssl version -d
On my computer, the result is:
OPENSSLDIR: "/private/etc/ssl"
Finally, the path of openssl.cnf file:
/private/etc/ssl/openssl.cnf
source: https://stackoverflow.com/questions/21477210/correct-location-of-openssl-cnf-file
Thanks a lot for the workaround @k0d3d
It worked on my machine as well (fresh linux mint 21 / cinnamon install - ubuntu based)
Can anyone explain why did this happened?