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

[Bug]: argon2.node: cannot open shared object file: No such file or directory #6446

Closed
4 tasks done
Dual-0 opened this issue Sep 23, 2023 · 12 comments · Fixed by #6453
Closed
4 tasks done

[Bug]: argon2.node: cannot open shared object file: No such file or directory #6446

Dual-0 opened this issue Sep 23, 2023 · 12 comments · Fixed by #6453
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer

Comments

@Dual-0
Copy link

Dual-0 commented Sep 23, 2023

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

After a update to v4.17.0 on my Ubuntu ARM64 instance I got this failure.
I used the .deb file.

user@ubuntu:~$ code-server
node:internal/modules/cjs/loader:1338
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /usr/lib/code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node: cannot open shared object file: No such file or directory
    at Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/usr/lib/code-server/node_modules/argon2/argon2.js:9:25)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12) {
  code: 'ERR_DLOPEN_FAILED'
}

v4.16.1 is still working

regards
Dual-O

Steps to Reproduce

  1. update to v4.17.0
  2. execute code-server via command line

Expected

working like v4.16.1

Actual

error via command line output

Logs

node:internal/modules/cjs/loader:1338
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: /usr/lib/code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node: cannot open shared object file: No such file or directory
at Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object. (/usr/lib/code-server/node_modules/argon2/argon2.js:9:25)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12) {
code: 'ERR_DLOPEN_FAILED'
}

Node.js v18.15.0

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

No response

@Dual-0 Dual-0 added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Sep 23, 2023
@eugeneewe
Copy link

eugeneewe commented Sep 23, 2023

Same here facing the error after Watchtower update the container.

OS/Web Information

Failure happen after update to v4.17.0 on my Ubuntu 22.04 ARM64 instance

Node.js v18.15.0
starting with no password
node:internal/modules/cjs/loader:1338
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: /app/code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node: cannot open shared object file: No such file or directory
at Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object. (/app/code-server/node_modules/argon2/argon2.js:9:25)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12) {
code: 'ERR_DLOPEN_FAILED'
}

@fettesb
Copy link

fettesb commented Sep 23, 2023

Same for me after Watchtower update the Container

starting with no password
node:internal/modules/cjs/loader:1338
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: /app/code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node: cannot open shared object file: No such file or directory
at Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object. (/app/code-server/node_modules/argon2/argon2.js:9:25)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12) {
code: 'ERR_DLOPEN_FAILED'
}
Node.js v18.15.0

i am on arm64 RaspberryPi 4

@eltorio
Copy link

eltorio commented Sep 24, 2023

same here on Ampere Altra A1 (arm64)

Error: /usr/lib/code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node: cannot open shared object file: No such file or directory
    at Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/usr/lib/code-server/node_modules/argon2/argon2.js:9:25)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12) {
  code: 'ERR_DLOPEN_FAILED'
}

@eltorio
Copy link

eltorio commented Sep 24, 2023

code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node is not a valid aarch64 ELF binary so my workaround is to force to recompile it with node-gyp pre-installed…
my workaround: (in /usr/lib/code-server)

cd /usr/lib/code-server \
&& rm -rf node_modules/argon2 \
&& npm install -g node-gyp \
&& npm install argon2 argon2-cli \
&& echo -n "password" | npx argon2-cli -d -e

@fate8383
Copy link

I have the same issue

@wxianxin
Copy link

Same issue on raspberry pi 4.

@eltorio
Copy link

eltorio commented Sep 25, 2023

@wxianxin this issue is present on all arm64 because the /usr/lib/code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node is not a correct aarch64 binary, you must recompile it yourself

code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node is not a valid aarch64 ELF binary so my workaround is to force to recompile it with node-gyp pre-installed… my workaround: (in /usr/lib/code-server)

cd /usr/lib/code-server \
&& rm -rf node_modules/argon2 \
&& npm install -g node-gyp \
&& npm install argon2 argon2-cli \
&& echo -n "password" | npx argon2-cli -d -e

@kvnkmth
Copy link

kvnkmth commented Sep 25, 2023

@eltorio thanks it works!

@wxianxin
Copy link

@wxianxin this issue is present on all arm64 because the /usr/lib/code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node is not a correct aarch64 binary, you must recompile it yourself

code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node is not a valid aarch64 ELF binary so my workaround is to force to recompile it with node-gyp pre-installed… my workaround: (in /usr/lib/code-server)

cd /usr/lib/code-server \
&& rm -rf node_modules/argon2 \
&& npm install -g node-gyp \
&& npm install argon2 argon2-cli \
&& echo -n "password" | npx argon2-cli -d -e

Thanks! I am on a k8s cluster, probably will wait for the image maintainer to fix the issue. Appreciate the insight!

@AnggiWaSa
Copy link

code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node is not a valid aarch64 ELF binary so my workaround is to force to recompile it with node-gyp pre-installed… my workaround: (in /usr/lib/code-server)

cd /usr/lib/code-server \
&& rm -rf node_modules/argon2 \
&& npm install -g node-gyp \
&& npm install argon2 argon2-cli \
&& echo -n "password" | npx argon2-cli -d -e

Thank you @eltorio , this helped me in resolving the issue

@Niko-La
Copy link

Niko-La commented Sep 27, 2023

getting this error on mac m1 running code-server docker-compose

@code-asher
Copy link
Member

Thank you for the reports. I think I have a fix for this. Once CI completes I will put out an RC and if there is anyone who could run it in an arm64 environment to confirm I would be most grateful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants