-
Notifications
You must be signed in to change notification settings - Fork 578
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
AssertionError: INTERNAL ASSERTION FAILED: Encoded field value should not be null. #491
Comments
@daviduzan Thanks for the detailed report! We'll take a look. |
@schmidt-sebastian Can you take a look? Here's an integration test you can use to reproduce:
We seem to be trying to serialize an unresolved ServerTimestamp while serializing the baseMutations for the mutation batch that contains the FieldValue.increment and it's failing... I'm not sure if this is expected or not. |
This is failing because we store an ObjectValue that contains a nested ServerTimestamp in the base PatchMutation: Line 223 in 0c6acd0
However, I can't come up with a clean fix right now. I'll ponder more about this. |
Writing FieldValue.increment(1) together with FieldValue.serverTimestamp() to document while being offline results in a crash the second time:
Caused by: java.lang.AssertionError: INTERNAL ASSERTION FAILED: Encoded field value should not be null.
Steps to reproduce & Relevant Code:
When internet connection is not available:
'''
'''
Stack trace:
java.lang.RuntimeException: Internal error in Firestore (19.0.2).
at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$5(com.google.firebase:firebase-firestore@@19.0.2:379)
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$5.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.AssertionError: INTERNAL ASSERTION FAILED: Encoded field value should not be null.
at com.google.firebase.firestore.util.Assert.fail(com.google.firebase:firebase-firestore@@19.0.2:46)
at com.google.firebase.firestore.util.Assert.hardAssert(com.google.firebase:firebase-firestore@@19.0.2:31)
at com.google.firebase.firestore.remote.RemoteSerializer.encodeValue(com.google.firebase:firebase-firestore@@19.0.2:263)
at com.google.firebase.firestore.remote.RemoteSerializer.encodeMapValue(com.google.firebase:firebase-firestore@@19.0.2:360)
at com.google.firebase.firestore.remote.RemoteSerializer.encodeValue(com.google.firebase:firebase-firestore@@19.0.2:276)
at com.google.firebase.firestore.remote.RemoteSerializer.encodeDocument(com.google.firebase:firebase-firestore@@19.0.2:389)
at com.google.firebase.firestore.remote.RemoteSerializer.encodeMutation(com.google.firebase:firebase-firestore@@19.0.2:436)
at com.google.firebase.firestore.local.LocalSerializer.encodeMutationBatch(com.google.firebase:firebase-firestore@@19.0.2:169)
at com.google.firebase.firestore.local.SQLiteMutationQueue.addMutationBatch(com.google.firebase:firebase-firestore@@19.0.2:188)
at com.google.firebase.firestore.local.LocalStore.lambda$writeLocally$1(com.google.firebase:firebase-firestore@@19.0.2:237)
at com.google.firebase.firestore.local.LocalStore$$Lambda$2.get(Unknown Source:8)
at com.google.firebase.firestore.local.SQLitePersistence.runTransaction(com.google.firebase:firebase-firestore@@19.0.2:200)
at com.google.firebase.firestore.local.LocalStore.writeLocally(com.google.firebase:firebase-firestore@@19.0.2:201)
at com.google.firebase.firestore.core.SyncEngine.writeMutations(com.google.firebase:firebase-firestore@@19.0.2:227)
at com.google.firebase.firestore.core.FirestoreClient.lambda$write$11(com.google.firebase:firebase-firestore@@19.0.2:215)
at com.google.firebase.firestore.core.FirestoreClient$$Lambda$11.run(Unknown Source:6)
at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$4(com.google.firebase:firebase-firestore@@19.0.2:311)
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$4.call(Unknown Source:2)
at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$3(com.google.firebase:firebase-firestore@@19.0.2:287)
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$3.run(Unknown Source:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.firestore.util.AsyncQueue$DelayedStartFactory.run(com.google.firebase:firebase-firestore@@19.0.2:205)
at java.lang.Thread.run(Thread.java:764)
The text was updated successfully, but these errors were encountered: