Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firestore Emulator exports cannot be imported on other platforms #2421

Closed
akshaybabloo opened this issue Jul 3, 2020 · 41 comments · Fixed by #4356
Closed

Firestore Emulator exports cannot be imported on other platforms #2421

akshaybabloo opened this issue Jul 3, 2020 · 41 comments · Fixed by #4356

Comments

@akshaybabloo
Copy link

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
@google-oss-bot
Copy link
Contributor

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@samtstern
Copy link
Contributor

@akshaybabloo thanks for the report! This looks like a bug, we'll have to dig into it.

@yuchenshi
Copy link
Member

Looking at the path printed out: .../firestore_export/all_namespaces\all_kinds\all_namespaces_all_kind..., it contains both forward and backward slashes. Is this an issue with our exports metadata file written by the Firebase CLI? Assigning to @samtstern for further triaging.

@samtstern
Copy link
Contributor

@yuchenshi so I did find one place we have a likely bug in the code:

metadata_file: "firestore_export/firestore_export.overall_export_metadata",

That should use path.join(). But that's actually not the source of the issue. The problem is within the Firestore export we have files like this (excuse the binary):

$ cat data/firestore_export/firestore_export.overall_export_metadata 
�mDN3�"O
M
Aall_namespaces\all_kinds\all_namespaces_all_kinds.export_metadata osamstern@samstern-macbookpro3 tmp.3ZGMX0TU 

The overall export metadata points to a path with \ because the export was made on Windows. When the Firestore Emulator tries to read that next file (all_namespaces\all_kinds\...) it gets the FileNotFoundException.

I'm actually not sure what the best path forward is here, do you know the best practice for handling this kind of thing? Also I have attached a .zip of an export with a single Firestore document made on my Windows PC that you can use for testing.

data.zip

@samtstern samtstern assigned yuchenshi and unassigned samtstern Jul 8, 2020
@yuchenshi
Copy link
Member

I've opened b/160784464 internally to track the work needed in the Firestore Emulator.

@floogulinc
Copy link

It looks like the path in firestore_export/firestore_export.overall_export_metadata could simply always use forward slashes. Windows has no issues using an export from *nix. In our case we simply copied only that file from an export done on Linux to fix our export from Windows to work cross-platform.

@yuchenshi
Copy link
Member

@floogulinc That's a great observation. I'll be mostly likely going down that path when I get more time to work on it.

@HenryVillavicencio
Copy link

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 :)

@sFerreiraDev
Copy link

sFerreiraDev commented 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

@bramosrys
Copy link

Hi!

I can confirm that this is still happening, I cannot read any data exported from Windows into linux (Ubuntu). This is causing me to break my CI flow because some of my team members develops on Windows and the pipeline runs in Linux. I'm considering migrating my pipeline to windows containers.
Here's another stack trace running firebase:exec with --debug flag. Hope it helps with the backslash issue inside the binary metadata.

[2021-01-22T04:11:09.436Z] Exception in thread "main" {"metadata":{"emulator":{"name":"firestore"},"message":"Exception in thread \"main\" "}} [2021-01-22T04:11:09.437Z] com.google.cloud.datastore.core.exception.DatastoreException: /builds/project/firestore-security-rules/firestore_export/all_namespaces\all_kinds\all_namespaces_all_kinds.export_metadata (No such file or directory) {"metadata":{"emulator":{"name":"firestore"},"message":"com.google.cloud.datastore.core.exception.DatastoreException: /builds/project/firestore-security-rules/firestore_export/all_namespaces\\all_kinds\\all_namespaces_all_kinds.export_metadata (No such file or directory)"}} [2021-01-22T04:11:09.438Z] {"metadata":{"emulator":{"name":"firestore"},"message":"\n"}} [2021-01-22T04:11:09.438Z] at com.google.cloud.datastore.emulator.impl.ExportImportUtil.parseBackupFile(ExportImportUtil.java:316) {"metadata":{"emulator":{"name":"firestore"},"message":"\tat com.google.cloud.datastore.emulator.impl.ExportImportUtil.parseBackupFile(ExportImportUtil.java:316)"}} [2021-01-22T04:11:09.439Z] {"metadata":{"emulator":{"name":"firestore"},"message":"\n"}} [2021-01-22T04:11:09.439Z] at com.google.cloud.datastore.emulator.impl.ExportImportUtil.fetchEntities(ExportImportUtil.java:62) {"metadata":{"emulator":{"name":"firestore"},"message":"\tat com.google.cloud.datastore.emulator.impl.ExportImportUtil.fetchEntities(ExportImportUtil.java:62)"}} [2021-01-22T04:11:09.440Z] at com.google.cloud.datastore.emulator.firestore.CloudFirestore.main(CloudFirestore.java:89) Caused by: java.io.FileNotFoundException: /builds/project/firestore-security-rules/firestore_export/all_namespaces\all_kinds\all_namespaces_all_kinds.export_metadata (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at com.google.cloud.datastore.emulator.impl.ExportImportUtil.parseBackupFile(ExportImportUtil.java:312) ... 2 more {"metadata":{"emulator":{"name":"firestore"},"message":"\n\tat com.google.cloud.datastore.emulator.firestore.CloudFirestore.main(CloudFirestore.java:89)\nCaused by: java.io.FileNotFoundException: /builds/project/firestore-security-rules/firestore_export/all_namespaces\\all_kinds\\all_namespaces_all_kinds.export_metadata (No such file or directory)\n\tat java.io.FileInputStream.open0(Native Method)\n\tat java.io.FileInputStream.open(FileInputStream.java:195)\n\tat java.io.FileInputStream.<init>(FileInputStream.java:138)\n\tat com.google.cloud.datastore.emulator.impl.ExportImportUtil.parseBackupFile(ExportImportUtil.java:312)\n\t... 2 more\n"}} ⚠ firestore: Fatal error occurred: Firestore Emulator has exited with code: 1, stopping all running emulators {"metadata":{"emulator":{"name":"firestore"},"message":"Fatal error occurred: \n Firestore Emulator has exited with code: 1, \n stopping all running emulators"}} i firestore: Stopping Firestore Emulator {"metadata":{"emulator":{"name":"firestore"},"message":"Stopping Firestore Emulator"}}

@markgoho
Copy link

markgoho commented Feb 22, 2021

Exception in thread "main" com.google.cloud.datastore.core.exception.DatastoreException: /Users/markgoho/Projects/active-branch-tracker/db/exports/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: /Users/markgoho/Projects/active-branch-tracker/db/exports/firestore_export/all_namespaces\all_kinds\all_namespaces_all_kinds.export_metadata (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at com.google.cloud.datastore.emulator.impl.ExportImportUtil.parseBackupFile(ExportImportUtil.java:312)
	... 2 more

Still happening. @yuchenshi I'm curious why this was tagged a feature request and if that's what has pushed this bug to the bottom of the pile.

@yuchenshi
Copy link
Member

@markgoho Thanks for bring this up. This is still on our roadmap and I've changed the type to bug for clarity. This is indeed a bit involved since it requires work in the Firestore Emulator (non-opensource) and also the CLI, which makes it a bit hard to prioritize. But we're in no way pushing this "to the bottom of the pile", nor do we have policies like fixing bugs strictly before feature requests.

@markgoho
Copy link

thanks @yuchenshi - I'm glad this is being recategorized as a bug and I understand this isn't a simple fix

@riker09
Copy link

riker09 commented Aug 11, 2021

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 :)

Can anyone speak to if this workaround still works? I'm assuming that you perform these steps on a Mac and ./mydir is data that was created on a Windows machine. Which means that step 1 fails because importing WIndows data on a Mac machine leads to the discussed error.

I can confir that I'm still using the workaround on Elementary OS 6 and Pop!_OS 21.04 when my collegues commit that file from their Windows 10 machines.

@krishna-ksharma
Copy link

@riker09 on firebastore emulator ui create a doc , can you please explain bit more about this step ?

@markgoho
Copy link

@krishna-ksharma assuming that means go to localhost:4000, then to firestore and manually add a collection and document via the UI

@krishna-ksharma
Copy link

krishna-ksharma commented Sep 23, 2021

@markgoho Thank you. I guess there is a type firebastore should be firestore.
I tried @riker09 steps but didn't work for me. Please confirm if 1st and 5th steps are same.

@krishna-ksharma
Copy link

This should had to be fixed, can see this discussion started since 2020 and many of us macOs users having the same issue

@riker09
Copy link

riker09 commented Sep 24, 2021

@riker09 on firebastore emulator ui create a doc , can you please explain bit more about this step ?

Sure:

Open a webbrowser of your choice. Go to localhost:4000 and switch to Firestore. Create a new collection and a document within that collection.

Or in other words: @markgoho was right.


EDIT: The typo was originally done by @HenryVillavicencio and I agree. This should have been fixed a while ago.

@krishna-ksharma
Copy link

@yuchenshi Can you please share some update on this ? how long it gonna take ?

@AskYous
Copy link

AskYous commented Nov 27, 2021

@HenryVillavicencio's solution made it work again on my mac.

@dex3r
Copy link

dex3r commented Dec 1, 2021

I just bumped into this issue (windows-macos) and I'm disappointed it got reported over a year ago an still is not fixed :(

@markgoho
Copy link

markgoho commented Dec 1, 2021

@dex3r agreed it is disappointing, but consider the number of people using Firestore, then those using emulators, then those with exports, then those who also switch between different operating systems, and then compare that final number of affected people to the other issues that this team needs to fix that (presumably) affect a much larger group of people

and now consider there is a workaround mentioned here: #2421 (comment)

If this were your team, how would you prioritize this?

@tonybaccccc
Copy link

tonybaccccc commented Dec 6, 2021

I also get this bug importing to gcloud using :
gcloud firestore import

ERROR: (gcloud.firestore.import) Google Cloud Storage file does not exist: /project-id/firestore_export/all_namespaces\all_kinds\all_namespaces_all_kinds.export_metadata
Notice the filepath, back-slashes and forward-slashes.
Since I am importing to gcloud (not emulator), I suppose the workaround above would work using 'gsutil cp -r'

@thechefchen
Copy link

Hey, this is still happening. Scenario is that Windows developers save to this file and Mac developers couldn't import the data.

@thechefchen
Copy link

@dex3r agreed it is disappointing, but consider the number of people using Firestore, then those using emulators, then those with exports, then those who also switch between different operating systems, and then compare that final number of affected people to the other issues that this team needs to fix that (presumably) affect a much larger group of people

and now consider there is a workaround mentioned here: #2421 (comment)

If this were your team, how would you prioritize this?

Agreed. This is killing me and my team. Basically Mac developers cannot write to the emulator DB for windows developers to read. Not to mention Mac developers have to manually copy and paste the latest data.

@yuchenshi can you and your team help prioritize this bug fix?

@bjornallvin
Copy link

bjornallvin commented Mar 24, 2022

Can gladly confirm that taking an export from macos and importing it on windows now work!  Thank you @yuchenshi et al. !! ❤️ 👍 🍾

@yuchenshi
Copy link
Member

Fixed in Firebase CLI v10.5.0.

@oobayly
Copy link

oobayly commented Apr 1, 2022

Fixed in Firebase CLI v10.5.0.

Are you sure about that. I've just updated to 10.5.0, restarted the emulator and then exported on Windows and my firestore_export.overall_export_metadata still contains backslashes. Or is that the Linux firebase-tools are now capabale of transforming those backslashes?

Edit: I've also just noticed that the storage emulator shows a white page when importing the newly exported data. I think it's the same issue as #4322
I've tried manually changing the backslash encoding to forwards slashes (%5C -> %2F) but it makes not difference.

image
image

@yuchenshi
Copy link
Member

@oobayly First of all, we have not changed the export format, but just updated the Firestore emulator so it recognizes slashes from other OSes. This makes it backwards compatible with all the existing export dumps all of you have worked so hard to create in the past.

The Storage Emulator is a separate, unrelated issue. As such, just changing slashes will not help. Please kindly comment on relevant Storage issues such as #4322 or open a new issue with the relevant details.

@oobayly
Copy link

oobayly commented Apr 1, 2022

@oobayly First of all, we have not changed the export format, but just updated the Firestore emulator so it recognizes slashes from other OSes. This makes it backwards compatible with all the existing export dumps all of you have worked so hard to create in the past.

Thanks for that clarification.

@charlesfries
Copy link

Still hitting this error on 10.6.0 (importing on Ubuntu from Windows export)

@yuchenshi
Copy link
Member

@charlesfries Would you mind providing a bit more details like the logs with --debug and what emulators you're using?

Also, it will be great if you can upload a sample export zipball that we can look into. Please make sure it does not contain sensitive information you don't want to share with the public though, or you can reach out privately to Firebase Support.

@charlesfries
Copy link

@yuchenshi Sure thing. Here is a reproduction: https://github.com/charlesfries/firebase-tools-repro-2

firebase-tools 10.6.0
Node 12.22.11
// firebase.json

{
  "firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  },
  "functions": {
    "predeploy": "npm --prefix \"$RESOURCE_DIR\" run build"
  },
  "storage": {
    "rules": "storage.rules"
  },
  "emulators": {
    "auth": {
      "port": 9099
    },
    "functions": {
      "port": 5001
    },
    "firestore": {
      "port": 8080
    },
    "storage": {
      "port": 9199
    },
    "ui": {
      "enabled": true
    }
  }
}
firebase emulators:exec --import=./emulator-data --ui --debug "ember serve"

As stated I'm running the emulators on Ubuntu (GitHub Actions) using a dataset exported from a Windows machine.

Here is the output with --debug:

Output
...

Dev App Server is now running.

 {"metadata":{"emulator":{"name":"firestore"},"message":"If you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run:\n\n   export FIRESTORE_EMULATOR_HOST=localhost:8080\n\nDev App Server is now running.\n\n"}}
i  auth: Importing config from /home/runner/work/staff/staff/emulator-data/auth_export/config.json {"metadata":{"emulator":{"name":"database"},"message":"Importing config from /home/runner/work/staff/staff/emulator-data/auth_export/config.json"}}
i  auth: Importing accounts from /home/runner/work/staff/staff/emulator-data/auth_export/accounts.json {"metadata":{"emulator":{"name":"database"},"message":"Importing accounts from /home/runner/work/staff/staff/emulator-data/auth_export/accounts.json"}}
⚠  It appears you are running in a CI environment. You can avoid downloading the Storage Emulator repeatedly by caching the /home/runner/.cache/firebase/emulators directory. 
i  storage: downloading cloud-storage-rules-runtime-v1.0.2.jar... {"metadata":{"emulator":{"name":"storage"},"message":"downloading cloud-storage-rules-runtime-v1.0.2.jar..."}}
[2022-04-06T16:12:07.772Z] >>> [apiv2][query] GET https://storage.googleapis.com/firebase-preview-drop/emulator/cloud-storage-rules-runtime-v1.0.2.jar 
[2022-04-06T16:12:07.921Z] <<< [apiv2][status] GET https://storage.googleapis.com/firebase-preview-drop/emulator/cloud-storage-rules-runtime-v1.0.2.jar 200
[2022-04-06T16:12:07.[92](https://github.com/trusted-american/staff/runs/5854434680?check_suite_focus=true#step:5:92)1Z] <<< [apiv2][body] GET https://storage.googleapis.com/firebase-preview-drop/emulator/cloud-storage-rules-runtime-v1.0.2.jar [stream]

[2022-04-06T16:12:08.607Z] Ignoring unsupported arg: port {"metadata":{"emulator":{"name":"storage"},"message":"Ignoring unsupported arg: port"}}
[2022-04-06T16:12:09.465Z] Temp file directory for storage emulator: /tmp/firebase/storage/blobs {"metadata":{"emulator":{"name":"storage"},"message":"Temp file directory for storage emulator: /tmp/firebase/storage/blobs"}}
i  emulators: Shutting down emulators. {"metadata":{"emulator":{"name":"hub"},"message":"Shutting down emulators."}}
i  functions: Stopping Functions Emulator {"metadata":{"emulator":{"name":"functions"},"message":"Stopping Functions Emulator"}}
i  firestore: Stopping Firestore Emulator {"metadata":{"emulator":{"name":"firestore"},"message":"Stopping Firestore Emulator"}}
[2022-04-06T16:12:09.474Z] *** shutting down gRPC server since JVM is shutting down {"metadata":{"emulator":{"name":"firestore"},"message":"*** shutting down gRPC server since JVM is shutting down"}}
[2022-04-06T16:12:09.475Z] 
 {"metadata":{"emulator":{"name":"firestore"},"message":"\n"}}
[2022-04-06T16:12:09.481Z] *** server shut down
 {"metadata":{"emulator":{"name":"firestore"},"message":"*** server shut down\n"}}
[2022-04-06T16:12:09.482Z] Apr 06, 2022 4:12:09 PM com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer stop
INFO: Stopping WebSocket server...
 {"metadata":{"emulator":{"name":"firestore"},"message":"Apr 06, 2022 4:12:09 PM com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer stop\nINFO: Stopping WebSocket server...\n"}}
[2022-04-06T16:12:09.497Z] 22 {"metadata":{"emulator":{"name":"firestore"},"message":"22"}}
[2022-04-06T16:12:09.497Z] 0406 16:12:09.481:I 1 [main] [com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer.stop:80] Stopping WebSocket server...
 {"metadata":{"emulator":{"name":"firestore"},"message":"0406 16:12:09.481:I 1 [main] [com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer.stop:80] Stopping WebSocket server...\n"}}
i  auth: Stopping Authentication Emulator {"metadata":{"emulator":{"name":"auth"},"message":"Stopping Authentication Emulator"}}
i  storage: Stopping Storage Emulator {"metadata":{"emulator":{"name":"storage"},"message":"Stopping Storage Emulator"}}
i  hub: Stopping emulator hub {"metadata":{"emulator":{"name":"hub"},"message":"Stopping emulator hub"}}
[2022-04-06T16:12:09.531Z] Error: ENOENT: no such file or directory, scandir '/home/runner/work/staff/staff/emulator-data/storage_export/metadata'
    at readdirSync (fs.js:955:3)
    at StorageLayer.walkDirSync (/home/runner/work/staff/staff/node_modules/firebase-tools/lib/emulator/storage/files.js:359:44)
    at walkDirSync.next (<anonymous>)
    at StorageLayer.import (/home/runner/work/staff/staff/node_modules/firebase-tools/lib/emulator/storage/files.js:338:20)
    at Object.startAll (/home/runner/work/staff/staff/node_modules/firebase-tools/lib/emulator/controller.js:455:48)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Command.emulatorExec [as actionFn] (/home/runner/work/staff/staff/node_modules/firebase-tools/lib/emulator/commandUtils.js:2[93](https://github.com/trusted-american/staff/runs/5854434680?check_suite_focus=true#step:5:93):35)

Error: An unexpected error has occurred.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! staff@1.0.0 test:ember: `firebase emulators:exec --import=./emulator-data --debug "ember test"`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the staff@1.0.0 test:ember script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2022-04-06T16_12_09_822Z-debug.log
ERROR: "test:ember" exited with 2.
npm ERR! Test failed.  See above for more details.
Error: Process completed with exit code 1.

@yuchenshi
Copy link
Member

@charlesfries As we can see from the logs, this is an issue with the Storage emulator, which is a different issue from the OP. As mentioned in the comments above, #4322 tracks the Storage Emulator issue, and please kindly subscribe there and add your repro in the comments.

I'll update the title here to indicate this is tracking Firestore only, and I'd encourage anyone running into import issues to try the debug steps above and decide on the right thread to chime in.

@yuchenshi yuchenshi changed the title firebase exports cannot be imported on other platforms Firestore Emulator exports cannot be imported on other platforms Apr 6, 2022
@charlesfries
Copy link

@yuchenshi That is a separate issue. The issue you're referencing is actually a duplicate of another closed issue (#4326) which I also reproduced and observed being fixed via #4358/v10.6.0. Also that issue occurs at runtime, not when data is being imported during the emulator initialization. I think my current issue is more similar to this one, no?

@yuchenshi
Copy link
Member

@charlesfries There are also two related issues involved in #4326, and see #4322 (comment) about the cross-platform part with a response from a team member mentioning they're working on it. I appreciate your patience while we navigate through the matrix of issues.

Please be mindful that this is quite an active discussion thread with a lot of subscribers and we can really do everyone a favor by keeping the scope of each issue small and contained. As such, we'll lock this thread for now since the original issue has been fixed. If you still experience issues, please don't hesitate to open a new issue with the details and a collaborator will help triage or mark it as a duplicate.

@firebase firebase locked as resolved and limited conversation to collaborators Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.