As mentioned previously I have another app which I created for development 
purposes to source the data for my database and populate my remote 
Couchbase Server. Experiencing with this app has uncovered a couple of 
things.

This app happily performs a push sync with the remote Couchbase Server on 
AWS. However, if I perform a flush of the relevant bucket and then run the 
app, the push sync fails with the following:

2014-12-06 01:15:28.606 GoGasSync[33802:1682508] Sync is idle.
2014-12-06 01:15:28.606 GoGasSync[33802:1682508] Error syncing: Error 
Domain=CBLHTTP Code=401 "401 unauthorized" UserInfo=0x7fc9ea48c770 
{NSURL=http://ec2-blahblah.us-west-2.compute.amazonaws.com:4984/gogas/_local/1ab6816c4ecbf74479205114371b77f5da567bfa,
 
NSLocalizedFailureReason=unauthorized, NSLocalizedDescription=401 
unauthorized}

The reason it fails is because the flush deletes *ALL* documents from the 
bucket, including the three Sync Gateway-related documents which are added 
to the bucket when Sync Gateway is started (please see screenshot 
attached). This is also why the app runs fine upon stopping and restarting 
the Sync Gateway.

However, my original app is still unable to sync with the remote Couchbase 
Server on AWS:

2014-12-06 01:29:04.650 GoGas[33874:1688042] Inside 
pushReplicationProgress:]
2014-12-06 01:29:04.650 GoGas[33874:1688042] self.push is NOT nil
2014-12-06 01:29:04.651 GoGas[33874:1688042] Push sync progress: 0 / 0
2014-12-06 01:29:04.651 GoGas[33874:1688042] Push sync is idle.
01:29:05.999‖  WARNING*** : JSON error parsing _changes feed: parse error: 
client cancelled parse via callback return value

01:29:06.001‖  WARNING*** : CBLSocketChangeTracker[0x7fea7c8c0000 gogas]: 
Can't connect, giving up: Error Domain=CBLChangeTracker Code=587 "The 
operation couldn’t be completed. (CBLChangeTracker error 587.)"
2014-12-06 01:29:06.115 GoGas[33874:1688042] Inside replicationProgress:]
2014-12-06 01:29:06.115 GoGas[33874:1688042] Inside 
pullReplicationProgress:]
2014-12-06 01:29:06.116 GoGas[33874:1688042] self.pull is NOT nil
2014-12-06 01:29:06.116 GoGas[33874:1688042] Pull sync progress: 0 / 0
2014-12-06 01:29:06.116 GoGas[33874:1688042] Pull sync is idle.
2014-12-06 01:29:06.116 GoGas[33874:1688042] Pull sync error: Error 
Domain=CBLChangeTracker Code=587 "The operation couldn’t be completed. 
(CBLChangeTracker error 587.)"
2014-12-06 01:29:06.116 GoGas[33874:1688042] Inside 
pushReplicationProgress:]
2014-12-06 01:29:06.116 GoGas[33874:1688042] self.push is NOT nil
2014-12-06 01:29:06.122 GoGas[33874:1688042] Push sync progress: 0 / 0
2014-12-06 01:29:06.122 GoGas[33874:1688042] Push sync is idle.


On Wednesday, 3 December 2014 01:09:28 UTC+13, Steve wrote:
>
> I have another app which I created for development purposes to source the 
> data for my database and populate my remote Couchbase Server. This app now 
> fails to populate the remote database on AWS:
>
> 2014-12-03 01:04:20.466 GoGasSync[31141:1581097] Error syncing: Error 
> Domain=CBLHTTP Code=401 "401 unauthorized" UserInfo=0x7fdcb1516400 {NSURL=
> http://ec2-54-148-103-232.us-west-2.compute.amazonaws.com:4984/gogas/_local/94408eca1b65df2d376060eba75abb555b765c62,
>  
> NSLocalizedFailureReason=unauthorized, NSLocalizedDescription=401 
> unauthorized}
>
> This seems to me to be a AWS problem rather than a Couchbase/Sync Gateway 
> problem.
>
>
> On Friday, 28 November 2014 14:15:38 UTC+13, Steve wrote:
>>
>> Couchbase Lite is failing to sync with the following error:
>>
>> 2014-11-28 14:06:50.537 GoGas[26614:1110004] self.push is NOT nil
>> 2014-11-28 14:06:50.537 GoGas[26614:1110004] Push sync progress: 0 / 0
>> 2014-11-28 14:06:50.538 GoGas[26614:1110004] Push sync is idle.
>> 14:06:50.982‖  WARNING*** : JSON error parsing _changes feed: parse 
>> error: client cancelled parse via callback return value
>>
>> 14:06:50.985‖  WARNING*** : CBLSocketChangeTracker[0x7f8c1265b790 gogas]: 
>> Can't connect, giving up: Error Domain=CBLChangeTracker Code=587 "The 
>> operation couldn’t be completed. (CBLChangeTracker error 587.)"
>>
>> I have tried restarted the Sync Gateway and Couchbase Server (running on 
>> AWS), this did not help. Any ideas what might cause this, what I should be 
>> checking in my app?
>>
>> Version of Sync Gateway:
>>
>> 01:06:18.554680 ==== Couchbase Sync Gateway/1.0.3(81;fa9a6e7) ====
>>
>
<https://lh5.googleusercontent.com/-JX3PjipiPro/VIGjWu95vmI/AAAAAAAAEY8/-9yuFSX3I5E/s1600/Screen%2BShot%2B2014-12-06%2Bat%2B1.20.05%2Bam.png>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/cf81c275-d0eb-43b2-b082-b6df325bab63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to