You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Plugin enabled causes startup crash: null is not an object (evaluating 'n.provider') at Provider.list (affects BOTH stable and dev channels) #45181
Error: Unexpected server error. Check server logs for details.
Remove/comment the "plugin" line → launches normally every time.
Server log (--print-logs, stderr)
{"level":"ERROR","message":"failed","error":"TypeError: null is not an object (evaluating 'n.provider')","cause":"TypeError: null is not an object (evaluating 'n.provider')\n at <anonymous> (B:/~BUN/root/chunk-mcbs1fvh.js:439:83422)\n at Provider.list (B:/~BUN/root/chunk-jbrc4ckv.js:3:16007)\n at Provider.list (definition) (B:/~BUN/root/chunk-mcbs1fvh.js:439:88460)\n at ConfigHttpApi.providers (B:/~BUN/root/chunk-jbrc4ckv.js:2:84455)\n at ConfigHttpApi.providers (definition) (B:/~BUN/root/chunk-jbrc4ckv.js:3:15949)"}
{"level":"ERROR","message":"plugin dispose hook failed","error":"null is not an object (evaluating 'N.dispose')"}
Observations
Reproduces on the stable channel (1.18.23) — not a dev-only regression. Tested via clean opencode upgrade 1.18.23 + plugin enabled → same crash; plugin disabled → healthy.
Crash occurs during Provider.list / ConfigHttpApi.providers while the plugin config hook path runs — appears to be a null provider object being dereferenced when plugins are present.
Identical across four builds spanning three days, so not transient.
Also reproduces with my real-world plugin (brain-auto.ts, uses event hook + client), not just the minimal one.
With plugin disabled, zero errors across many sessions on every version.
Expected
Plugin registration should not crash provider enumeration; worst case the plugin errors should be isolated/logged without taking down the TUI.
This issue might be a duplicate of existing issues. Please check:
Legacy plugin loader pushes non-Hooks return values, corrupting plugin loading and crashing startup #42451: Same root cause and identical crash signature — null is not an object (evaluating 'n.provider') in Provider.list when plugins are loaded. That issue traces it to the legacy plugin loader pushing non-Hooks return values into the hooks array, causing hook.provider to dereference undefined/null and crash provider state initialization.
Confirmed — same root cause on our side. Our plugin (�rain-auto.ts, ~550 lines) exported 7 functions: the real default factory plus 6 named helpers (stripCode,
rfFuse, computeConfidence, shouldSkipHybrid, matchFeedback,
ecallBlock). The legacy loader invoked all of them → identical
.provider crash in Provider.list.
Activity
github-actions commentedon Aug 26, 2026
This issue might be a duplicate of existing issues. Please check:
null is not an object (evaluating 'n.provider')inProvider.listwhen plugins are loaded. That issue traces it to the legacy plugin loader pushing non-Hooks return values into the hooks array, causinghook.providerto dereferenceundefined/nulland crash provider state initialization.kasirkupwa-commits commentedon Aug 26, 2026
Confirmed — same root cause on our side. Our plugin (�rain-auto.ts, ~550 lines) exported 7 functions: the real default factory plus 6 named helpers (stripCode,
rfFuse, computeConfidence, shouldSkipHybrid, matchFeedback,
ecallBlock). The legacy loader invoked all of them → identical
.provider crash in Provider.list.
Workaround validated on both