Skip to content

opentui: fatal: Object.entries requires that input parameter not be null or undefined #18517

Closed as not planned

Description

@er-three

Bug Description

When running opencode, I encountered a fatal error related to Object.entries receiving null or undefined input in the theme resolution code.

Error Stack Trace

TypeError: Object.entries requires that input parameter not be null or undefined
    at entries (unknown)
    at resolveTheme (/$bunfs/root/src/index.js:350607:53)
    at runComputation (/$bunfs/root/src/index.js:339228:24)
    at updateComputation (/$bunfs/root/src/index.js:339211:17)
    at runTop (/$bunfs/root/src/index.js:339334:24)
    at runQueue (/$bunfs/root/src/index.js:339423:11)
    at completeUpdates (/$bunfs/root/src/index.js:339370:15)
    at runUpdates (/$bunfs/root/src/index.js:339356:20)
    at setStore (/$bunfs/root/src/index.js:343481:10)
    at <anonymous> (/$bunfs/root/src/index.js:350686:17)
    at processTicksAndRejections (native:7:39)

Steps to Reproduce

  1. Run opencode command
  2. Error occurs during theme resolution

Environment

  • opencode version: 1.2.27

Analysis

The error occurs in resolveTheme function, suggesting that a theme object is null/undefined when passed to Object.entries. This could be caused by:

  • Missing theme configuration
  • Theme not properly initialized before use
  • Invalid theme value being passed

Expected Behavior

The application should handle null/undefined theme values gracefully, either with a default fallback or proper error message.

Activity

  1. github-actions commented on Mar 21, 2026

    @github-actions
    Contributor

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

    Please review those issues to see if your problem is already tracked or has a known fix. If your case is different (e.g., different opencode version or different reproduction steps), please add that context here.

  2. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Mar 21, 2026
  3. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  4. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

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