question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Firestore Emulator exports cannot be imported on other platforms

See original GitHub issue

Creating an export of windows and importing it on macOS gives an IO error.

[REQUIRED] Environment info

firebase-tools: 8.4.3

Platform: macOS and Windows

[REQUIRED] Steps to reproduce

  1. Create an export on windows and then import it in mac.

[REQUIRED] Expected behavior

  1. Should be able to run with all the imports.

[REQUIRED] Actual behavior

I get an IO error:

Exception in thread "main" com.google.cloud.datastore.core.exception.DatastoreException: /Users/akshayrajgollahalli/Documents/GitHub/accounting-ui/mock-data/firestore_export/all_namespaces\all_kinds\all_namespaces_all_kinds.export_metadata (No such file or directory)
	at com.google.cloud.datastore.emulator.impl.ExportImportUtil.parseBackupFile(ExportImportUtil.java:312)
	at com.google.cloud.datastore.emulator.impl.ExportImportUtil.fetchEntities(ExportImportUtil.java:60)
	at com.google.cloud.datastore.emulator.firestore.CloudFirestore.main(CloudFirestore.java:89)
Caused by: java.io.FileNotFoundException: /Users/akshayrajgollahalli/Documents/GitHub/accounting-ui/mock-data/firestore_export/all_namespaces\all_kinds\all_namespaces_all_kinds.export_metadata (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:212)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:154)
	at com.google.cloud.datastore.emulator.impl.ExportImportUtil.parseBackupFile(ExportImportUtil.java:308)
	... 2 more

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:19
  • Comments:41 (14 by maintainers)

github_iconTop GitHub Comments

14reactions
HenryVillavicenciocommented, Oct 2, 2020

I follow these steps to achieve import Firestore data from the windows machine on mac.

  1. run firebase emulators:start --import=./mydir --export-on-exit
  2. on firebastore emulator ui create a doc
  3. stop emulator
  4. copy all_namespaces_all_kinds.export_metadata and output-0 from your previous dir to mydir
  5. run firebase emulators:start --import=./mydir --export-on-exit and now you have imported the data 😃
8reactions
sFerreiraDevcommented, Nov 27, 2020

Hey! I just wanted to say that this issue is still happening between Ubuntu (importing) and Windows (exporting). I’m not opening another issue as it was said in this one 2433 to consolidate here, but I’ll leave info to help with the reproduction of it:

[REQUIRED] Environment info

firebase-tools: 8.16.2

Platform: Ubuntu 20.04.1 LTS (importing) and Windows 10 (exporting)

[REQUIRED] Steps to reproduce

Create an export on windows and then import it in Ubuntu.

[REQUIRED] Expected behaviour

Should be able to run with all the imports.

[REQUIRED] Actual behaviour

I get an IO error:

Exception in thread "main" com.google.cloud.datastore.core.exception.DatastoreException: /path/to/project/e2e-testing/emulator_data/minimal_rtdb_populate/firestore_export/all_namespaces\all_kinds\all_namespaces_all_kinds.export_metadata (No such file or directory)
	at com.google.cloud.datastore.emulator.impl.ExportImportUtil.parseBackupFile(ExportImportUtil.java:316)
	at com.google.cloud.datastore.emulator.impl.ExportImportUtil.fetchEntities(ExportImportUtil.java:62)
	at com.google.cloud.datastore.emulator.firestore.CloudFirestore.main(CloudFirestore.java:89)
Caused by: java.io.FileNotFoundException: /home/acro-comp/Dev/acro-companion/e2e-testing/emulator_data/minimal_rtdb_populate/firestore_export/all_namespaces\all_kinds\all_namespaces_all_kinds.export_metadata (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:211)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:153)
	at com.google.cloud.datastore.emulator.impl.ExportImportUtil.parseBackupFile(ExportImportUtil.java:312)
	... 2 more
Read more comments on GitHub >

github_iconTop Results From Across the Web

Export and import data | Firestore - Firebase
Go to the Cloud Firestore Import/Export page in the Google Cloud Platform Console. Go to the Import/Export page. Click Export. Click the Export...
Read more >
How to import data from cloud firestore to the local emulator?
Go to my local Firebase project path. Start the emulators using: firebase emulators:start. Create manually some mockup data using the GUI at ...
Read more >
How to Import Production Data From Cloud Firestore ... - Medium
How to Import Production Data Into the Local Emulator · 1. Login to Firebase and Google Cloud: · 2. See the list of...
Read more >
Exporting and Importing Entities - Datastore - Google Cloud
This page describes how to export and import Firestore in Datastore mode ... Data exported from one Datastore mode database can be imported...
Read more >
Firebase functions cannot find module express
Assuming there are no other libraries, frameworks or custom module loaders ... by importing it in your Dart code The Firebase SDKs for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found