Some times When I try to do document.getProperties will return me empty properties map.
This issue happens randomly, if it happens the only solution is to uninstall and reinstall the app to create new document.
Can any one please tell me at what scenarios document.getProperties() will return empty.
When I tried to debug into the android library, I noticed currentRevision = null. If in case currentRevision becomes null document will always return null for all the API calls.
As per the document cuurentRevision becomes null if document is purged, I haven’t implemented any thing which will delete or purge a document.
In Couchbase Lite, the Compaction process happens automatically in the background but it only rids the JSON bodies of non leaf revisions.
Additionally, there is expirationDate (Couchbase Documentation | Couchbase Docs) associated with document. If a document expires, then the doc is purged.
You may want to check the expirationDate of the document.
And is it possible that the document is getting purged at the Sync Gateway/ server side or by some other client.