4

I use Firebase emulators with the auth emulator (very happy with this new feature!)
I signup a user using email and password -> I can see it created in the emulator UI.
I insert some data in Firestore -> it works equally well. I export the data:

firebase emulators:export local_data

Later on, I restart the emulators with the exported data:

firebase emulators:start --import=local_data 

The Firestore data is loaded correctly, but the user I created previously does not exist!
It seems that the auth emulator data is not exported or not imported.
Am I doing something wrong?

Edit: this feature has been implemented by Firebase!

With CLI version > 9.1.0 one can export and import auth data from the emulators, cool!
see this Github announcement

Louis Coulet
  • 3,663
  • 1
  • 21
  • 39
  • 1
    If you have a bug report or feature request for the Firebase CLI, you can raise an issue on its GitHub. https://github.com/firebase/firebase-tools – Doug Stevenson Nov 20 '20 at 16:35
  • Done, here is the link to the github issue: https://github.com/firebase/firebase-tools/issues/2846 – Louis Coulet Nov 20 '20 at 20:41

1 Answers1

2

According to the documentation:

emulators:export export_directory

Cloud Firestore or Realtime Database emulator. Export data from a running Cloud Firestore or Realtime Database emulator instance

So the emulators:import and emulators:export commands currently only work on Cloud Firestore and Realtime Database. As Doug commented, it is a valid feature request, so thanks for filing it on the Github repo.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Thank you for the info, I missed that bit. Point aside, working with the emulators is delightful as a user, but isn't it bothering for Firebase dev to port each features to emulators? – Louis Coulet Nov 20 '20 at 21:55
  • Is it work? Yes, it takes significant effort to port/create these. Is it bothering? No, as far as I can see the engineers working on it are having a blast. :) – Frank van Puffelen Nov 20 '20 at 22:01