-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix: Error [ERR_DLOPEN_FAILED] #1546
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
base: dev
Are you sure you want to change the base?
Conversation
9a42a44
to
ecb7eba
Compare
@hawkaii thank you for reporting. |
it works |
Merged from: sst#1546 Author: @CaffeeLake Auto-merged by opencode-fork integration system
could you fix the conflicts? also can you describe what environment this is? |
ecb7eba
to
eae1932
Compare
|
I am also seeing this in a Linux 6.10.14 aarch64 container running in Docker Desktop on an M1 Max MBP, in either the Docker VMM or Apple Virtualization framework. This did not occur when using an amd64 version of the same container, though the TUI slowed to an absolute crawl when running in that manner (with or without using Rosetta on Apple Virtualization as well). So it seems like just generally Linux aarch64 was the cause, but only after |
This may be related to the following Node.js behavior:
~/opencode % ls ./node_modules/tree-sitter-bash/prebuilds/linux-x64/
tree-sitter-bash.node
~/opencode % node ./node_modules/tree-sitter-bash/prebuilds/linux-x64/tree-sitter-bash.node
~/opencode %
~/opencode % ls ./node_modules/tree-sitter-bash/prebuilds/linux-arm64/
tree-sitter-bash.node
~/opencode % node ./node_modules/tree-sitter-bash/prebuilds/linux-arm64/tree-sitter-bash.node
node:internal/modules/cjs/loader:1846
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: ~/opencode/node_modules/tree-sitter-bash/prebuilds/linux-arm64/tree-sitter-bash.node: cannot open shared object file: No such file or directory
at Object..node (node:internal/modules/cjs/loader:1846:18)
at Module.load (node:internal/modules/cjs/loader:1423:32)
at Function._load (node:internal/modules/cjs/loader:1246:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
at node:internal/main/run_main_module:36:49 {
code: 'ERR_DLOPEN_FAILED'
}
Node.js v22.18.0
~/opencode % I couldn't find a command to call |
I'm running Debian Bullseye on WSL2 and experiencing the same issue. It's been unusable for a few days now. I’d appreciate a fix—thank you! |
@lsj5031 you can rollback to v0.3.101 and set autoupdate false in the global config until it's fixed, thats what I did |
I've identified the exact cause.
~/opencode % ldd ./node_modules/tree-sitter-bash/prebuilds/linux-arm64/tree-sitter-bash.node
not a dynamic executable
~/opencode % ldd ./node_modules/tree-sitter-bash/prebuilds/linux-x64/tree-sitter-bash.node
not a dynamic executable
~/opencode %
~/opencode % ldd ./node_modules/tree-sitter-bash/prebuilds/linux-arm64/tree-sitter-bash.node
linux-vdso.so.1 (0x00007ffc25d73000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f8871bc8000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f8871b9c000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8871b98000)
libc.so.6 => /lib64/libc.so.6 (0x00007f88719a6000)
libm.so.6 => /lib64/libm.so.6 (0x00007f88718b8000)
/lib64/ld-linux-x86-64.so.2 (0x00007f8871f98000)
~/opencode % ldd ./node_modules/tree-sitter-bash/prebuilds/linux-x64/tree-sitter-bash.node
linux-vdso.so.1 (0x00007ffe2a794000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f5e05969000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f5e0593d000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5e05939000)
libc.so.6 => /lib64/libc.so.6 (0x00007f5e05747000)
libm.so.6 => /lib64/libm.so.6 (0x00007f5e05659000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5e05d39000)
~/opencode % |
I've been facing this same blocking issue on a raspberry pi 5 running bullseye as well. Happy to test the fix once it's ready! |
d355987
to
d26b139
Compare
This |
it's working but the
i had to build it by running |
d26b139
to
b9e0178
Compare
@thdxr @adamdotdevin This PR is ready. 🙏 |
I can confirm that in my previously mentioned aarch64 container, without this patch on the ![]() After applying this patch, bash commands work as expected again. ![]() |
b9e0178
to
2ad722f
Compare
when is this fixed expected to be merged? |
@thdxr or @adamdotdevin - @CaffeeLake has graciously been keeping this PR up to date and it would fix a serious issue facing arm64 users. Unfortunately it doesn't seem that the node-tree-sitter dependency is nearly as active as you two so unlikely to be fixed forward over there anytime soon. 🙏 |
getting the same issue, but only with certain models. ie Qwen in LMStudio via proxy |
the fix here seems to skip permissions check if treesitter doesn't load? just making sure i'm understanding that right i don't think we want to implement this fix, i'd rather fix the static binaries for treesitter i will fix this - but to confirm the treesitter bash binary for arm64 is not built correctly? |
oh looks like you did figure out that an earlier version works! thank you - can you remove the try catch that skips it though? i want it to fail loudly so people continue to complain if it breaks |
2ad722f
to
cf370fe
Compare
@thdxr Thank you for checking. |
Fix: Error [ERR_DLOPEN_FAILED]
Fixes: failing to run command on new update #1509
In some environments,
tree-sitter
andtree-sitter-bash
may not work properly, and the following error may occur when executing commands.This is likely a compatibility issue on the library side, so
this patch temporarily avoids the error by skipping the use of the library and reverting to the previous behavior in environments whereFix: Error [ERR_DLOPEN_FAILED] #1546 (comment) .tree-sitter
does not workSince opencode is completely unusable in environments where this problem occurs and the urgency is high, I am submitting a PR in this format, but if you know of a better solution I would appreciate your information.