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
Operating System version: All tested (Win10, OSX El capitain)
Browser version: Latest Chrome 6 Firefox
Firebase SDK version: 7.5.0
Firebase Product: Firestore
Describe the problem
I'm making a PWA app with Ionic 4 (angular) and Firebase Cloud Firestore as database. And it was working fine until just now when i wanted to enable offline persistance. Using AngularFire and the docs is not hard to follow. This is is how i enable it in my app-module.ts
kebarvid
changed the title
Firestore enable: “Error enabling offline persistence. Falling back to persistence disabled”
Firestore enablePersistence(): “Error enabling offline persistence. Falling back to persistence disabled”
Dec 5, 2019
Thanks for reporting this issue, @kebarvid. I was able to encounter the same behavior using your live app. I'm trying to replicate this as well on my end using my new fresh app but wasn't able to replicate it. Can you help me reproduce the error? If you could provide a minimal repro of your app that I can run locally, that would be a great help for us to speed up the investigation. Thanks
@kebarvid It seems like your app has overwritten the process global variable. The error you are getting stems from our check to use mock persistence (source code), because it seems that process is defined, but process.env is not.
I'll add an additional check of process.env !== undefined to the mock persistence check, which should stop the error from appearing, but to successfully enable persistence, you'll have to rename your global process to something else.
You are correct @thebrianchen . To make a database solution i was using earlier to work i did set a global variable called process. When i removed that everything works fine! Thanks for the help!
Describe your environment
Describe the problem
I'm making a PWA app with Ionic 4 (angular) and Firebase Cloud Firestore as database. And it was working fine until just now when i wanted to enable offline persistance. Using AngularFire and the docs is not hard to follow. This is is how i enable it in my app-module.ts
When i run the app i get this warning in Chrome Developer Tools:
and a similar one in Firefox:
Steps to reproduce:
enable it in app.module.ts with:
Relevant Code:
You can se the error live @ https://cubetrainer.nu
The text was updated successfully, but these errors were encountered: