Skip to content

Error: undefined is not an object (evaluating 'x3.data.providers' ) #3868

Closed

Description

@FrankFang

Description

Image

OpenCode version

1.0.19

Steps to reproduce

$ opencode

Operating System

Linux 6.6.87.2-microsoft-standard-WSL2

Terminal

Windows Terminal


Update:

When using OpenCode 1.0.55, this issue does not occur.

However, when I set http_proxy and https_proxy, the issue reappears and the UI becomes frozen, making it impossible to open the debug panel.

If I unset http_proxy and https_proxy, the issue disappears.

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 4, 2025
  2. self-assigned this
    on Nov 4, 2025
  3. taqtiqa-mark commented on Nov 4, 2025

    @taqtiqa-mark

    I also observe this error with a config file that was accepted in v0.15.18

    Without the custom config file the TUI launches fine.

  4. taqtiqa-mark commented on Nov 4, 2025

    @taqtiqa-mark

    @FrankFang, the issue #3462 hints that this might be caused by an invalid agent file. Not sure if that helps you at least launch the TUI?

  5. taqtiqa-mark commented on Nov 4, 2025

    @taqtiqa-mark

    Confirming that v0.15.31 does not have this behavior.

  6. aliabdy commented on Nov 7, 2025

    @aliabdy

    I experienced the same problem, and when I disabled my HTTP proxy, the issue was resolved!

  7. frap129 commented on Nov 7, 2025

    @frap129

    I experienced the same problem, and when I disabled my HTTP proxy, the issue was resolved!

    Just tested and this resolved it for me. Unsetting the HTTP_PROXY and HTTPS_PROXY env vars resolved it. Using proxychains to force it through the proxy works fine, so its not related to the proxy itself.

  8. taqtiqa-mark commented on Nov 8, 2025

    @taqtiqa-mark

    I experienced the same problem, and when I disabled my HTTP proxy, the issue was resolved!

    Just tested and this resolved it for me. Unsetting the HTTP_PROXY and HTTPS_PROXY env vars resolved it. Using proxychains to force it through the proxy works fine, so its not related to the proxy itself.

    I do not have these variables present, and experience the error.

  9. taqtiqa-mark commented on Nov 10, 2025

    @taqtiqa-mark

    This behavior is still present in v1.0.51:

    INFO  2025-11-10T02:09:39 +994ms service=default version=1.0.51 args=["attach","http://127.0.0.1:4096"] opencode
    ERROR 2025-11-10T02:09:42 +2995ms service=acp-command promise={} reason=undefined is not an object (evaluating 'x3.data.providers') Unhandled rejection
    ERROR 2025-11-10T02:09:42 +0ms service=default e=undefined is not an object (evaluating 'x3.data.providers') rejection
    
  10. aliabdy commented on Nov 10, 2025

    @aliabdy

    I'm currently using version 1.0.5, and this error no longer appears, regardless of the proxy settings.

  11. davit-b commented on Nov 10, 2025

    @davit-b

    1.0.55 having this error CONSISTENTLY. Went from being able to use opencode and now can't open it at all. wtf.

    Image
  12. rekram1-node commented on Nov 10, 2025

    @rekram1-node
    Collaborator

    @davit-b unfortunately a recent commit is hiding config errors from the user (and I will fix it asap) can u run opencode debug config and show me what u see?

  13. theasp commented on Nov 10, 2025

    @theasp

    In my case, I can't run opencode debug config without unsetting http_proxy and https_proxy. If I do unset them it prints out a valid config.

  14. taqtiqa-mark commented on Nov 10, 2025

    @taqtiqa-mark

    @rekram1-node :

    ❯ opencode debug config
    ❌ Name mismatch in /home/node/.config/opencode/skills/SKILL.md:
       Frontmatter name: "writing-skills"
       Directory name: "skills"
       Fix: Update the 'name' field in SKILL.md to match the directory name
    Error: Unexpected error, check log file at /home/node/.local/share/opencode/log/2025-11-10T194441.
    
    BunInstallFailedError: BunInstallFailedError
     data: {
      pkg: "opencode-copilot-auth",
      version: "0.0.3",
    },
    
          at src/bun/index.ts:82:17
          at processTicksAndRejections (native:7:39)
    
    38 |       code,
    39 |       stdout,
    40 |       stderr,
    41 |     })
    42 |     if (code !== 0) {
    43 |       throw new Error(`Command failed with exit code ${result.exitCode}`)
                     ^
    error: Command failed with exit code 1
          at run2 (src/bun/index.ts:43:13)
    

    UPDATE:
    @rekram1-node, skills/SKILL.md should just be ingnored... the dev workflow is you just move it up a folder to disable a skill you are developing. Move it back to resume development.

  15. arcticShadow commented on Nov 10, 2025

    @arcticShadow

    Just hit this as well - summarised output from opencode debug config:

    --- Errors ---
    InvalidCharacter at line 16, column 17
    

    and its specifically referencing the prompt line of an agent.

    my prompt line looks like this "prompt": "{file:..rules/memory-bank/memory-bank-instructions.md} \n---\n {file:..agent-instructions/pr-review.txt} \n---\n github owner/repository: {env:GITHUB_ACTION_REPOSITORY}\npull request number: {env:PULL_REQUEST_NUMBER}",

    line 16 is inside the first markdown file and resolves to a ## i.e. a level 2 markdown heading. However, column 17 is a capital S so i'm thinking thats not the correct line reference. Its a normal markdown.

    edit: removed bits and pieces in the prompt line and found i had a pasted character that appeared as a space, but was not being accepted. I deleted it, and added an actual space it the config parses & the app loads.

    the problematic character (if it even correctly manifests it self here in github) is

    	
    

    This character identifying website identifies it as a tab control character
    https://software.hixie.ch/utilities/cgi/unicode-decoder/character-identifier?characters=%09

  16. taqtiqa-mark commented on Nov 10, 2025

    @taqtiqa-mark

    @veracioux and @rekram1-node another test case that should not crash the UI:

    opencode debug config
    Error: Config file at /home/node/.config/opencode/explore.jsonc is invalid
    ↳ Unrecognized keys: "app_help", "project_init", "tool_details", "thinking_blocks" keybinds
    
  17. Leka74 commented on Nov 10, 2025

    @Leka74
    Contributor
    ❯ opencode debug config
    Error: Config file at /Users/leke/.opencode/opencode.jsonc is invalid
    ↳ Unrecognized keys: "rules", "alwaysAllowReadPattern", "alwaysAllowWritePattern"

    Deleting those fields in the opencode.jsonc fixed it.

  18. FrankFang commented on Nov 11, 2025

    @FrankFang
    Author

    When using OpenCode 1.0.55, this issue does not occur.

    However, when I set http_proxy and https_proxy, the issue reappears and the UI becomes frozen, making it impossible to open the debug panel.

    If I unset http_proxy and https_proxy, the issue disappears.

  19. darcy commented on Nov 11, 2025

    @darcy

    Another case of this in v1.0.57:

    I can reproduce this with an empty git init:

    Works fine:

    mkdir testing
    cd testing
    opencode

    Crashes with above error

    mkdir testing 
    cd testing
    git init
    opencode
  20. kfuglsang commented on Nov 11, 2025

    @kfuglsang

    Happens to me in v1.0.58 as well.

  21. thdxr commented on Nov 12, 2025

    @thdxr
    Member

    1.0.59 should have better errors so we can at least see

  22. frap129 commented on Nov 12, 2025

    @frap129

    HTTP_PROXY and HTTPS_PROXY set in env with opencode 1.0.61:
    Image

    Without HTTP_PROXY and HTTPS_PROXY set:
    Image

    Note that, despite the "This page cannot be displayed" html printout, the network should be accessible. Nothing else fails with these env vars set, and opencode 0.15.31 works fine with them set.

    EDIT: Oddly, I don't get the same error when using opencode run:

    $ opencode run -m github-copilot/gpt-5-mini --print-logs hello
    INFO  2025-11-13T15:47:24 +613ms service=default version=1.0.62 args=["run","-m","github-copilot/gpt-5-mini","--print-logs","hello"] opencode
    INFO  2025-11-13T15:47:24 +2ms service=default directory=/tmp creating instance
    INFO  2025-11-13T15:47:24 +1ms service=project directory=/tmp fromDirectory
    INFO  2025-11-13T15:47:24 +22ms service=default directory=/tmp bootstrapping
    INFO  2025-11-13T15:47:24 +10ms service=config path=/home/joe/.config/opencode/config.json loading
    INFO  2025-11-13T15:47:24 +0ms service=config path=/home/joe/.config/opencode/opencode.json loading
    INFO  2025-11-13T15:47:24 +2ms service=config path=/home/joe/.config/opencode/opencode.jsonc loading
    INFO  2025-11-13T15:47:24 +45ms service=bun cmd=["/tmp/bunx-1001-opencode-ai@latest/node_modules/opencode-linux-x64/bin/opencode","add","@opencode-ai/plugin@1.0.62","--exact"] cwd=/home/joe/.config/opencode running
    INFO  2025-11-13T15:47:24 +14ms service=bun code=0 stdout=bun add v1.3.2 (b131639c)
    
    installed @opencode-ai/plugin@1.0.62
    
    [3.00ms] done
     stderr=Saved lockfile
     done
    INFO  2025-11-13T15:47:24 +17ms service=plugin path=opencode-skills loading plugin
    INFO  2025-11-13T15:47:24 +159ms service=plugin path=opencode-sessions loading plugin
    INFO  2025-11-13T15:47:24 +2ms service=plugin path=opencode-copilot-auth@0.0.5 loading plugin
    INFO  2025-11-13T15:47:24 +2ms service=plugin path=opencode-anthropic-auth@0.0.2 loading plugin
    INFO  2025-11-13T15:47:24 +29ms service=bus type=* subscribing
    INFO  2025-11-13T15:47:24 +0ms service=bus type=session.updated subscribing
    INFO  2025-11-13T15:47:24 +0ms service=bus type=message.updated subscribing
    INFO  2025-11-13T15:47:24 +0ms service=bus type=message.part.updated subscribing
    INFO  2025-11-13T15:47:24 +0ms service=format init
    INFO  2025-11-13T15:47:24 +0ms service=bus type=file.edited subscribing
    INFO  2025-11-13T15:47:24 +1ms service=lsp LSP server pyright is disabled
    INFO  2025-11-13T15:47:24 +0ms service=lsp serverIds=deno, typescript, vue, eslint, gopls, ruby-lsp, elixir-ls, zls, csharp, sourcekit-lsp, rust, clangd, svelte, astro, jdtls, lua-ls, kotlin, basedpyright, makefile enabled LSP servers
    INFO  2025-11-13T15:47:24 +2ms service=bus type=command.executed subscribing
    Error: Session not found
    
  23. hygt commented on Nov 21, 2025

    @hygt

    @frap129 you need to add 127.0.0.1 to your no_proxy environment variable.

    As for the initial error with x3.data.providers I can confirm that the latest versions don't trigger it anymore when I'm on my company's corporate network.

  24. frap129 commented on Nov 21, 2025

    @frap129

    @frap129 you need to add 127.0.0.1 to your no_proxy environment variable.

    As for the initial error with x3.data.providers I can confirm that the latest versions don't trigger it anymore when I'm on my company's corporate network.

    Thanks for the quick fix! I had "127.0.0.0/8" in my no_proxy, which works for everything else, but I guess the mask isn't working in this case

  25. rekram1-node commented on Nov 21, 2025

    @rekram1-node
    Collaborator

    This one is fixed, there is a separate issue relating to proxy stuff that I will try to address soon

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions