Skip to content

Firestore Emulator: Invalid Record Exception when importing #9928

@risalfajar

Description

@risalfajar

[REQUIRED] Environment info

firebase-tools: 15.4.0

Platform: macOS

[REQUIRED] Test case

I will attach my emulators-cache:
emulators-cache.zip

[REQUIRED] Steps to reproduce

  1. Initialize a Firebase project with Firestore emulator
  2. Extract the zip above into the root of the project
  3. Run emulators with --import=./emulators-cache
  4. Crash

[REQUIRED] Expected behavior

It's not crash

[REQUIRED] Actual behavior

Feb 16, 2026 8:47:08 PM com.google.cloud.datastore.emulator.firestore.CloudFirestore main
SEVERE: Exiting due to unexpected exception.
com.google.cloud.datastore.core.exception.DatastoreException: Invalid record
	at com.google.cloud.datastore.util.leveldb.LevelDBLogReaderChannel.readPhysicalRecord(LevelDBLogReaderChannel.java:255)
	at com.google.cloud.datastore.util.leveldb.LevelDBLogReaderChannel.readRecord(LevelDBLogReaderChannel.java:93)
	at com.google.cloud.datastore.util.leveldb.LevelDBLogReaderChannel.readString(LevelDBLogReaderChannel.java:72)
	at com.google.cloud.datastore.util.leveldb.ExportImportUtil.parseOverallMetadataFile(ExportImportUtil.java:252)
	at com.google.cloud.datastore.util.leveldb.ExportImportUtil.fetchEntities(ExportImportUtil.java:81)
	at com.google.cloud.datastore.emulator.firestore.CloudFirestore.init(CloudFirestore.java:200)
	at com.google.cloud.datastore.emulator.firestore.CloudFirestore.startLocally(CloudFirestore.java:120)
	at com.google.cloud.datastore.emulator.firestore.CloudFirestore.main(CloudFirestore.java:101)

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/util/LegacySystemExit
	at com.google.cloud.datastore.emulator.firestore.CloudFirestore.main(CloudFirestore.java:106)
Caused by: java.lang.ClassNotFoundException: com.google.common.util.LegacySystemExit
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:490)
	... 1 more

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions