anomalyco / anomalyco/opencode
web: file attachments silently dropped on HTTP remote host — crypto.subtle undefined
@Hona is already working on this.
Since Sep 6, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Description
Version: 1.18.27
UI: web (opencode web --hostname 0.0.0.0 --port 8091), opened as http://linux:8091 (remote hostname, plain HTTP)
Steps:
- Open web UI via remote http hostname (not localhost, no HTTPS)
- Attach any image (button, drag-drop, paste — all same)
- No thumbnail, no toast, no error in UI
- Send — message arrives text-only
Expected: attachment sent as file part.
Actual: silently dropped.
Console:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'digest')
putBlob → addAttachments
Network: POST /session/{id}/prompt_async parts = [{type:text}] only.
DB: zero file parts in session.
Root cause: packages/app/src/utils/draft-store.ts blobID() uses crypto.subtle.digest.
crypto.subtle exists only in secure contexts. Remote http hostname = insecure → subtle undefined → putBlob throws → addAttachments rejects unhandled.
Same class as #11452 (randomUUID), different call site. Needs non-subtle fallback hash (or catch + random id).
Workaround: use http://localhost:8091 (secure context) or HTTPS.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.