opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[Bug] Opencode crashes on second run in Termux/Proot distro

Open Ritusmin325k opened this issue 3 months ago • 6 comments

Describe the bug
Opencode runs fine the first time, but when I try to open it a second time in Termux (any Proot distro), it fails with the following message:

Error: Unexpected error, check log file at /root/.local/share/opencode/log/.log for more details

To Reproduce
Steps to reproduce the behavior:

  1. Install Opencode in Termux with any Proot distro.
  2. Run opencode for the first time — it works normally.
  3. Close Opencode.
  4. Run opencode again.
  5. Observe the unexpected error.

Expected behavior
Opencode should open and run correctly on subsequent launches as well.

Screenshots/Logs
The error log is located at: /root/.local/share/opencode/log/<timestamp>.log
(Attach log content if possible.)

Environment:

  • OS: Termux (any Proot distro)
  • Opencode version: latest version
  • Node/npm version: latest version

Additional context
This issue only occurs on the second and subsequent runs, not on the first launch. It might be related to session, cache, or file handling between runs.

Image

Ritusmin325k avatar Oct 13 '25 17:10 Ritusmin325k

This issue might be a duplicate of existing issues. Please check:

  • #387: Very similar "Error: Unexpected error, check log file at" message with detailed logs showing crash patterns
  • #961: General Termux support request indicating ongoing compatibility issues
  • #709: Specific Termux installation and execution problems with error messages about missing files

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Oct 13 '25 17:10 github-actions[bot]

Can you show what the error log says? Maybe drop the file if possible?

rekram1-node avatar Oct 13 '25 17:10 rekram1-node

Can you show what the error log says? Maybe drop the file if possible?

Here's the log file 2025-10-14T081251.log

Ritusmin325k avatar Oct 14 '25 08:10 Ritusmin325k

I also cannot get opencode to run in Termux, neither in vanilla Termux nor proot (arch).

621625 avatar Dec 11 '25 05:12 621625