Dynamic Linking Error - Askar Wallet
sudddy opened this issue · 5 comments
INFO: Creating agent with config {
"agentConfig": {
"label": "Testdemoongoing",
"walletConfig": {
"id": "Testdemoongoing",
"key": "[*****]",
"storage": {}
},
"autoUpdateStorageOnStartup": true,
"logger": 1,
"agentDependencies": true
}
}
DEBUG: Listening for routing key created events in tenant agent context provider
INFO: Initializing wallet 'Testdemoongoing' {
"id": "Testdemoongoing",
"key": "[*****]",
"storage": {}
}
{"level":"error","message":"Error initializing Agent Error opening wallet Testdemoongoing: Dynamic Linking Error: Error relocating /app/node_modules/@hyperledger/aries-askar-nodejs/native/libaries_askar.so: __isnan: symbol not found","stack":"WalletError: Error opening wallet Testdemoongoing: Dynamic Linking Error: Error relocating /app/node_modules/@hyperledger/aries-askar-nodejs/native/libaries_askar.so: __isnan: symbol not found\n at AskarWallet._open (/app/node_modules/@credo-ts/askar/build/wallet/AskarWallet.js:183:19)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async AskarWallet.open (/app/node_modules/@credo-ts/askar/build/wallet/AskarWallet.js:120:9)\n at async WalletApi.open (/app/node_modules/@credo-ts/core/build/wallet/WalletApi.js:73:9)\n at async WalletApi.initialize (/app/node_modules/@credo-ts/core/build/wallet/WalletApi.js:47:13)\n at async Agent.initialize (/app/node_modules/@credo-ts/core/build/agent/BaseAgent.js:92:13)\n at async Agent.initialize (/app/node_modules/@credo-ts/core/build/agent/Agent.js:120:9)"}
Is it due to the versions?
I'm currently using
"@credo-ts/anoncreds": "^0.5.0-alpha.127",
"@credo-ts/askar": "^0.5.0-alpha.127",
"@credo-ts/cheqd": "^0.5.0-alpha.127",
"@credo-ts/core": "^0.5.0-alpha.127",
"@credo-ts/indy-vdr": "^0.5.0-alpha.127",
"@credo-ts/node": "^0.5.0-alpha.127",
"@credo-ts/openid4vc": "^0.5.0-alpha.115",
"@credo-ts/question-answer": "^0.5.0-alpha.127",
"@credo-ts/tenants": "^0.5.0-alpha.127",
"@hyperledger/anoncreds-nodejs": "^0.2.0",
"@hyperledger/aries-askar-nodejs": "^0.2.0",
"@hyperledger/aries-askar-shared": "^0.2.0",
"@hyperledger/indy-vdr-nodejs": "^0.2.0-dev.6"
}```
What environment are you running it in? Any chance it uses musl for libc?
I was using node-20-alpine version and installed other dependencies for others manually to reduce the image size. Guess something went wrong over there.
Using node-20 version doesn't throw errors.
Didn't investigate much on it. @berendsliedrecht
Alpine uses musl which we did not account for. Not sure what a quick fix would be, but we should also release libraries for musl for the shared components.
Temporarily you could add RUN apk add --no-cache gcompat libstdc++
to your docker file. Depending on your opinion on musl, this might be a good solution. If you really want to keep the image size as small as possible, you could manually build askar for x86_64-unknown-linux-musl
and use that via the LIB_ARIES_ASKAR_PATH
env var.
Thanks @berendsliedrecht Yes, I will have to try those. 🙏