Com.couchbase.lite.CouchbaseLiteException: read failed: EBADF (Bad file number) + Document.update - java.lang.NullPointerException

Hi @heretyk,

From the following stack trace you provided, it seems Couchbase Lite library failed to read data from InputStream when updating document. Following NullPointerException could be caused by this.

There are two possibilities.

  1. Attachments were not stored correctly when they were stored in the database.
  2. Some reason, loading attachment information failed during document update.

Can you do following tests?

  1. Just after image files were stored in database, these attachments can be accessible? Purpose of this: Make sure if attachments were stored correctly
  2. Check if updating document which is triggered by Button presses could cause same problem. Purpose of this: Identify if BroadcastReceiver could cause this error.

Thanks!
Hideki