Environment
| Field |
Value |
| Kane CLI version |
0.2.11 |
| OS |
macOS 15.7.5 (Apple Silicon - M4 MacBook Pro) |
| Install method |
Homebrew |
Description
When attempting to log in via OAuth (browser), after selecting "OAuth (browser)" → "+ Create new profile" → entering a profile name, the CLI immediately shows a "Login failed — fetch failed" error. The browser never opens to complete OAuth authorization. No URL is shown, no redirect happens, no actionable error message is provided.
Steps to Reproduce
- Run
kane-cli login
- Select "OAuth (browser)" as auth method
- Select "+ Create new" profile
- Enter a profile name (e.g. "anubhavs")
- Press Enter to confirm
Expected Behavior
Kane CLI should open the system default browser to the TestMu AI consent page. After signing in and approving, tokens should be stored at ~/.testmuai/kaneai/profiles/<profile>/<env>/credentials and login confirmed.
Actual Behavior
CLI immediately shows:
"Login failed — fetch failed"
No browser opens. No URL or redirect is shown. No actionable error is provided.
Additional Context
- Chrome works fine from terminal:
open -a "Google Chrome" https://google.com succeeds
$BROWSER environment variable is not set
- Network: WiFi, no VPN
- An existing profile "asd" had an expired token (expired 2026-05-12), which prompted this re-login attempt
- Basic Auth was NOT tested as a workaround
- Command used:
kane-cli login (interactive wizard, no --oauth flag)
- No active profile existed at time of reproduction
Update — Root cause (from NODE_DEBUG=undici trace)
The underlying Node error is UNABLE_TO_GET_ISSUER_CERT_LOCALLY on the call to POST https://auth.lambdatest.com/oauth2/register. The CLI surfaces it only as "fetch failed".
Reason: auth.lambdatest.com serves only the leaf certificate in the TLS handshake — the intermediate (Thawte TLS RSA CA G1) is not included, and the leaf has no AIA "CA Issuers" URL. curl and browsers work because they have the intermediate cached; Node's fetch (undici) requires the server to send the full chain and fails to validate.
Reproducible without kane-cli:
node -e "fetch('https://auth.lambdatest.com/').catch(e => console.log(e.cause?.code))"
// → UNABLE_TO_GET_ISSUER_CERT_LOCALLY
Workaround that confirms diagnosis: NODE_TLS_REJECT_UNAUTHORIZED=0 kane-cli login --oauth succeeds.
Suggested actions
- Server: configure
auth.lambdatest.com (and likely other LambdaTest endpoints on the same cert) to serve the full chain incl. the Thawte intermediate.
- CLI: when fetch fails, surface
error.cause.code and the target URL instead of the bare "fetch failed" — would have made this triagable in one step.
Environment
Description
When attempting to log in via OAuth (browser), after selecting "OAuth (browser)" → "+ Create new profile" → entering a profile name, the CLI immediately shows a "Login failed — fetch failed" error. The browser never opens to complete OAuth authorization. No URL is shown, no redirect happens, no actionable error message is provided.
Steps to Reproduce
kane-cli loginExpected Behavior
Kane CLI should open the system default browser to the TestMu AI consent page. After signing in and approving, tokens should be stored at
~/.testmuai/kaneai/profiles/<profile>/<env>/credentialsand login confirmed.Actual Behavior
CLI immediately shows:
"Login failed — fetch failed"
No browser opens. No URL or redirect is shown. No actionable error is provided.
Additional Context
open -a "Google Chrome" https://google.comsucceeds$BROWSERenvironment variable is not setkane-cli login(interactive wizard, no--oauthflag)Update — Root cause (from
NODE_DEBUG=undicitrace)The underlying Node error is
UNABLE_TO_GET_ISSUER_CERT_LOCALLYon the call toPOST https://auth.lambdatest.com/oauth2/register. The CLI surfaces it only as "fetch failed".Reason:
auth.lambdatest.comserves only the leaf certificate in the TLS handshake — the intermediate (Thawte TLS RSA CA G1) is not included, and the leaf has no AIA "CA Issuers" URL.curland browsers work because they have the intermediate cached; Node's fetch (undici) requires the server to send the full chain and fails to validate.Reproducible without kane-cli:
Workaround that confirms diagnosis:
NODE_TLS_REJECT_UNAUTHORIZED=0 kane-cli login --oauthsucceeds.Suggested actions
auth.lambdatest.com(and likely other LambdaTest endpoints on the same cert) to serve the full chain incl. the Thawte intermediate.error.cause.codeand the target URL instead of the bare "fetch failed" — would have made this triagable in one step.