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
Unable to connect to locally running Firestore emulator
Preferred solution
Would like to use the connectFirestoreEmulator method from firebase/firestore to connect to an emulator either at localhost or through a reverse proxy. Note that reverse proxy requires the initializeFirestore(app, { host }); method because connectFirestoreEmulator requires a port.
Alternative options
I did try to use the Firebase SDK methods to connect to the emulator but I can see the network requests still routing through the live Firestore url.
Additional context
I started writing a PR for this but an issue, as mentioned above, is that the connectFirestoreEmulator does not allow for host-only, making reverse proxy unusable. In that case, using initializeFirestore(app, { host }); instead works.
Here's the method for web.ts in capacitor-firebase/firestore, but I'm unsure whether initializeFirestore here is going to cause issues:
Plugin(s)
Current problem
Unable to connect to locally running Firestore emulator
Preferred solution
Would like to use the
connectFirestoreEmulator
method fromfirebase/firestore
to connect to an emulator either at localhost or through a reverse proxy. Note that reverse proxy requires theinitializeFirestore(app, { host });
method becauseconnectFirestoreEmulator
requires a port.Alternative options
I did try to use the Firebase SDK methods to connect to the emulator but I can see the network requests still routing through the live Firestore url.
Additional context
I started writing a PR for this but an issue, as mentioned above, is that the
connectFirestoreEmulator
does not allow for host-only, making reverse proxy unusable. In that case, usinginitializeFirestore(app, { host });
instead works.Here's the method for
web.ts
incapacitor-firebase/firestore
, but I'm unsure whetherinitializeFirestore
here is going to cause issues:I have not looked at the native code to see what might need to be changed there.
Before submitting
The text was updated successfully, but these errors were encountered: