Sync gateway basic auth No local checkpoint not getting remote one

Sync Replication with Basic Auth is not working.

In sync, a user was added using the following curl command:

curl -X PUT ‘’ -d ‘{“name”: “usernameHere”, “password”: “passwordHere”}’

In the sync config json file, guest is disabled with sync function:
function (doc, oldDoc) {

Then in iOS, Sync trigger is in the AppDelegate with channel.
self.pullData.authenticator = CBLAuthenticator.basicAuthenticator(withName: “usernameHere”, password: “passwordHere”)
self.pull.channels = [“channelName”]

In the database, there’s one document which channel is “channelName”.
I expect to pull this document.
No Pull Error, but nothing is being pulled.

I enabled the following logs:

Relevant responses are:
Successfully logged in!
No local checkpoint; not getting remote one

Kindly help. Thanks!

So, in and of itself, No local checkpoint; not getting remote one isn’t anything to be worried about. It just means that this Couchbase Lite client hasn’t replicated from this this Sync Gateway before, so there’s no checkpoint to start from.

Does your user usernameHere have access to that channel? I can see that you’re requesting only that channel, but if you don’t have access to it you won’t be able to get it.

Thank you for the response @JFlath . How can I make sure that usernameHere have access to a channel? I already tried adding user via curl:
curl -X PUT ‘localhost:4985/sync_gateway/_user/usernameHere’ -d ‘{“name”: “usernameHere”, “password”: “passwordHere”}’

but I can’t still pull.

There’s a couple of ways to grant a user access to a channel:

  • When creating the user (or, I suppose, updating) with the admin_channels property detailed here.
  • By granting access by passing an appropriate document through the sync function and calling access() as detailed here

Creating user with admin_channels worked!! Thanks a lot!