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
Whenever i try to login with opencode zen (recommended) it freezes entirely.
if i run
opencode auth login zen
This is my result:
┌ Add credential
Error: Unexpected error, check log file at /home/simpa/.local/share/opencode/log/2025-10-21T180236.log for more details
113003 | directory: process.cwd(),
113004 | async fn() {
113005 | UI2.empty();
113006 | Ge("Add credential");
113007 | if (args2.url) {
113008 | const wellknown = await fetch(`${args2.url}/.well-known/opencode`).then((x3) => x3.json());
^
TypeError: fetch() URL is invalid
code: "ERR_INVALID_URL"
at fetch (unknown:1:1)
at fn (/$bunfs/root/index.js:113008:40)
at fn (/$bunfs/root/index.js:113004:22)
at processTicksAndRejections (native:7:39)
Logfile:
INFO 2025-10-21T18:02:36 +120ms service=default version=0.15.12 args=["auth","login","zen"] opencode
INFO 2025-10-21T18:02:36 +0ms service=project directory=/home/simpa fromDirectory
ERROR 2025-10-21T18:02:36 +15ms service=default name=TypeError message=fetch() URL is invalid stack=TypeError: fetch() URL is invalid
at fetch (unknown)
at fn (/$bunfs/root/index.js:113008:40)
at fn (/$bunfs/root/index.js:113004:22)
at processTicksAndRejections (native:7:39) fatal
Seems to be an invalid URL or I am an idiot unable to get it working. :D
This issue might be a duplicate of existing issues. Please check:
Program is stuck on initialization #3082: Similar authentication issues with zen provider where the program gets stuck during initialization and authentication process
Feel free to ignore if none of these address your specific case.
I had the same problem and was able to solve it by disabling IPv6 in my environment (I'm on ChromeOS and my linux environment isn't playing nice with IPv6). This appears to be a common problem with bun, and isn't OpenCode-related.
Activity
github-actions commentedon Oct 21, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Oct 21, 2025
@Simpaqt it is interactive so you need to do this (im using
bun x opencode-ai@latestfor you that's justopencode:Then enter your key and hit submit
Simpaqt commentedon Oct 21, 2025
I see, well bun doesnt work for me. Not sure what the issue is with it but its stuck on resolve and never moves.
As for opencode auth login. It doesnt move past this point.
Simpaqt commentedon Oct 21, 2025
Here are the --print-logs version
rekram1-node commentedon Oct 21, 2025
@Simpaqt what kind of network speed do you have this could be issue with installing the necessary provider packages.
It looks like it is downloading from npm but it is stuck on that download.
If you let it run it should resolve, for me it takes less than a second but depending on ur network it could take longer
Simpaqt commentedon Oct 21, 2025
I would say i have a decent enough connection..
rekram1-node commentedon Oct 21, 2025
i guess what happens if you just let it play out?
Simpaqt commentedon Oct 21, 2025
@rekram1-node well it moved a bit.
this is what is showing currently
rekram1-node commentedon Oct 21, 2025
I guess it's just taking it's time for whatever reason, we should probably add some visual indicator at some point
Simpaqt commentedon Oct 21, 2025
To be fair, i have had major issues with bun. But i'll just leave it running to see what happens.
Eric-Guo commentedon Nov 7, 2025
I meet the same problm and the solution is using
A modern terminal emulator(MacOS Terminal is not) or entertmuxfirst.greeze commentedon Nov 22, 2025
I had the same problem and was able to solve it by disabling IPv6 in my environment (I'm on ChromeOS and my linux environment isn't playing nice with IPv6). This appears to be a common problem with bun, and isn't OpenCode-related.