V2 Cloud & backend

Fix authentication, database, storage, and server function issues with V2 Cloud.

V2 Cloud adds auth, database, file storage, and server logic to your app. Backend issues usually appear in the generated app preview, V2 Cloud logs, or the AI chat when schema updates fail.

API or collection request returns 404

A 404 from V2 Cloud usually means the resource name or record ID does not exist.

CauseFix
Collection not created yetAsk the chat to apply the PocketBase schema and regenerate app queries
Wrong logical name in codeUse col('tasks') — do not hard-code prefixed collection names
Fetching a deleted recordHandle empty results in UI; verify the ID still exists
Server function URL typoMatch the hook path exactly; check Logs

Users can't sign up or log in

  1. Confirm Authentication is enabled for your project in V2 Cloud.
  2. Check collection access rules — new users need create/read rules on the users collection and your app collections.
  3. In preview, open the browser console or app error state — invalid email format and weak passwords show user-facing errors.
  4. Ask the chat to "Fix V2 Cloud auth rules for sign-up and login" and mention the exact error.

See Authentication.

Data not saving or not loading

SymptomWhat to check
Empty listsQuery filters, user ID, or list rules may block reads
Save silently failsCreate/update rules on the collection
Works in preview, not on deviceSame project and V2 Cloud env — republish if you changed schema

Review Database access rules. After schema changes, the AI should regenerate matching app code — if not, ask explicitly.

File upload fails

  • Confirm the bucket exists and rules allow the current user to upload.
  • Use public buckets only for assets meant to be world-readable.
  • Large files may hit platform limits — compress images before upload.

See File storage.

Server function errors

  • Open V2 Cloud → Logs for hook and function stack traces.
  • Verify secrets referenced in hooks exist under Secrets.
  • Ask the chat to fix the hook with the log message attached.

Schema or hook changes not applied

  • PocketBase schema updates run through the platform — wait for the chat to finish the full tool sequence.
  • If the app still uses old field names, ask: "Sync app code with the latest V2 Cloud schema."
  • Check Logs for migration or validation errors.

V2 Cloud AI balance depleted

In-app AI features bill separately from build credits. Top up under Usage & top-ups → V2 Cloud AI funding.