We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 168b87c commit 8180a2bCopy full SHA for 8180a2b
.changeset/brown-dog-twirl.md
@@ -0,0 +1,5 @@
1
+---
2
+"@firebase/firestore": patch
3
4
+
5
+Improved the error handling when opening IndexedDb fails in a Firefox private browsing session.
packages/firestore/src/local/simple_db.ts
@@ -322,6 +322,16 @@ export class SimpleDb {
322
'data for your app to start fresh.'
323
)
324
);
325
+ } else if (error.name === 'InvalidStateError') {
326
+ reject(
327
+ new FirestoreError(
328
+ Code.FAILED_PRECONDITION,
329
+ 'Unable to open an IndexedDB connection. This could be due to running in a ' +
330
+ 'private browsing session on a browser whose private browsing sessions do not ' +
331
+ 'support IndexedDB: ' +
332
+ error
333
+ )
334
+ );
335
} else {
336
reject(new IndexedDbTransactionError(action, error));
337
}
0 commit comments