Skip to content

Conversation

schmidt-sebastian
Copy link
Contributor

Our users are still seeing IndexedDB errors on iOS 13 (using IONIC/Cordova). One of the possible reasons is that some environments might not throw DOMExceptions, which would lead us to not retry. This PR flips our logic around and only skips retries if the underlying exception is a non-Firestore exception.

Fixes #2232

Our users are still seeing IndexedDB errors on iOS 13 (using IONIC/Cordova). One of the possible reasons is that some environments might not throw DOMExceptions, which would lead us to not retry. This PR flips our logic around and only skips retries if the underlying exception is a non-Firestore exception.

Fixes #2232
const retryable =
idempotent &&
isDomException(e) &&
error.name !== 'FirebaseError' &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that the instanceof check doesn't work here since the Async/Await wraps our FirestoreError in a generic Error.

Copy link
Contributor

Choose a reason for hiding this comment

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

This might be worthwhile to add as an actual comment to the code rather than just the PR.

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

Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

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

LGTM

@wilhuff wilhuff assigned schmidt-sebastian and unassigned wilhuff Oct 21, 2019
@schmidt-sebastian schmidt-sebastian merged commit 3264492 into master Oct 22, 2019
@Feiyang1 Feiyang1 added this to the 7.2.2 milestone Oct 29, 2019
@firebase firebase locked and limited conversation to collaborators Nov 21, 2019
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/retries branch February 28, 2020 23:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Firestore: Attempt to get a record without an in-progress transaction

3 participants