couchbaselabs / mobile-training-todo

ToDo List app built with Couchbase Mobile
57 stars 38 forks source link

couchbase issue on ios #176

Open GermanMontejo opened 6 years ago

GermanMontejo commented 6 years ago

There's a new error when I tried testing it on an ios v11 iphone SE. Here's the first one that appears:

CredStore - performQuery - Error copying matching creds. Error=-25300, query={

class = inet;

"m_Limit" = "m_LimitAll";

ptcl = http;

"r_Attributes" = 1;

sdmn = CouchbaseLite;

srvr = localhost;

sync = syna;

}

Then a 404 not found error happens when manager.post_replicate() is called. This is the error:

"withCredentials": true, "_response": "{\"status\":404,\"error\":\"not_found\"}",

Note: I've omitted portions of the error because it's a long json payload.

This wasn't an issue before and I didn't change anything on our source code. I don't know what happened that made this error happen. The credentials I use are still the same. This is where the error happens:

setupReplications(username, password) {
    if (SYNC_ENABLED) {
      const sgUrl = `http://${username}:${password}@${SG_HOST}`;
      return manager.server.post_replicate({ body: { source: sgUrl, target: DB_NAME, continuous: true } })
        .then(res => {
          manager.server.post_replicate({ body: { source: DB_NAME, target: sgUrl, continuous: true } });
          isSuccess = true;
        })
        .catch(e => console.log(e));
    }
  }