firebase Errors
20 error patterns
Firestore Permission Denied
PERMISSION_DENIED.*Missing or insufficient permissions
- •Update Firestore security rules to allow the operation
- •Check auth state - user may not be authenticated
Firebase Quota Exceeded
Quota exceeded.*RESOURCE_EXHAUSTED
- •Upgrade to Blaze plan for higher limits
- •Optimize reads/writes to reduce usage
Firestore Index Not Defined
The query requires an index.*create it here
- •Click the link in the error to auto-create index
- •Add composite index in firestore.indexes.json
Firebase Auth Token Expired
auth/user-token-expired|auth/invalid-user-token
- •Call getIdToken(true) to force refresh
- •Implement onAuthStateChanged listener for token refresh
Cloud Functions Timeout
Function execution took \d+ ms, finished with status: 'timeout'
- •Increase timeoutSeconds in function options
- •Optimize function to complete faster
Firestore Offline Cache Error
Failed to get document because the client is offline
- •Enable offline persistence with enablePersistence()
- •Check network connectivity before operations
Firebase Auth Network Error
auth/network-request-failed
- •Check internet connectivity
- •Verify Firebase project is not blocked by firewall
Firestore Document Already Exists
ALREADY_EXISTS.*Document already exists
- •Use set() with merge option instead of create()
- •Check for existing document before creating
Cloud Functions Cold Start
Cloud Function cold start.*exceeded (\d+)ms
- •Set minInstances to keep warm instances
- •Reduce function dependencies and bundle size
Firebase Storage Permission Denied
storage/unauthorized.*not authorized
- •Update Storage security rules
- •Verify user is authenticated before upload
Firebase Auth Email Already In Use
auth/email-already-in-use
- •Prompt user to sign in with existing account
- •Implement account linking for multiple providers
Firestore Deadline Exceeded
DEADLINE_EXCEEDED.*Firestore
- •Reduce query complexity and result size
- •Add appropriate indexes for the query
Firebase Billing Not Configured
Billing account not configured.*quota
- •Link a billing account in Firebase console
- •Upgrade from Spark to Blaze plan
Firebase Requires Recent Login
auth/requires-recent-login
- •Re-authenticate user with reauthenticateWithCredential
- •Prompt user to sign in again before sensitive op
Cloud Function Missing Return
Function returned undefined.*expected a Promise
- •Return a Promise from the function handler
- •Add return statement before async operations
Firestore Service Unavailable
firestore/unavailable.*offline
- •Enable offline persistence for resilience
- •Implement retry logic with connectivity check
Firebase Storage Retry Limit
storage/retry-limit-exceeded
- •Check network stability before upload
- •Implement resumable uploads for large files
Firebase Rules Limit Exceeded
Exceeded maximum allowed number of rules
- •Refactor rules to use functions for reuse
- •Reduce nested conditions with helper functions
Firebase Auth Popup Closed
auth/popup-closed-by-user
- •Show user-friendly message to retry sign-in
- •Use signInWithRedirect as fallback
Firestore Circular Reference
Maximum call stack size exceeded.*Firestore
- •Remove circular references from document data
- •Use toJSON() or serialize objects before saving