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
do not crash on bad user config, or if we must at least provide better feedback #4145
I messed up the structure of my config with non-existent keys, and opencode died with this extremely helpful message:
[ERROR] Error: undefined is not an object (evaluating 'x3.data.providers') │After this operation, 1736 kB disk space will be freed.
TypeError: undefined is not an object (evaluating 'x3.data.providers') │Do you want to continue? [Y/n] y
at <anonymous> (src/cli/cmd/tui/context/sync.tsx:148:81) │(Reading database ... 129950 files and directories currently installed.)
at processTicksAndRejections (native:7:39) │Removing certbot (2.9.0-1) ...
[21:56:12] [ERROR] Error: undefined is not an object (evaluating 'x3.data.providers') │Removing python3-certbot (2.9.0-1) ...
TypeError: undefined is not an object (evaluating 'x3.data.providers') │Processing triggers for man-db (2.12.0-4build2) ...
at <anonymous> (src/cli/cmd/tui/context/sync.tsx:148:81) │
at processTicksAndRejections (native:7:39)
It should definitely tell me that my config is bad, better yet, tell me what it does not like.
It will surface errors better to the user without crashing like this. Although, since the error in this specific issue is regarding the configuration, the app should probably exit immediately (*), informing the user of the issue. This is because virtually anything useful in the TUI depends on the user's configuration.
If not... given OC is still being developed please try to "stay in the game" rather than exiting immediately. Robust startup is discussed, here #3537 (comment)
Activity
github-actions commentedon Nov 9, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
veracioux commentedon Nov 9, 2025
I have a PR in the works for this: #4058.
It will surface errors better to the user without crashing like this. Although, since the error in this specific issue is regarding the configuration, the app should probably exit immediately (*), informing the user of the issue. This is because virtually anything useful in the TUI depends on the user's configuration.
(*) I'm currently working on this.
ferdinandyb commentedon Nov 9, 2025
exit immediately is a much better idea yes!
taqtiqa-mark commentedon Nov 10, 2025
@ferdinandyb and @veracioux this is a duplicate of #3868. Can you close this and discuss there?
If not... given OC is still being developed please try to "stay in the game" rather than exiting immediately. Robust startup is discussed, here #3537 (comment)