The first time the replicator is called everything goes smoothly and everything gets properly synced. The problem happens when I call the replicator once again as the replicator fails to do the replication.
So should I instantiate the repicator everytime I call it or is it acceptable to create an instance and then calling start and stop on demand?
Other problem is in setting the authenticator for the replicator. If I set the syncURL as http://user:pass@example:5984/dbname everything works fine, but trying to use the BasicAuthenticor I get an Object not found exception, and I can't make sense of this exception.
Any thoughts are greatly appreciated
--
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 mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/02b27c12-9301-4354-bd5f-a92756f9795f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Fails as it sometimes crashes..
As for the authentication I am doing exactly as it is shown in the unit testing except I am doing:Authenticator auth = BasicAuthenticator(username, password);I don't think that might be the problem.
I am using Android Studio with gradle build.
Sexta-feira, 13 de Junho de 2014 19:34:55 UTC+1, Traun Leyden escreveu:On Fri, Jun 13, 2014 at 3:42 AM, Joao Ferreira <joao.m.pin...@gmail.com> wrote:
The first time the replicator is called everything goes smoothly and everything gets properly synced. The problem happens when I call the replicator once again as the replicator fails to do the replication.When you say fails, can you be more specific? Also are you sure there is any changes on the remote CouchDB that need to be sync'd? If not, then the replication might not have anything to do.So should I instantiate the repicator everytime I call it or is it acceptable to create an instance and then calling start and stop on demand?There are some known issues with the replicator lifecycle that are still being investigated. See https://github.com/couchbase/couchbase-lite-java-core/issues/224#issuecomment-45616469So it might be safer to instantiate the replicator every time.Other problem is in setting the authenticator for the replicator. If I set the syncURL as http://user:pass@example:5984/dbname everything works fine, but trying to use the BasicAuthenticor I get an Object not found exception, and I can't make sense of this exception.That sounds to me like some sort of packaging problem or maybe a typo in your code.There's a unit test that uses the BasicAuthenticator.How are you building -- Android Studio / Eclipse / gradle ?Any thoughts are greatly appreciated--To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchba...@googlegroups.com.
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/02b27c12-9301-4354-bd5f-a92756f9795f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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 mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/5cbc8cc0-5572-4b45-99b9-c744e4371143%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/090d3852-633b-4ffb-8d05-09d728534a4c%40googlegroups.com.
I am not using CouchBase as server, I am using CouchDB so no sync gateway right? I have read it here at least.
It may be possible that authenticators do not work in couchbase <-> couchDb because of lacking the sync gateway?
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/9a468f65-6c05-46d1-ad8d-5f6c51250a5c%40googlegroups.com.
On Fri, Jun 20, 2014 at 7:54 AM, Joao Ferreira <joao.m.pin...@gmail.com> wrote:
I am not using CouchBase as server, I am using CouchDB so no sync gateway right? I have read it here at least.Yes, that's correct.It may be possible that authenticators do not work in couchbase <-> couchDb because of lacking the sync gateway?
The only auth I've used with CouchDB is Basic Auth by embedding the username/password into the URL. Eg, http://user:password@iriscouch.com/db/
@Joao -- can you try embedding the username and password in the URL and see if it changes the result?That way it works with no problem but I would like to avoid it as much as possible. I supposed the BasicAuthenticator should also work, as it is a similar approach just putting the authentication details in the headers.