-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Summary
Authentication timeout classification bug continues from previous reports - urgent fix needed. Backend 428 errors dominate non-user errors (69% of API_ERROR occurrences), indicating ongoing Backend Platform app migration issues.
| Metric | Value |
|---|---|
| Time range | last 24 hours |
| Total errors | 161 |
| CLI bugs | 1 |
| Backend issues | 3 |
| User errors (working as designed) | 4 |
| Unique users affected | 62 |
| Internal user occurrences | 25 |
Errors requiring action
1. Authentication timeout lacks error classification — CLI bug
| Error code | None (unclassified) |
| Occurrences | 12 (0 internal) |
| Users affected | 12 |
| Command | whoami, login |
| Platforms | Linux, Windows |
| PostHog | View in error tracking |
| Existing issue | Referenced in #413, #409 |
| Recurring | Yes (3+ days) |
Error: (from PostHog — the actual error message users see)
Error: Authentication timed out. Please try again.
Stack trace: (only showing frames from packages/cli/src/)
at waitForAuthentication (packages/cli/src/cli/commands/auth/login-flow.ts:71)
Root cause: The authentication timeout throws a generic Error without proper classification:
// packages/cli/src/cli/commands/auth/login-flow.ts:69-73
} catch (error) {
if (error instanceof Error && error.message.includes("timed out")) {
throw new Error("Authentication timed out. Please try again.");
}
throw error;
}This timeout occurs when the OAuth2 device code expires (line 60: timeout: expiresIn * 1000). The generic Error lacks proper classification for telemetry tracking, causing error_code: null and is_user_error: null in PostHog.
Suggested fix: Replace Error with AuthRequiredError or create new AuthTimeoutError class in packages/cli/src/core/errors.ts to properly classify this error.
Backend issues (not CLI fixes)
| Error | Occurrences | Users | Command | PostHog |
|---|---|---|---|---|
| 428 Backend Platform requirement | 18 | 11 | functions deploy, site deploy |
link |
| 500 Function logs backend error | 1 | 1 | logs |
link |
| OAuth expired token errors | 7 | 7 | eject, functions deploy |
link |
These are backend/server issues where the CLI correctly reports the server's error response. The 428 errors indicate ongoing Backend Platform app migration requirements.
User errors (working as designed)
| Error | Occurrences | Users | Command | PostHog |
|---|---|---|---|---|
| No project directory (CONFIG_NOT_FOUND) | 53 | 19 | link, deploy |
link |
| Invalid eject project (INVALID_INPUT) | 17 | 8 | eject |
link |
| Invalid config schema (SCHEMA_INVALID) | 14 | 10 | functions deploy |
link |
| Already linked project (CONFIG_EXISTS) | 10 | 6 | link |
link |
| Missing app config (CONFIG_INVALID) | 9 | 8 | functions deploy |
link |
All user errors show expected validation behavior. CONFIG_NOT_FOUND volume (53 occurrences) is consistent with users running CLI commands outside project directories.
Recurring errors
| Error | Days recurring | Existing issue | Tracked? |
|---|---|---|---|
| Authentication timeout (unclassified) | 3+ days | Referenced in daily reports | No dedicated issue |
| 428 Backend Platform requirement | Ongoing | Part of platform migration | Backend team aware |
The authentication timeout classification bug needs a dedicated issue for tracking the fix.
Action items
- [critical]
packages/cli/src/cli/commands/auth/login-flow.ts:71— Replace genericErrorwith proper CLI error class (e.g.,AuthRequiredErroror newAuthTimeoutError) to enable proper telemetry classification - [medium] Monitor 428 Backend Platform errors — coordinate with backend team on migration timeline and user communication
- [low] Consider improving error message for expired OAuth tokens to suggest re-authentication