Skip to content

Fail more gracefully when opening IndexedDb fails in Firefox private browsing #5396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 2, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions packages/firestore/src/local/simple_db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,11 @@ export class SimpleDb {
reject(
new FirestoreError(
Code.FAILED_PRECONDITION,
'Unable to open an IndexedDb connection; this may be due to running in a ' +
'Firefox private browsing session, in which IndexedDb is not supported ' +
'(https://goo.gle/3ymSNyf): ' +
error
'Unable to open an IndexedDb connection. This could be due to running in a ' +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The official spelling seems to be IndexedDB.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

'private browsing session on a browser whose private browsing sessions do not ' +
'support IndexedDb. (' +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think you should move the period after the parenthesis or use : without parenthesis.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done (changed to ":").

error +
')'
)
);
} else {
Expand Down