-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Summary
One CLI bug identified requiring immediate attention: EPIPE errors during authentication flows. Most other errors are backend availability issues or expected user validation errors. The volume of Backend Platform availability errors suggests user confusion about app types.
| Metric | Value |
|---|---|
| Time range | last 24 hours |
| Total errors | 123 |
| CLI bugs | 1 |
| Backend issues | 1 |
| User errors (working as designed) | 7 |
| Unique users affected | 64 |
| Internal user occurrences | 25 |
Errors requiring action
1. Authentication EPIPE broken pipe errors — CLI bug
| Error code | None |
| Occurrences | 11 (2 internal) |
| Users affected | 10 |
| Command | login |
| Platforms | All platforms |
| PostHog | No issue_id available |
| Existing issue | Mentioned in #280 |
| Recurring | No (new in this report) |
Error: (from PostHog — the actual error message users see)
Error: EPIPE: broken pipe, write
Stack trace: (only show frames from src/)
at login (src/cli/commands/auth/login-flow.ts:105:4)
at waitForAuthentication (src/cli/commands/auth/login-flow.ts:46:4)
Root cause: (what you found in the code — include a code snippet)
// src/cli/commands/auth/login-flow.ts:46
try {
await runTask(
"Waiting for authentication...",
async () => {
await pWaitFor(
// ... authentication polling logic
);
},
{
successMessage: "Authentication completed!",
errorMessage: "Authentication failed",
},
);
} catch (error) {
if (error instanceof Error && error.message.includes("timed out")) {
throw new Error("Authentication timed out. Please try again.");
}
throw error; // EPIPE errors are not caught specifically
}The EPIPE error occurs when the CLI continues trying to write to stdout (via runTask spinner updates) after the user has cancelled the authentication process, causing the output pipe to be broken.
Suggested fix: Add EPIPE error handling in src/cli/commands/auth/login-flow.ts:73 to catch broken pipe errors and throw a proper CLI error instead of propagating the raw Node.js error.
Backend issues (not CLI fixes)
Brief table of errors caused by the backend/server, not the CLI:
| Error | Occurrences | Users | Command | PostHog |
|---|---|---|---|---|
| Backend Platform availability | 50 | 16 | entities push |
link |
Backend Platform availability errors (50 occurrences): HTTP 428 responses with "This endpoint is only available for Backend Platform apps" when users try to sync entities. This is working as designed but high volume (50 occurrences vs 15 internal) suggests user confusion about app platform types.
User errors (working as designed)
Brief table of expected user errors where the CLI validation is correct:
| Error | Occurrences | Users | Command | PostHog |
|---|---|---|---|---|
| No project found (CONFIG_NOT_FOUND) | 19 | 11 | deploy |
link |
| Project already linked (CONFIG_EXISTS) | 15 | 8 | link |
link |
| Invalid entity schemas (SCHEMA_INVALID) | 11 | 6 | entities push |
link |
| Missing build output (FILE_NOT_FOUND) | 8 | 6 | deploy |
link |
| Missing app config (CONFIG_INVALID) | 6 | 4 | entities push |
link |
| Invalid project ID (INVALID_INPUT) | 3 | 3 | link |
link |
The CONFIG_NOT_FOUND and CONFIG_EXISTS errors remain the most common user errors (34 total occurrences), indicating users running commands in wrong directories or attempting to re-link projects.
Recurring errors
Comparing with previous reports (#280, #281):
| Error | Days recurring | Existing issue | Tracked? |
|---|---|---|---|
| CONFIG_NOT_FOUND | 3+ days | error-reports only | partially |
| CONFIG_EXISTS | 3+ days | error-reports only | partially |
| SCHEMA_INVALID | 3+ days | error-reports only | partially |
| FILE_NOT_FOUND (deploy) | 3+ days | error-reports only | partially |
New in this report: EPIPE errors during authentication - this is a new error type not seen in previous daily reports.
Notable absence: Function deployment timeout errors that were prominent in previous reports (105 occurrences in #272, 25 in #281) are not present in today's data, suggesting those backend issues may have been resolved.
Action items
Numbered list of concrete next steps, most important first:
- [high]
src/cli/commands/auth/login-flow.ts:73— Add specific EPIPE error handling to catch broken pipe errors when users cancel authentication and throw a proper CLI error with guidance - [low] Monitor Backend Platform availability error volume to identify if documentation or UX improvements are needed to clarify app platform types
- [low] Consider improving FILE_NOT_FOUND error message in
src/core/site/deploy.ts:16to suggest common build commands based on detected package.json scripts
Metadata
Metadata
Assignees
Labels
Type
Projects
Status