Issues with pulling and attachments

I am seeing a problem with deferring download of attachments, using… Couchbase Lite 1.2.1 on iOS 9.3.

Here is the usage pattern that is causing problems…

  1. pull is configured to continuous, with downloadAttachments = YES on the initial device

  2. push some object with attachments (push is not continuous and only pushes specific document ids)

  3. on another device with a clean install sync with downloadAttachments = NO - all works as expected

  4. on the original device, push some changes to the original docs but don’t change the attachments

  5. on another device (clean install) sync with downloadAttachments = NO At the point the documents are syncing every attachment is reported with a warning like this:

       WARNING: CBLRestPuller[xxx]: Revision {7FEE076A-A352-405C-92A6-16EB02660BC2 #42-2442fd344ce094b73d1f31e2021972e8} has invalid attachment metadata: {
     object =     {
         "content_type" = "application/octet-stream";
         digest = "sha1-kKXJn9tODWUDIk9umfgdMdeZMDg=";
         length = 8075;
         revpos = 30;
         stub = 1;
     thumnbail =     {
         "content_type" = "image/png";
         digest = "sha1-kCrJcgLO3UyZ79CFW/yinHJ2lcM=";
         length = 1928;
         revpos = 30;
         stub = 1;

If instead the device is run with a clean install and downloadAttachments = YES then it works.

Does this sound like a known issue?

Not a known issue; please file it in Github. Thanks!

Also, if you have a chance, try this with the 1.3 developer preview. There were some changes to attachment replication, so it’s possible this bug went away…

Filed as

I plan to try 1.3 soon, I will let you know if it is still an issue.