You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any exceptions with enable persistence raise an uncaught exception, even if you attempt to catch on the Promise.
Steps to reproduce:
Call in two tabs:
firestore.enablePersistence().then(() => {}, () => {})
or firestore.enablePersistence().catch(() => {})
You'll get an uncaught exception RE Firestore persistence already having been initialized.
The exception should have be caught with the Promise's reject argument / catch method and not bubble up further, which raises an uncaught exception. Developers currently need to wrap in a try/catch which isn't great ergo.
jamesdaniels
changed the title
firestore.enablePersistence's promise is not capturing exceptions
firestore.enablePersistence's promise/catch is not catching the exceptions
Mar 30, 2018
jamesdaniels
changed the title
firestore.enablePersistence's promise/catch is not catching the exceptions
firestore.enablePersistence().catch is not catching exceptions
Mar 30, 2018
[REQUIRED] Describe your environment
Any exceptions with enable persistence raise an uncaught exception, even if you attempt to catch on the Promise.
Steps to reproduce:
Call in two tabs:
firestore.enablePersistence().then(() => {}, () => {})
or
firestore.enablePersistence().catch(() => {})
You'll get an uncaught exception RE Firestore persistence already having been initialized.
The exception should have be caught with the Promise's reject argument / catch method and not bubble up further, which raises an uncaught exception. Developers currently need to wrap in a try/catch which isn't great ergo.
This hits us here: https://github.com/angular/angularfire2/blob/e343f137bd0ca9a1d958253b58104c64acbe3944/src/firestore/firestore.ts#L123
The text was updated successfully, but these errors were encountered: