Skip to content

TypeError: e.diffs.map is not a function when reopening old browser session #19217

Description

@trafgals

Bug Description

When trying to reopen an old OpenCode web browser window, I get the following JavaScript error:

TypeError: e.diffs.map is not a function
    at Object.fn (http://localhost:4096/assets/session-BdJIdAn0.js:19:50326)
    at H2 (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:6835)
    at $l (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:6592)
    at Df (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:8033)
    at Q7 (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:8914)
    at xO (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:8286)
    at Ir (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:8218)
    at et (http://localhost:4096/assets/index-Dr5k_2Nz.js:2:3989)
    at o (http://localhost:4096/assets/index-Dr5k_2Nz.js:2279:6842)
    at http://localhost:4096/assets/session-BdJIdAn0.js:21:39236

Steps to Reproduce

  1. Open OpenCode web interface
  2. Try to reopen an old browser session/window

Environment

  • OpenCode version: 1.2.27
  • Browser: Happens in Brave, Chrome, Edge
  • OS: Windows 11

Additional Context

The error suggests that e.diffs is not an array (or is undefined) when the map function is called. This may be related to session state corruption or an issue with how session data is being deserialized.

Activity

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

Metadata

Metadata

Assignees

Labels

webRelates 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