How to add Firestore emulator support?
See original GitHub issueRight now when trying to connect to locally hosted Firestore emulator from Unity a mysterious exception is thrown:
Firebase.Firestore.FirestoreException :
false for 'get' @ L6
---
at Firebase.Firestore.Internal.Util.FlattenAndThrowException (System.Threading.Tasks.Task completedTask) [0x00016] in Z:\tmp\tmp.DnKB31Zq3X\firebase\firestore\client\unity\proxy\Util.cs:94
at Firebase.Firestore.Internal.Util+<MapResult>c__AnonStorey0`2[T,U].<>m__0 (System.Threading.Tasks.Task`1[TResult] completedTask) [0x00000] in Z:\tmp\tmp.DnKB31Zq3X\firebase\firestore\client\unity\proxy\Util.cs:59
After debugging SDK C# code I found out that error code of 7 (PermissionDenied) is also present.
I use these settings:
Settings.Host = "localhost:8080";
Settings.SslEnabled = false;
Settings.PersistenceEnabled = false;
I desperately need to support Firestore emulator in Unity. I will try to build SDK from source and implement emulator support myself.
How hard will it be? Does CPP SDK support emulator? Is it known where the problem lies?
I looked inside Android/Java Firebase SDK and it does not seem to be doing anything special besides setting port, host, ssl and persistence.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Connect your app to the Cloud Firestore Emulator - Firebase
Connect your app to the Cloud Firestore Emulator · Choose a Firebase project · Instrument your app to talk to the emulators ·...
Read more >Install, configure and integrate Local Emulator Suite - Firebase
On this page · Install the Local Emulator Suite · Configure Emulator Suite. Port configuration · Start up emulators · Export and import...
Read more >Emulate Firestore locally
Run the following command to start the emulator: gcloud emulators firestore start. The emulator prints the host and port number where it is...
Read more >The Full Guide on how to use the Firebase Emulator ...
First, we'll go through the process of installing the emulator and the different APIs we'll use, like, Authentication, Firestore, and Functions. Second, we'll ......
Read more >Firebase Emulator: Firebase Services on Localhost
Setting up Firebase Emulator · 1. Initialise your Firestore · 2. Define your localhost; the host is different for Android and iOS ·...
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 FreeTop 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
Top GitHub Comments
I’ve logged b/202835732 (for Googlers) to see what we can do to improve the error message produced when a Firestore operation is rejected by security rules.
A quick Google search brought me to this post: https://stackoverflow.com/a/62171642/12975006
Could you ensure that your security rules in the emulator are sufficiently permissive to allow the writes?