-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
FIRESTORE INTERNAL ASSERTION FAILED: Trying to compare documents on fields that don't exist. (expected value1.has_value() && value2.has_value()) #9258
Comments
Thanks for reporting, @sspogra. Based on the info you shared, it seems like there are lots of missing stack traces. To have a better understanding of the issue, could you provide the complete symbolicated stack trace? |
@rizafran We don't have full stack traces in firebase crashlytics. |
We are also seeing the same crashes. Appeared in recent versions of Firestore, this problem did not exist before. |
I have poured over the code and talked with the team and we cannot figure out what could have caused this crash. And without symbolicated stack traces it's nearly impossible to guess what's going wrong. So to help with future debugging, I've improved the error message to include more information (#9305). When you start getting crash reports with this new message, please post the updates here. |
@dconeybe We can get crash reports with this new message without update firebase sdk in app or need to update it? |
You will need to update your app to point to a version of the Firebase SDK that contains the fix. Unfortunately, an official release that contains the fix won't be available for another month. What you could do for now is to manually patch |
ok thanks. I will do that and provide you feedback. |
@sspogra The improvement of the error message has been incorporated into version 8.12.1 of the iOS SDK, released on February 10, 2022. When you get a chance, upgrade your dependency to this new version and provide updated stack traces and error messages. |
Thanks for the update @dconeybe |
Closing as this was fixed in a previous release. |
The issue is NOT fixed. I merely improved the error message to help diagnose the root cause. @sspogra Once you have updated stack traces with the new version, please open a new GitHub issue for it. |
@dconeybe Here is the stack traces with new firebase version 8.12.0.... Fatal Exception: NSInternalInconsistencyException |
Fatal Exception: NSInternalInconsistencyException |
@sspogra Are you able to share the contents of the document |
@sspogra Forget that last comment. The field is |
Hey @sspogra. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @sspogra if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
@sspogra Have you had a chance to test out the fix? I'm anxious to hear if it's fixed for you or if you're still experiencing this crash. |
@dconeybe I will check this only when app release to app store. Our app will be release within 10 days. After that i can provide you feedback. |
Sounds good. Thanks for the update. |
@sspogra Are you still experiencing this crash? |
@dconeybe App still not updated on app store with new firebase version. For now you can close this issue, I will comment here when my app was live on store. |
Hello @dconeybe , On Firebase 8.15.0 crash is still persist, but stack trace changed and here is the new one:
P.S. Perhaps this is a completely new crash not related to the one we are talking about, but after the update, the crash we were talking about disappeared, and this one appeared. From this I concluded that the problem did not go away, just the stack trace changed. |
@igorvoytovich Thanks for the updated stack trace. My guess is that my fix #9550 fixed the original crash, and now it's gotten past the point where it was previously crashing and is now crashing in a different place. Since it's not clear, I'd like to treat it as a new issue. Would you mind opening a new issue with this new stack trace? Even if it's related, it's going to require its own investigation. Also, you mentioned in your older comment (#9258 (comment)) that you were getting "hundreds" of reports of the old crash. Do you still get any reports of the old stack trace after upgrading to 8.15.0? Or are all of your crashes this "new" stack trace since upgrading to 8.15.0? |
Hi @dconeybe , Thanks for your response. The old crash (Trying to compare documents on fields that don't exist.) completely disappeared. Yes, all of our crashes is now with this "new" stack trace. I will open a new issue now. Thank you for your help! |
@igorvoytovich Thanks for the info. That gives a pretty strong indicator that the crash is fixed. I'll wait for @sspogra to reply to see if the crash resolution is confirmed. |
Hey @sspogra. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @sspogra if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
[REQUIRED] Step 1: Describe your environment
CocoaPods
iOS
[REQUIRED] Step 2: Describe the problem
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x9904c __exceptionPreprocess
1 libobjc.A.dylib 0x15f54 objc_exception_throw
2 Foundation 0x130834 -[NSMutableDictionary(NSMutableDictionary) initWithContentsOfFile:]
3 FirebaseFirestore 0x44868 (Missing)
4 FirebaseFirestore 0x44348 (Missing)
5 FirebaseFirestore 0x914b4 (Missing)
6 FirebaseFirestore 0x91554 (Missing)
7 FirebaseFirestore 0xd88a4 (Missing)
8 FirebaseFirestore 0xdf468 (Missing)
9 FirebaseFirestore 0x3b84c (Missing)
10 FirebaseFirestore 0x40650 (Missing)
11 FirebaseFirestore 0x40470 (Missing)
12 FirebaseFirestore 0x38920 (Missing)
13 FirebaseFirestore 0x38528 (Missing)
14 FirebaseFirestore 0x3836c (Missing)
15 FirebaseFirestore 0x121fec (Missing)
16 FirebaseFirestore 0x10bd58 (Missing)
17 FirebaseFirestore 0x10b860 (Missing)
18 FirebaseFirestore 0x68b18 (Missing)
19 FirebaseFirestore 0x5b40 (Missing)
20 FirebaseFirestore 0x1169c0 (Missing)
21 libdispatch.dylib 0x4660 _dispatch_client_callout
22 libdispatch.dylib 0xbde4 _dispatch_lane_serial_drain
23 libdispatch.dylib 0xc958 _dispatch_lane_invoke
24 libdispatch.dylib 0x171a8 _dispatch_workloop_worker_thread
25 libsystem_pthread.dylib 0x10f4 _pthread_wqthread
26 libsystem_pthread.dylib 0xe94 start_wqthread
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x129754 __exceptionPreprocess
1 libobjc.A.dylib 0x287a8 objc_exception_throw
2 CoreFoundation 0x2b3f8 -[CFPrefsSearchListSource addManagedSourceForIdentifier:user:]
3 Foundation 0xd0a6c -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
4 FirebaseFirestore 0x44868 (Missing)
5 FirebaseFirestore 0x44348 (Missing)
6 FirebaseFirestore 0x914b4 (Missing)
7 FirebaseFirestore 0x91554 (Missing)
8 FirebaseFirestore 0xd88a4 (Missing)
9 FirebaseFirestore 0xdf468 (Missing)
10 FirebaseFirestore 0x3b84c (Missing)
11 FirebaseFirestore 0x40650 (Missing)
12 FirebaseFirestore 0x40470 (Missing)
13 FirebaseFirestore 0x38920 (Missing)
14 FirebaseFirestore 0x38528 (Missing)
15 FirebaseFirestore 0x3836c (Missing)
16 FirebaseFirestore 0x121fec (Missing)
17 FirebaseFirestore 0x10bd58 (Missing)
18 FirebaseFirestore 0x10b860 (Missing)
19 FirebaseFirestore 0x68b18 (Missing)
20 FirebaseFirestore 0x5b40 (Missing)
21 FirebaseFirestore 0x1169c0 (Missing)
22 libdispatch.dylib 0x481c _dispatch_client_callout
23 libdispatch.dylib 0xc004 _dispatch_lane_serial_drain
24 libdispatch.dylib 0xcc00 _dispatch_lane_invoke
25 libdispatch.dylib 0x174bc _dispatch_workloop_worker_thread
26 libsystem_pthread.dylib 0x37a4 _pthread_wqthread
27 libsystem_pthread.dylib 0xa74c start_wqthread
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x12a5f0 __exceptionPreprocess
1 libobjc.A.dylib 0x5bcc objc_exception_throw
2 CoreFoundation 0x2d7bc +[_CFXNotificationTokenRegistration keyCallbacks]
3 Foundation 0xd5134 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
4 FirebaseFirestore 0x44868 (Missing)
5 FirebaseFirestore 0x44348 (Missing)
6 FirebaseFirestore 0x914b4 (Missing)
7 FirebaseFirestore 0x91554 (Missing)
8 FirebaseFirestore 0xd88a4 (Missing)
9 FirebaseFirestore 0xdf468 (Missing)
10 FirebaseFirestore 0x3b84c (Missing)
11 FirebaseFirestore 0x40650 (Missing)
12 FirebaseFirestore 0x40470 (Missing)
13 FirebaseFirestore 0x38920 (Missing)
14 FirebaseFirestore 0x38528 (Missing)
15 FirebaseFirestore 0x3836c (Missing)
16 FirebaseFirestore 0x121fec (Missing)
17 FirebaseFirestore 0x10bd58 (Missing)
18 FirebaseFirestore 0x10b860 (Missing)
19 FirebaseFirestore 0x68b18 (Missing)
20 FirebaseFirestore 0x5b40 (Missing)
21 FirebaseFirestore 0x1169c0 (Missing)
22 libdispatch.dylib 0x5b524 _dispatch_client_callout
23 libdispatch.dylib 0x38b3c _dispatch_lane_serial_drain$VARIANT$armv81
24 libdispatch.dylib 0x3954c _dispatch_lane_invoke$VARIANT$armv81
25 libdispatch.dylib 0x4284c _dispatch_workloop_worker_thread
26 libsystem_pthread.dylib 0xbb74 _pthread_wqthread
27 libsystem_pthread.dylib 0xe740 start_wqthread
Steps to reproduce:
Three different crash log added above but all occurred on same condition. Basically crash happened when user update firestore document field value to "nil" while force close the app.
Relevant Code:
let fieldValue:Int? = nil
let updatedMap = ["number_field": fieldValue]
Firestore.firestore().collection("users")
.document(String(120))
.setData(updatedMap as [String : Any], merge: true)
The text was updated successfully, but these errors were encountered: