Hi,
Im trying to do an end to end test of a Flutter app that uses Firestore against the Firestore emulator (using: firebase emulators:start —only firestore) to validate some firestore cloud functions that the app uses.
Even after making the appropriate Firestore.settings updates I am unable to run against the emulator. Instead the app ends up runing in offline mode.
My settings code is:
if (argRunOnEmulator){
_firestore.settings(
host: "localhost:8080",
persistenceEnabled: false,
sslEnabled: false
);
}
There seems to be very limited documentation online on how to get a Flutter app using cloud_firestore configured to run against a firestore emulator.
Questions I have are:
1. Any pointers on docs and tips on how to get the above combo of packages/technologies working would be appreciated.
2. I have already disabled the firebase auth code in the app (there was some video online suggesting that it might interfere with working with the emulator). But I do still call to FirebaseAuth.instance (i.e. create a FirebaseAuth instance) and the project also uses firebase crashlytics, firebase storage and firebase messaging. Other than crashlytics, the rest of the dependencies are not being actively utilized in the code path that I am testing. Do I need to disable those too to get this working?
3. Does the cloud_firestore package have any limitations running against the emulator
4. Are there any changes that I need to make to the GoogleService-Info.plist (iOS) and google-services.json file to get this working?
Thx
Shaiwal