Skip to content

Crash on desktop startup from null persisted tab #39644

Description

@OpeOginni

Description

The desktop app can crash during startup when persisted tab state contains a null entry.

Error

TypeError: Cannot read properties of null (reading 'type')

The stack trace may point to either tabKey or currentTab/matchRoute.

Impact

  • Reported by multiple Discord users.
  • Reproduced on desktop version 1.18.9.
  • Prevents the application from loading.

Expected behavior

Malformed persisted tab entries should be discarded during hydration instead of crashing the renderer.

Additional context

The persisted tabs migration currently preserves null and malformed array entries. Validating and repairing the array during migration prevents the crash.

Plugins

None

OpenCode version

1.18.9

Steps to reproduce

No response

Screenshot and/or share link

Image Image

Operating System

macOS

Terminal

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions