Skip to content

Error Report: 2026-04-26 (136 errors in last 24h) #496

@claude

Description

@claude

Summary

User validation errors dominate with appropriate CLI messaging. A recurring JSON parsing issue affects logs command users when backend returns non-JSON responses. OAuth token expiration and Backend Platform restrictions continue from previous days. All CLI error handling working correctly with clear user guidance.

Metric Value
Time range last 24 hours
Total errors 136
CLI bugs 1
Backend issues 3
User errors (working as designed) 6
Unique users affected 74+
Internal user occurrences 5

Errors requiring action

1. JSON parsing error with DNS messages — CLI bug

Error code null
Occurrences 10 (0 internal)
Users affected 3
Command logs
Platforms Multiple
PostHog None (no issue_id)
Existing issue Similar to #494
Recurring Yes (2 days)

Error: (from PostHog — the actual error message users see)

SyntaxError: Unexpected token 'D', "DNS cache overflow" is not valid JSON

Stack trace: (insufficient stack trace data in PostHog)

at JSON.parse (during logs operation)

Root cause: JSON response parsing failure during logs command. The error suggests a malformed response starting with "DNS cache overflow" which indicates the API may be returning non-JSON error content (possibly HTML error pages, DNS errors, or plain text responses) that the CLI attempts to parse as JSON.

// packages/cli/src/core/errors.ts:344-355
try {
  responseBody = await error.response.clone().json();
  const parsed = ApiErrorResponseSchema.safeParse(responseBody);
  // ... error formatting
} catch {
  message = error.message;
}

Suggested fix: In packages/cli/src/core/errors.ts:344, add content-type validation before attempting JSON parsing to handle non-JSON responses gracefully and provide clearer error messages when the API returns unexpected content types.


Backend issues (not CLI fixes)

Error Occurrences Users Command PostHog
OAuth token expiration (400) 5 2 functions deploy View
Entity schema restrictions (428) 6 6 entities push View
Authentication service errors (503, 401) 3 3 whoami, link View

OAuth token expiration analysis: Backend returns 400 Bad Request with "OAuth error: expired_token" when user authentication tokens expire during API operations. The CLI correctly reports these via ApiError.fromHttpError() in packages/cli/src/core/errors.ts:335-384.

Entity sync restrictions analysis: Backend returns 428 Precondition Required with messages like "This endpoint is only available for Backend Platform apps" when users try to access features unavailable for their app type. This represents backend business logic validation.

Authentication service analysis: Backend authentication service returning 503 Service Unavailable ("Failed to generate device code") and 401 Unauthorized during authentication flows, indicating infrastructure issues.

User errors (working as designed)

Error Occurrences Users Command PostHog
Duplicate function names 41 23 eject View
Project not found validation 49 24 functions list, entities push, link View
Project already linked 11 4 link View
Authentication timeout 9 10 deploy View
Function configuration validation 5 4 functions deploy, entities push Multiple PostHog links
App configuration missing 4 3 exec View

INVALID_INPUT analysis: Duplicate function names during eject operations show clear validation: "Duplicate function name "createPortalSession"" and "Duplicate agent name "setup_assistant"". The CLI properly validates resource uniqueness and provides actionable error messages.

CONFIG_NOT_FOUND analysis: From project configuration validation, when findProjectRoot() returns null (no config.jsonc found), the CLI throws clear guidance: "No Base44 project found. Run this command from a project directory with a config.jsonc file." This is working as designed.

CONFIG_EXISTS analysis: Users trying to link already-linked projects get validation: "Project is already linked. An .app.jsonc file with the appId already exists." This prevents accidental overwrites.

AUTH_EXPIRED analysis: Authentication timeout handling provides clear guidance: "Authentication timed out. Please try again." directing users to re-authenticate.

SCHEMA_INVALID analysis: Function configuration validation from Zod provides specific field-level guidance like "Invalid input: expected string, received undefined → at entry" which helps users fix their configuration files.

CONFIG_INVALID analysis: App configuration validation provides guidance: "App not configured. Create a .app.jsonc file or run 'base44 link' to link this project."

Environment issues

Error Occurrences Users Command PostHog
File system permissions 8 1 functions list View
Missing function entry files 1 1 dev View
Deno dependency missing 2 2 exec View

File system permissions analysis: Error shows "EACCES: permission denied, scandir '/home//caddy/data/caddy'" with empty stack trace. This appears to be Node.js filesystem behavior during directory scanning operations, not directly caused by CLI code.

Missing entry files analysis: User configuration references non-existent TypeScript entry files: "Function entry file not found: /entry.ts". The CLI correctly validates file references and provides actionable error messages.

Dependency validation analysis: CLI properly validates Deno installation and provides clear guidance: "Deno is required to run scripts with exec" when the dependency is missing.

Recurring errors

Based on previous daily reports (#495, #494, #493, #492, #490), these errors continue from multiple days:

Error Days recurring Existing issue Tracked?
CONFIG_NOT_FOUND validation 13+ days Referenced in #495, #494, #493, #492, #490 Yes (expected user error)
INVALID_INPUT validation 13+ days Referenced in #495, #494, #493, #492, #490 Yes (expected user error)
JSON parsing errors 2+ days Similar issue in #494 Partially (needs fix)
OAuth token expiration 13+ days Referenced in #495, #494, #493, #492, #490 Yes (backend auth)
Backend Platform restrictions 6+ days Referenced in #495, #494, #493, #492 Yes (backend business rules)
Authentication timeout 13+ days Referenced in #495, #494, #493, #492, #490 Yes (expected timeout)

The JSON parsing error with "DNS cache overflow" messages is a recurring CLI bug that needs the fix suggested in issue #494 but appears to still be happening.

Action items

  1. [medium] packages/cli/src/core/errors.ts:344 — Add content-type validation before JSON parsing to handle non-JSON API responses gracefully and provide clearer error messages when backend returns HTML error pages, DNS errors, or plain text responses

Metadata

Metadata

Assignees

No one assigned

    Labels

    error-reportDaily error reports from telemetry data

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions