I am developing a React Native App for Android using MongoDB Realm and Flexible Sync. When I attempt to delete a record, it is deleted from the data table, but my app crashes with an seemingly un-catchable exception and I see an error in the Logs on the MongoDB side:
integrating changesets failed: retryable error while committing integrated changesets: failed to generate history batches: error retrieving pre-images from state store: error while querying the state collection “state_List”: connection(listcluster-shard-00-02.mewf8.mesh.mongodb.net:30558[-31994]) incomplete read of message header: context canceled (ProtocolErrorCode=201)
I just deleted the app and restarted Metro (0.72.3) and tried to delete a newly created record. This time the app crashed, as usual, but the MongoDB log contained this error:
ending session with error: router encountered error: queue closed (ProtocolErrorCode=201)
I have been beating myself over the head for days on this one, but I believe my code is reasonable and nothing I can think of thus far has worked.
Of note, I can add and modify records at will.
Moreover, I am using addListener on my query in order to refresh the views.
React Native 0.70
MongoDB version 5.0.12
I would really love any suggestions or help and I can share some code if necessary.