Keep login waiting when the browser cannot be opened - #90
Open
Chebaleomkar wants to merge 1 commit into
Open
Chebaleomkar wants to merge 1 commit into
Chebaleomkar wants to merge 1 commit into
Conversation
If xdg-open/open fails (e.g. WSL without a browser handler), the auth flow aborted even though it had just printed the URL to visit manually. Log the failure and keep the callback server listening until the existing timeout instead. Fixes supermemoryai#72
This was referenced Sep 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #72
Problem: On systems without a browser opener (e.g. WSL with no
xdg-open),loginprints "If it doesn't open, visit: " and then immediately exits withFailed to open browser: spawn xdg-open ENOENT, so the printed URL can't be used.Fix: A failed browser launch is no longer fatal. The CLI logs the error and keeps the callback server listening until the existing auth timeout, so the user can open the URL manually.
Testing:
src/services/auth.test.ts, which fails onmain(callback server already closed) and passes with this change.pnpm dlx opencode-supermemory@latest loginin WSL will result in an error #72 in WSL2 Ubuntu 24.04 withoutxdg-open. With the fix, the callback succeeded both from inside WSL and from Windows via localhost forwarding (the path a user takes when opening the URL in their Windows browser).bun run typecheckandbun test(34 pass) are clean.