Skip to content
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

Pull Sync throws Exception because of updating document with attachment on couchdb #937

Closed
yannyann opened this issue Dec 21, 2017 · 2 comments
Milestone

Comments

@yannyann
Copy link

yannyann commented Dec 21, 2017

Hello,
I found in the replication.

Scenario

  • Create a document on couchbaseLite
  • Sync on couchdb
  • Update this document more that once (ex : twice)
  • Sync back
  • The replication throws an exception

Error

Couchbase.Lite.CouchbaseLiteException: Error during SQLite query
at Couchbase.Lite.Storage.CustomSQLite.SqliteCouchStore.LoadRevisionBody (Couchbase.Lite.Internal.RevisionInternal rev) [0x000af] in C:\Users\yannh\Projects\github\couchbase-lite-net\src\StorageEngines\SQLiteCommon\storage.sqlite.common\src\SqliteCouchStore.cs:1234
at Couchbase.Lite.Database.LoadRevisionBody (Couchbase.Lite.Internal.RevisionInternal rev) [0x00086] in C:\Users\yannh\Projects\github\couchbase-lite-net\src\Couchbase.Lite.Shared\Database.cs:1901
at Couchbase.Lite.Database.GetAttachmentsFromDoc (System.String docId, Couchbase.Lite.Revisions.RevisionID revId) [0x00009] in C:\Users\yannh\Projects\github\couchbase-lite-net\src\Couchbase.Lite.Shared\Database.cs:1832
at Couchbase.Lite.Database.FindAttachment (System.String name, System.Int32 revPos, System.String docId, System.Collections.Generic.IList1[T] ancestry) [0x00024] in C:\Users\yannh\Projects\github\couchbase-lite-net\src\Couchbase.Lite.Shared\Database.cs:1814 at Couchbase.Lite.Database+<>c__DisplayClass176_0.<ProcessAttachmentsForRevision>b__0 (System.String name, System.Collections.Generic.IDictionary2[TKey,TValue] attachInfo) [0x00162] in C:\Users\yannh\Projects\github\couchbase-lite-net\src\Couchbase.Lite.Shared\Database.cs:1757
at Couchbase.Lite.Internal.RevisionInternal.MutateAttachments (System.Func3[T1,T2,TResult] mutator) [0x00057] in C:\Users\yannh\Projects\github\couchbase-lite-net\src\Couchbase.Lite.Shared\Revisions\RevisionInternal.cs:326 at Couchbase.Lite.Database.ProcessAttachmentsForRevision (Couchbase.Lite.Internal.RevisionInternal rev, System.Collections.Generic.IList1[T] ancestry) [0x000aa] in C:\Users\yannh\Projects\github\couchbase-lite-net\src\Couchbase.Lite.Shared\Database.cs:1707
at Couchbase.Lite.Database.ForceInsert (Couchbase.Lite.Internal.RevisionInternal inRev, System.Collections.Generic.IList`1[T] revHistory, System.Uri source) [0x000ef] in C:\Users\yannh\Projects\github\couchbase-lite-net\src\Couchbase.Lite.Shared\Database.cs:1114
at Couchbase.Lite.Replicator.Puller+<>c__DisplayClass32_0.b__0 () [0x000c8] in C:\Users\yannh\Projects\github\couchbase-lite-net\src\Couchbase.Lite.Shared\Replication\Puller.cs:688
[0:] INFO) SYNC (Puller): [15] 2017-12-22 03:27:38.101+01:00 Inserted 1 revs in 45.234 milliseconds
12-22 15:27:38.124 D/Mono ( 1944): GC_BRIDGE waiting for bridge processing to finish

yannyann pushed a commit to yannyann/couchbase-lite-net that referenced this issue Dec 21, 2017
…han sync that a property was changed twice or more, the replication was failing.
@djpongh djpongh added this to the 1.5.0 milestone Jan 5, 2018
@djpongh djpongh added the icebox label Jan 5, 2018
@borrrden borrrden modified the milestones: 1.5.0, 1.4.2 Apr 5, 2018
@borrrden borrrden added backlog and removed icebox labels Apr 5, 2018
@borrrden
Copy link
Member

borrrden commented Apr 5, 2018

This affects more than CouchDB it turns out. There is now another reported instance of this and so it will be scheduled in 1.4.2 instead.

borrrden added a commit that referenced this issue Apr 6, 2018
@borrrden
Copy link
Member

borrrden commented Apr 7, 2018

It also turns out that this PR simply adds something that was already present in iOS and Android. This went into the 1.x branch in the above commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants