Your Cloud Firestore database is in maintenance mode, preventing read/write operations. This typically occurs during initial setup, configuration updates, or Firebase infrastructure maintenance. Wait for the operation to complete or check your database settings.
This error occurs when your Firestore database is temporarily unavailable due to maintenance operations. Firestore may enter maintenance mode during several scenarios: initial database setup and initialization, database type conversion or upgrades, schema updates or index creation, Firebase infrastructure updates or patches, and configuration changes. When in maintenance mode, all data operations (reads, writes, transactions) are blocked until the maintenance completes. This is a safety mechanism to prevent data conflicts or loss during critical operations.
1. Open the [Firebase Console](https://console.firebase.google.com/)2. Navigate to Firestore Database
3. Look for a blue banner or status message at the top indicating maintenance
4. Note any estimated completion time provided by Google
If you see an active maintenance message, your database is legitimately under maintenance and you need to wait.
1. In Firebase Console, go to Firestore Database
2. Check if the database appears in the list with a checkmark status
3. If database appears grayed out or shows "initializing", wait for initialization to complete
4. Refresh the page after 30-60 seconds to check status
A newly created database can take several minutes to fully initialize.
1. Visit [Firebase Status Dashboard](https://status.firebase.google.com/)2. Look for any reported incidents affecting Firestore in your region
3. Check recent status updates and estimated resolution times
4. Subscribe to updates if you want to receive notifications
If there's a reported outage, the issue is on Google's side and requires waiting.
While waiting for maintenance to complete, add client-side retry logic:
import { getFirestore, collection, getDocs } from 'firebase/firestore';
async function getDataWithRetry(maxRetries = 5, initialDelay = 1000) {
const db = getFirestore();
let delay = initialDelay;
for (let attempt = 1; attempt <= maxRetries; attempt++) {
try {
const snapshot = await getDocs(collection(db, 'your-collection'));
return snapshot.docs.map(doc => doc.data());
} catch (error) {
if (error.code === 'service-unavailable' || error.message.includes('maintenance mode')) {
if (attempt === maxRetries) throw error;
console.log(`Maintenance mode detected. Retrying in ${delay}ms... (Attempt ${attempt}/${maxRetries})`);
await new Promise(resolve => setTimeout(resolve, delay));
delay = Math.min(delay * 2, 30000); // Cap at 30 seconds
} else {
throw error;
}
}
}
}
getDataWithRetry()
.then(data => console.log('Success:', data))
.catch(err => console.error('Failed after retries:', err));For web applications, enable offline persistence to serve cached data while maintenance is ongoing:
import { initializeApp } from 'firebase/app';
import { getFirestore, enableIndexedDbPersistence } from 'firebase/firestore';
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
enableIndexedDbPersistence(db)
.catch((err) => {
if (err.code === 'failed-precondition') {
console.log('Multiple tabs open, persistence can only be enabled in one tab');
} else if (err.code === 'unimplemented') {
console.log('Current browser does not support persistence');
}
});This allows your app to read cached data from previous successful queries even during maintenance.
Firebase maintenance typically completes within hours. You should:
1. Do NOT attempt to modify database rules or settings during maintenance
2. Do NOT delete or recreate the database
3. Monitor the Firebase Console periodically for status updates
4. Check Firebase Status Dashboard for incident resolution
5. Keep your app running with retry logic enabled
Your data is safe during maintenance - no loss occurs. Normal operations will resume once maintenance completes.
Multiple Databases: Each Firebase project can have multiple Firestore databases. If one database is in maintenance, others in the same project may still be accessible. You can temporarily route traffic to an alternate database if available.
Datastore vs Native Mode: If you see "Cloud Firestore in Datastore mode suddenly appeared" in your console, this indicates a database mode conversion. During conversion to Native mode, the database enters maintenance until the operation completes. Allow 15-30 minutes for this process.
Offline-First Architecture: For critical applications, implement an offline-first architecture using IndexedDB (web) or local storage (mobile) to gracefully handle extended maintenance windows. Sync with Firestore once maintenance completes.
Regional Considerations: Firestore maintenance windows may be scheduled regionally. Check if maintenance is affecting only your database's region or the entire service.
No API to Check Maintenance Status: Currently, Firebase does not provide an API endpoint to programmatically check if a database is in maintenance mode. The status is visible only in the Firebase Console and requires manual checking.
messaging/UNSPECIFIED_ERROR: No additional information available
How to fix "messaging/UNSPECIFIED_ERROR: No additional information available" in Firebase Cloud Messaging
App Check: reCAPTCHA Score Too Low
App Check reCAPTCHA Score Too Low
storage/invalid-url: Invalid URL format for Cloud Storage reference
How to fix invalid URL format in Firebase Cloud Storage
auth/missing-uid: User ID identifier required
How to fix "auth/missing-uid: User ID identifier required" in Firebase
auth/invalid-argument: Invalid parameter passed to method
How to fix "auth/invalid-argument: Invalid parameter passed to method" in Firebase