Open dereekb opened 2 years ago
This looks related to some other issues we've been seeing, namely where the emulator suite gets killed (SIGKILL) the export doesn't get a chance to complete as intended.
Question: Does this repro reliably or is it intermittent?
It was the first time I'd have firebase-export-metadata.json get "corrupted" like that, but yes I'd agree it is related to SIGKILL coming in and triggering it.
If you overwrite firebase-export-metadata.json to be an empty file then you can reproduce it.
[REQUIRED] Environment info
firebase-tools: 11.14.0
Platform: macOS (w/ Docker Container)
[REQUIRED] Test case
Add an empty firebase-export-metadata.json to the exports directory.
[REQUIRED] Steps to reproduce
At some point during usage, the firebase-export-metadata.json file ended up being blank instead of being valid JSON.
[REQUIRED] Expected behavior
It seems like this file doesn't even always exist, so I'd expect behavior to be that if it cannot be read/is invalid JSON it continues as if nothing is there, or deletes it, or prints a better error.
[REQUIRED] Actual behavior
During startup the emulators crash with no helpful info as to what the cause was.
Terminal:
firebase-debug.log
I eventually figured it out by checking the files in the emulators folder and adding content (just "{}") to
firebase-export-metadata.json
.I didn't have any emulator data that was exported at the time, and imagine it got corrupted potentially due to the unsafe shutdowns seen in #3092.