I have an android app that’s running using Couchbase Server version 4.1.0 and Sync Gateway/CBLite both version 1.2.0
After I updated the app to these more recent versions of CB and SG, I had it working briefly. Then I tried to add some authentication by disabling the GUEST user and using the Admin REST API to create a new user and then authenticate by using BasicAuthenticator in the app. This didn’t work the way I expected so I tried to regroup by putting it back the way it was- removing the new user and re-enabling the GUEST user. However, now even with these settings back the way they were when it was working before, the app will not work, it is not recieving any information from Couchbase anymore.
I have tried uninstalling and reinstalling to the state it should have been at right after I updated and it did not work. I am explaining this process mainly for context as it seems like too coincidental for the fact that its not working now to be wholly unrelated to the work I was doing with users and authentication?
This is the error I see in the log when I try to receive data from Couchbase server:
com.couchbase.lite.replicator.PullerInternal@3f7dcd29: Received invalid doc ID from _changes: {seq=1, id=_user/GUEST, changes=[]}
This is what I get when I query the public REST API for information about _changes:
{“results”:[
{“seq”:1,“id”:"_user/GUEST",“changes”:[]}
],
“last_seq”:“1”}
Shouldn’t the “id” here be the id of a couchbase document? Why is it picking up “_user/GUEST” as an id and is there a way to make it stop? To me, that seems like a meta object that shouldn’t be in the changefeed, but I’m not sure. Is there something off in my configuration?
Also, here is the contents of my sync_gateway.json configuation file:
{
“interface”:":4984",
“adminInterface”:":4985",
“log”:[“HTTP+”],
“databases”:{
“phr_production”:{
“server”:“http://localhost:8091”,
“bucket”:“phr_production”,
“sync”:‘function(doc) {channel(doc.channels);}’,
“users”: { “GUEST”: {“disabled”: false, “admin_channels”: ["*"] } }
}
}
}
Additionally, in the sync gateway logs, I get a 404 error when trying to retrieve _local, this may or may not be related, I’m not sure.
2016-04-11T20:05:38.973Z HTTP: #002: GET /phr_production/_local/fbe09fefe5adf317a077e0607c9e493be8c9402e
2016-04-11T20:05:38.973Z HTTP: #002: --> 404 missing (0.5 ms)
2016-04-11T20:05:38.979Z HTTP: #003: GET /phr_production/_local/64a07c9c0aa76109302ad23037a3787f01d4f934
2016-04-11T20:05:38.979Z HTTP: #003: --> 404 missing (0.3 ms)
I’ve looked for similar posts on this topic but they’ve all either ended up being slightly unrelated or didn’t have enough information, so help would be greatly appreciated. Thanks!