Empty changes feed response

Hey Team,

I am able to access the changes feed, but the changes (results) are empty.

Request:

{{SGURL}}/{{bucket}}/_changes?since=10&include_docs=true&limit=10

Response:

{
  "results": [],
  "last_seq": "10"
}

However, in the database, I can see that the sequence is 11.

“sequence”: 11,

What user are you running the changes feed as? An admin (4985) or user on the public port (4984)?

It’s possible that:

  • The change associated with sequence 11 is a document in a channel the user doesn’t have access to
  • Sequence 11 is associated with a non-document update, like a user update

Can you clarify where you are seeing “sequence”: 11, ?

Hi Ben,
Thank you for the response, I am using the 4984 port

“sequence”: 11 I have seen this in the couch base document I am sharing a screenshot for a better understanding

Which user are you authenticating as? What channels do they have access to? What channels does the document in question belog in?

Ben,

They have custom channels (config), and we have written our sync function.

I have created a user for the sync gateway and followed these steps:

  1. Created App Services
  2. Created App Endpoints
  3. Created App Users
  4. Created an app user

I have not provided Channels or app Role while creating a user.

And the document you’re not seeing on the changes feed, what channel(s)?

I still suspect it’s this case:

Try with port 4985 (or whatever the admin port number is.) If you get more docs, then you know it’s an access-control (channels) issue.

curl -X POST -H "Content-Type: application/json" -d '{"name": {{username}}, "password": {{password}},"admin_channels": ["*"],"all_channels": ["!","*"],"admin_roles": ["admin"],"roles": ["admin"]}' http://localhost:4945/{{bcuket}}/_user/

I used to create sg users with this command, and now how to create users with the same properties.

I meant, try the replication with the admin port, and see whether you get all the docs this time.