forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
Runtime error when accessing auth.type on undefined auth object:
TypeError: undefined is not an object (evaluating 'auth.type')
This error appears repeatedly in the TUI, blocking normal operation.
Root Cause
Code is accessing auth.type without first checking if auth is defined. This is different from issue #37 (race condition) - this is a simple null check missing.
Reproduction
- Start opencode TUI
- Error appears in output
Fix Required
Add null/undefined checks before accessing auth.type:
// Before (broken)
if (auth.type === "something")
// After (safe)
if (auth?.type === "something")Files to Check
packages/opencode/src/auth/packages/opencode/src/provider/- Any code that reads auth configuration
Priority
Critical - Blocks normal TUI operation
Related
- [Bug] Race condition in auth.json causes provider credentials to disappear #37 (different bug - race condition, already fixed)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working