You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Critical Crash on Linux (Ubuntu): 'jose' dependency corrupted with binary content in buffer_utils.js #7249
Description When attempting to run opencode (e.g., opencode models or installing plugins) on a Linux/Ubuntu environment, the tool crashes immediately. The error points to a syntax error in the jose library, specifically in dist/browser/lib/buffer_utils.js.
Upon inspection, this JavaScript file contains binary/garbage characters instead of valid code, suggesting that the internal package manager/downloader (possibly Bun-based or custom fetcher) is not correctly downloading or extracting this specific dependency.
Error Log
Error: Unexpected error, check log file at ...
1 | G^><CCFkCQº2Ha*[8er
^
error: Unexpected
at /home/USER/.cache/opencode/node_modules/jose/dist/browser/lib/buffer_utils.js:1:1
Root Cause Analysis I inspected the file located at ~/.cache/opencode/node_modules/jose/dist/browser/lib/buffer_utils.js. Instead of valid JavaScript, the file starts with binary characters (e.g., G^...), which looks like a GZIP artifact or a corrupted binary download that wasn't decoded properly.
Workaround / Fix I was able to resolve this by manually taking over the dependency installation using npm instead of the tool's internal mechanism.
Navigate to the cache directory: cd ~/.cache/opencode
Remove the corrupted modules and lock files: rm -rf node_modules bun.lock
Manually install dependencies using npm: npm install npm install jose@5.9.6 --save (forcing the correct version)
Running opencode models works perfectly after this manual fix.
Note on Persistence: If opencode triggers an internal update or plugin installation, it overwrites node_modules and re-introduces the corrupted binary file, requiring the workaround to be applied again.
System Info
OS: Linux (Ubuntu)
Node Version: Tested on v22.19.0 and v20.19.6 (Issue persists on both)
Opencode Version: Latest
Plugins
No response
OpenCode version
1.1.6
Steps to reproduce
Install opencode globally on Ubuntu (npm install -g opencode).
-Run opencode models (or try to install a plugin).
-The tool attempts to hydrate the cache/dependencies.
-Crash occurs.
Activity
juneleung commentedon Jan 18, 2026
same on Arch Linux:
error: Cannot find module '../../runtime/verify.js' from '/home/juneleung/.cache/opencode/node_modules/jose/dist/browser/jws/flattened/verify.js'
rekram1-node commentedon Jan 18, 2026
try running w/
OPENCODE_DISABLE_DEFAULT_PLUGINS=truejuneleung commentedon Jan 19, 2026
Thanks, it works!
github-actions commentedon Mar 27, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.