[7.2.0] Angular HMR: FirebaseError: Firestore has already been started and persistence can no longer be enabled
See original GitHub issueVersion info
Angular: 13.2
Firebase: 9.6
AngularFire: 7.2
How to reproduce these conditions
Steps to set up and reproduce
- serve Angular project with
ng serve --hmr
- make some change in the application
Debug output
** Errors in the JavaScript console **
FirebaseError: Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.
Expected behavior
No errors.
Actual behavior
Project fails to run with the above error.
Might be related to #2655
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Angular Firestore - This typically indicates that your device ...
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode ......
Read more >angular/fire - npm
The official Angular library for Firebase.. Latest version: 7.5.0, last published: a month ago. Start using @angular/fire in your project by ...
Read more >[7.2.0] Angular HMR: FirebaseError: Firestore has ... - Codesti
[7.2.0] Angular HMR: FirebaseError: Firestore has already been started and persistence can no longer be enabled.
Read more >angular/fire: Versions - Openbase
auth: @angular/fire/auth was Zone wrapping some firebase/auth exports it shouldn't have been; messaging: onMessage 's callback should fire inside the ...
Read more >Changelog - Ionic 5 Full Starter App
If you already started building your app using this template and don't want to re-download all the code, you will need to apply...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So, basically for Firestore error, similar workaround might work:
and functions:
I won’t say I needed to disable hmr.