Getting following error on iOS Couchbase lite

Hi There, i am getting following error. can you please help me?

You need to provide more information. What is your code trying to do? What version of Couchbase Lite are you using?

It has to do with the way you have stored your credentials in URLCredentialStore . So double check how you have saved your credentials - assuming you are using this …specifically the protectionSpace value.

No i am not using URLCredentialStorage and i am not storing any credentials also. i am getting this issue when i do replication.

The replicator uses that under the hood when you set up authentication. Please provide details that were requested earlier

  • What version of Couchbase Lite
  • Version of iOS & device
  • Your replicator setup code

I am using following versions
couchbase-server-community_5.0.1-ubuntu16.04_amd64
couchbase-sync-gateway-community_1.5.1_x86_64
couchbase-lie 2.0

iOS version 11.0+

let syncURL: URL = URL(string: Constants.kBaseURL)!
        pull  = setupReplication(Constants.appDeleRef.database.createPullReplication(syncURL))
        push  = setupReplication(Constants.appDeleRef.database.createPushReplication(syncURL))
        pull.continuous = true
        push.continuous = true
        pull.start()
        push.start()

Can you please answer to this question. still im getting above metiond errors.

While I don’t know if this is the source of issue, I noticed that you are creating separate replicators for push and pull. You don’t need to do that in 2.0. and I don’t know what your “setupReplication” method does.

Anyway, here is an example of how you’d setup push and pull replication.

  let config = ReplicatorConfiguration.init(database: db, target: URLEndpoint.init(url:dbUrl))
    
        config.replicatorType = .pushAndPull
        config.continuous =  true
        config.authenticator =  BasicAuthenticator(username: user, password: password)
      
        _pushPullRepl = Replicator.init(config: config)
        
        _pushPullReplListener = _pushPullRepl?.addChangeListener({ [weak self] (change) in
            let s = change.status
            print("PushPull Replicator: \(s.progress.completed)/\(s.progress.total), error: \(String(describing: s.error)), activity = \(s.activity)")
          
        })
        
        
        _pushPullRepl?.start()

Thanks for reply. Your code syntax look like in couch base mobile lite 2.0 SDK But still i am using old version like around 1.0.x because it is an old application and installed on new couchbase server 5.0.1 and sync gateway 2.0.

So that i am getting above error i guess. Is it good to use like this old couch base mobile lite SDK with new couch base server and sync gateway.

I tried to convert to new syntax. i am getting lots of error. By the way, i didn’t find the CBLModel equalent class in couchbase mobile lite 2.0 SDK.

Can you please assist any class for CBLModel in new SDK?

Thanks for reply. Your code syntax look like in couch base mobile lite 2.0 SDK But still i am using old version like around 1.0.x because it is an old application and installed on new couchbase server 5.0.1 and sync gateway 2.0.

Well- when you were asked about the platform earlier, this is what you responded with. You said it was "Couchbase Lite 2.0 " and hence I provided you with corresponding code snippet for that platform.

You can use 1.x version of CBL with SGW 2.0 but I would recommend if possible, moving to the latest CBL 2.0 because that’s the version on which there will be active development on going forward. Also there are a tonne of new features in 2.0.

By the way, i didn’t find the CBLModel equalent class in couchbase mobile lite 2.0 SDK.

There is no CBLModel equivalent in 2.0. You can use the sample tutorials to get started .

Thanks for a prompt reply. Sorry, That was my mistake about misguiding you about couchbase mobile lite version.

Yes, I will convert to Couchbase lite asap.