-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Open
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)opentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui
Description
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
- Run opencode command
- 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)opentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui