firebase / firebase/firebase-tools

Firestore emulator sometimes fails on data export when stopped

Open
#3,092 101 comments 19 reactions 1 assignee Assigned to @christhompsongoogle View on GitHub
emulator-suite emulators: firestore internal-bug-filed Needs: Attention platform: windows type: bug
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

**Describe your environment:**

* Operating System version: Windows 10
* Browser version: Chrome 88.0.4324.104
* Firebase SDK version: 8.0.0
* Firebase Product: Firestore local emulator

**Problem:**
When I stop my local firestore emulator most of the time it exports the data fine. However sometimes is has an error and it deletes my export files so I lose all my data. Nothing seems to appear in the logs.
I am using:
firebase emulators:start --import=emulator/emulator-export-data --export-on-exit=emulator/emulator-export-data

Then:
Ctrl+C
to stop the emulator.

I get the following in the terminal:

> i emulators: Received SIGINT (Ctrl-C) for the first time. Starting a clean shutdown.
> i emulators: Please wait for a clean shutdown or send the SIGINT (Ctrl-C) signal again to stop right now.
> i Automatically exporting data using --export-on-exit "emulator/emulator-export-data" please wait for the export to finish...
> i Found running emulator hub for project hivepass-dev at http://localhost:4401
> i Deleting directory R:\hivepass\HivePassApp\emulator\emulator-export-data\firestore_export
> i Exporting data to: R:\hivepass\HivePassApp\emulator\emulator-export-data
> ! Export request failed, see emulator logs for more information.
> ! Automatic export to "emulator/emulator-export-data" failed, going to exit now...
> i emulators: Shutting down emulators.
> i ui: Stopping Emulator UI
> ! Emulator UI has exited upon receiving signal: SIGINT
> i hosting: Stopping Hosting Emulator
> i firestore: Stopping Firestore Emulator
> ! Firestore Emulator has exited upon receiving signal: SIGINT
> i auth: Stopping Authentication Emulator
> i hub: Stopping emulator hub
> i logging: Stopping Logging Emulator

There is not much in the firestore-debug.log in the root:

> INFO: Detected non-HTTP/2 connection.
> Jan 28, 2021 12:46:37 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
> INFO: Detected non-HTTP/2 connection.
> Jan 28, 2021 12:46:38 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
> INFO: Detected non-HTTP/2 connection.
> Jan 28, 2021 12:46:38 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
> INFO: Detected non-HTTP/2 connection.
> Jan 28, 2021 12:46:39 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
> INFO: Detected non-HTTP/2 connection.
> Jan 28, 2021 12:46:39 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
> INFO: Detected non-HTTP/2 connection.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.