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.
| Cause | Fix |
|---|---|
| Collection not created yet | Ask the chat to apply the PocketBase schema and regenerate app queries |
| Wrong logical name in code | Use col('tasks') — do not hard-code prefixed collection names |
| Fetching a deleted record | Handle empty results in UI; verify the ID still exists |
| Server function URL typo | Match the hook path exactly; check Logs |
Users can't sign up or log in
- Confirm Authentication is enabled for your project in V2 Cloud.
- Check collection access rules — new users need create/read rules on the
userscollection and your app collections. - In preview, open the browser console or app error state — invalid email format and weak passwords show user-facing errors.
- 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
| Symptom | What to check |
|---|---|
| Empty lists | Query filters, user ID, or list rules may block reads |
| Save silently fails | Create/update rules on the collection |
| Works in preview, not on device | Same 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.
