This repository was archived by the owner on Feb 14, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 268
This repository was archived by the owner on Feb 14, 2026. It is now read-only.
Authentication stuck: Mobile shows success but CLI remains at 'Waiting for authentication...' #171
Copy link
Copy link
Open
Description
Bug Description
The CLI authentication flow gets stuck after the mobile app successfully scans the QR code. The mobile app shows authentication successful, but the CLI remains stuck at "Waiting for authentication..." indefinitely and never saves credentials.
Steps to Reproduce
- Run
happy auth login - Select "1. Mobile App"
- Scan QR code with Happy mobile app
- Mobile app shows "Authentication successful"
- CLI remains stuck at "Waiting for authentication..."
- No credentials are saved to
~/.happy/
Expected Behavior
- CLI should receive authentication response from server
- CLI should save credentials to
~/.happy/ - CLI should exit successfully
- Subsequent
happycommands should work without re-authentication
Actual Behavior
- Mobile app completes authentication successfully
- CLI never receives confirmation
- Authentication polling appears to timeout or fail silently
happy doctorshows:⚠️ Not authenticated (no credentials)- No JSON credential files are created in
~/.happy/
Environment
CLI Information:
- Happy CLI Version: 0.13.0
- Platform: darwin arm64 (macOS)
- Node.js Version: v25.4.0
- Server URL: https://api.cluster-fluster.com
System Information:
Happy Home: /Users/virus./.happy
Logs Dir: /Users/virus./.happy/logs
From happy doctor:
🔐 Authentication
⚠️ Not authenticated (no credentials)
🤖 Daemon Status
❌ Daemon is not running
Logs
All authentication attempts show the same pattern:
[AUTH] Starting auth and machine setup...
[AUTH] No credentials found, starting authentication flow...
Then the log stops with no success or failure message.
Impact
- Cannot use Happy CLI at all
- Mobile app shows "No devices" because CLI never registers as a machine
- Blocking all Happy Coder functionality
Possible Root Cause
Based on code analysis, the issue appears to be in the authentication polling logic:
- CLI sends auth request (POST
/v1/auth/request) - Mobile scans and approves (POST
/v1/auth/response) - CLI should poll status endpoint (GET
/v1/auth/request/status) - Polling appears to timeout or not receive server response
The authentication response likely completes on the server side (mobile sees success) but the CLI's polling mechanism fails to retrieve or process the response.
Workarounds Attempted
- Waited 5+ minutes for authentication to complete
- Killed and restarted CLI multiple times
- Tried both Mobile App and Web Browser authentication methods
- All attempts result in same stuck behavior
Additional Context
Server API health check confirms server is reachable:
$ curl https://api.cluster-fluster.com/health
{"status":"ok","timestamp":"2026-02-14T04:09:18.343Z","service":"happy-server"}Network connectivity is confirmed working.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels