Repository navigation
Closed
Description
I'm facing this issue under WSL, it's probably related to some corporate network config. But every other network related stuff is working properly under my WSL config.
panic: failed to get config: 502
goroutine 1 [running]:
main.main()
/home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:64 +0xaba
WSL distro info
uname -a
Linux MTL-DB283 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
When I curl to 0.0.0.0/config_get I get this error from a proxy server
curl http://0.0.0.0/config_get -I
HTTP/1.1 502 cannotconnect
Via: 1.1 10.180.111.22 (Skyhigh Secure Web Gateway 12.2.7.48536)
Content-Type: text/html
Cache-Control: no-cache
X-Frame-Options: deny
And the error message is
The proxy could not connect to the destination in time.
verbose output
opencode --print-logs
INFO 2025-06-23T17:22:47 +64ms service=default version=0.1.121 args=--print-logs opencode
INFO 2025-06-23T17:22:47 +1ms service=app cwd=/home/francis/dots creating
INFO 2025-06-23T17:22:47 +3ms service=app git=/home/francis/dots git
INFO 2025-06-23T17:22:47 +14ms service=app name=provider registering service
INFO 2025-06-23T17:22:47 +0ms service=app name=config registering service
INFO 2025-06-23T17:22:47 +8ms service=config $schema=https://opencode.ai/config.json theme=opencode autoshare=false autoupdate=true model=github-copilot/gpt-4.1 loaded
INFO 2025-06-23T17:22:47 +1ms service=models.dev refreshing
INFO 2025-06-23T17:22:47 +2ms service=provider init
INFO 2025-06-23T17:22:48 +405ms service=provider providerID=github-copilot found
INFO 2025-06-23T17:22:48 +0ms service=provider providerID=openai found
INFO 2025-06-23T17:22:48 +0ms service=app name=share registering service
INFO 2025-06-23T17:22:48 +0ms service=bus type=storage.write subscribing
INFO 2025-06-23T17:22:48 +0ms service=app name=bus registering service
panic: failed to get config: 502
goroutine 1 [running]:
main.main()
and of course I don't have any access to the corporate proxy server.
Reacted by Daniel Riedl
Metadata
Metadata
Assignees
Labels
No labels
Activity
danriedl commentedon Jun 24, 2025
i do face the same issue with a macbook behind corporate proxy:
curl and other tools are working with my env:
curl "https://api.github.com/repos/sst/opencode/releases/latest"{ "url": "https://api.github.com/repos/sst/opencode/releases/227216807", "assets_url": "https://api.github.com/repos/sst/opencode/releases/227216807/assets", "snip": "..." }sudo-tee commentedon Jun 26, 2025
Last update to
0.1.140seems to have resolved this issue for medanriedl commentedon Jun 26, 2025
I also can confirm that it is working with
0.1.140.@sudo-tee do you mind closing this issue?
feat(headless): publish openwrk npm package (anomalyco#337)