Having an issue completing a Push/Pull to the Sync Gateway (Unity Android Mobile)

My issue in the best i can explain is that when I open my Unity Android app to create a document with a unique id, and push the database into the sync gateway that document is no longer in the sync gateway i.e I have to create the same unique document again when I uninstalled then reinstalled my app, if i just quit the application and then open it the unique document exists (i don’t have to create a new account with that same unique id so to speak). Is that suppose to be?The docCount of the pulled database ends up being 0 not 1 when uninstall then reinstall my app. My laptop is running the sync gateway and i believe Im using the right URI.

Here is my config.json

The Sync Gateway Running on my computer

My Local URI (Unity)

My Push IEnumerator (Unity)

How do you know the document no longer exists on the server? Can you describe exactly what you do?

You do have a pull replication too, right? Otherwise a new copy of the app won’t retrieve any documents from Sync Gateway…

Yes, I pull the databas as well, on Start() and I end up returning a database with no documents. This only happens when I uninstall and reinstall my app. I do exactly this. I create a document with a unique I’d (phone number). Once I create the doc I push the database to the sync gateway. Once I do this I uninstall and reinstall the app. When I start up my app again a pull is made when I pull I return a data base with no documemts. As if my data never made it to the sync gateway at the push.

Check your logs from Sync Gateway to confirm push and pull activity. Remember that as Jens said, you need to have TWO replications to sync gateway for this process to work correctly (a push and a pull). Otherwise, the document will be in sync gateway but never come down to the local database.

How do I check the logs of the sync gateway to confirm activity?

It depends how you installed it. SG itself just writes logs to stderr, i.e. the terminal/shell you ran it from. If it’s been installed as a system service, it’s probably writing to a log file somewhere; look at the docs that came with the package.

By default SG will log all HTTP requests, so you can see the results of the replicator connecting and getting/putting documents.

i found this replication config. Is this one log you are speaking of? I found it in the examples folder my main sync gateway folder. otherwise i cant seem to find a log file anywhere

I can’t seem to find a log file anywhere

You posted some of it in your first post (right below “The Sync Gateway Running on my computer").