Skip to content

OpenCode 1.3.2 crashes on load with TypeError: e.diffs.map is not a function #19298

Closed

Description

@d2jvkpn

Description

Version
1.3.2

Summary
The application crashes while loading and shows a fatal error screen instead of handling the invalid data gracefully.

Error message
TypeError: e.diffs.map is not a function

Observed behavior
On opening the app at http://localhost:4096, the UI fails to load and displays:

  • “Something went wrong”
  • “An error occurred while loading the application.”

The stack trace includes references to:

  • /assets/session-...js
  • /assets/index-...js

This suggests the crash happens while rendering or processing session data.

Expected behavior
If diffs is malformed, missing, or in a legacy format, the app should:

  • fail gracefully
  • ignore or sanitize the bad payload
  • show a recoverable error for the affected session only

It should not crash the entire application.

Possible cause
It looks like the code assumes e.diffs is always an array and calls .map() on it, but in this case diffs appears to be a non-array value such

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

Activity

  1. d2jvkpn commented on Mar 26, 2026

    @d2jvkpn
    Author
    Image
  2. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

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

    If your issue is the same, please close this one and add your information to the existing reports instead.

  3. andybons commented on Mar 26, 2026

    @andybons

    @d2jvkpn I just saw this as well and it was caused by Content Security Policy violations. Do you see any in your console? Are you running behind a proxy (I am)

  4. thdxr commented on Mar 26, 2026

    @thdxr
    Member

    Fixed by #19299 - This error was caused by version drift between the web UI assets served from the CDN and the local server. Version 1.3.3 is going out now and embeds the WebUI directly in the binary, eliminating any version drift between the server and web UI.

  5. thdxr commented on Mar 26, 2026

    @thdxr
    Member

    Closing as fixed by #19299

  6. d2jvkpn commented on Mar 26, 2026

    @d2jvkpn
    Author

    @d2jvkpn I just saw this as well and it was caused by Content Security Policy violations. Do you see any in your console? Are you running behind a proxy (I am)

    Yes, I'm running OpenCode in a container, and I've set grrp_proxy and http_proxy
    .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwebRelates to opencode on web / desktop

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions