-
Notifications
You must be signed in to change notification settings - Fork 122
Firestore crashes on startup in offline mode while trying to refresh token when it has pending writes #182
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
Comments
It will crash as soon as there is a pending firestore write added while offline and the token is expired. Then it will keep crashing on startup even without further writes added. This makes offline mode for firestore on iOS 100% broken and will continously crash any app using the firestore C++ sdk if you're offline for more then an hour or so. |
Hi Olof-IL, Thank you for reporting this. I'll contact the team about the issue. Shawn |
For reference, firebase/quickstart-unity#872 seems to be the same issue |
I am investigating. Thanks for the great bug report and detailed reproduction steps! |
I have found the root cause and have a fix. The bug is that we cast from a The error code The fix is to instead just use Until this fix is released (which I unfortunately do not have an ETA for) the best workaround that I can think of is to remove the problematic assertion from
with simply
|
Great news! I hope there will be a new public release of the Firebase C++ SDK soon. I've noticed it lags quite a far bit behind the iOS release, using 6.32.2 when iOS is at 7.1.0. And also that the Firestore C++ API can leave alpha status soon... We were hoping to use it in production sometime in early 2021, but maybe that is too optimistic and we should seek other sollutions? Not having to do our own C++ wrappers of the iOS SDK saves us a lot of time though. |
I completely understand your interest in seeing the Firestore C++ SDK graduating from "alpha" status. It will be an exciting day when that happens! Unfortunately, I cannot provide any guidance about when that will be and I am not sure when the next C++ release will be. |
As an update to my previous comment (#182 (comment)) I can confirm that the fix for this bug will be included in the next C++ release; however, I do not have an ETA to provide. I'm going to close this ticket since there are no more actions to be taken on my part. However, if you find that the next release does not fix this issue then please re-open this ticket and we'll investigate. Note to Googlers: b/174146134 is the internal ticket filed for the issue. The fix is cl/344844086. |
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
Steps to reproduce:
Issue is reproduceable with the firestore quickstart testapp, with the steps below:
Repro rate: 100%
I get this error print in console before it crashes:
libc++abi.dylib: terminating with uncaught exception of type firebase::firestore::util::FirestoreInternalError: FIRESTORE INTERNAL ASSERTION FAILED: /Users/olle/Documents/git/quickstart-cpp/firestore/testapp/Pods/FirebaseFirestore/Firestore/core/src/remote/datastore.cc(326) static bool firebase::firestore::remote::Datastore::IsPermanentError(const firebase::firestore::util::Status &): Unknown status code: 19
the IsPermanentError function receives a status code 19, which is 3 higher then the highest error code in the enum, and HARD_FAIL:s
Full log output:
Relevant Code:
Reproducible with firestore quickstart testapp with the steps above, just make sure to update it to build with 6.16.1, update Pods to 6.32.2 and disable "auth->SignOut();" on line 130.
The text was updated successfully, but these errors were encountered: