[CLOUD_FIRESTORE]: Windows app crashes while tying to get a document #12987
Labels
Needs Attention
This issue needs maintainer attention.
platform: windows
Issues / PRs which are specifically for Windows.
type: bug
Something isn't working
Is there an existing issue for this?
Which plugins are affected?
Database
Which platforms are affected?
Windows
Description
Flutter app using cloud_firestore crashes on some machines when it try to get a document.
After the user sign in, the app try to get his information on a collection.
The app crashes on this get operation.
On Android Studio, we see only "Lost connection with the device".
However, opening on Visual Studio 2022 and running the project, it was possible to see what happens just before the app crash:
ERROR: FIRESTORE INTERNAL ASSERTION FAILED: D:\a\firebase-cpp-sdk\firebase-cpp-sdk\out-sdk\external\src\firestore\Firestore\core\src\core\firestore_client.cc(217) void __cdecl firebase::firestore::core::FirestoreClient::Initialize(const class firebase::firestore::credentials::User &,const class firebase::firestore::api::Settings &): Failed to open DB: Internal: Failed to open LevelDB database at C:\Users\cicer\AppData\Local\firestore\[DEFAULT]\myapp\main: LevelDB error: Corruption: CURRENT points to a non-existent file: NotFound: C:\Users\cicer\AppData\Local\firestore\[DEFAULT]\myapp\main/MANIFEST-000009: The file system cannot find the file specified. (expected created.ok())
And also this one:
Unhandled exception at 0x00007FFE588DCF19 in myapp.exe: Microsoft C++ exception: firebase::firestore::FirestoreInternalError at memory location 0x000000327B9FF0A0.
It seems the local persistence is failing.
I don't know if it matters, but I don't have this "D:" disk on the machine as well:
"D:\a\firebase-cpp-sdk\firebase-cpp-sdk..."
Reproducing the issue
I really do not know how to reproduce it. It happens on some machines only.
However, I hope the log helps to understand what is going on with this operation on Windows.
Firebase Core version
3.1.0
Flutter Version
3.22.2
Relevant Log Output
Flutter dependencies
Expand
Flutter dependencies
snippetAdditional context and comments
I wonder if it is related with the fact of multiple disks on the machine.
It was happening on mine and I had two disks. I have only one now and it does not happen anymore.
The machines where I see it happening had two or more disks as well.
Just a guess.
Another info... I tried running the app as administrator and It worked a few times, but It crashes after some time.
The text was updated successfully, but these errors were encountered: