Hi,
if I update a doc and then try to sync this doc to a remote db - pouchdb throw this exception:
Error: There was a problem getting docs.
at finishBatch (pouchdb-6.1.1.js:13009)
If I create a new doc in an empty db (local and remote) the first sync works well.
Here is the code of my crypto transform (I am using sjcl because it works well on iOS Safari) :
localDB.transform({
incoming: function (doc) {
Object.keys(doc).forEach(function (field) {
if (field !== '_id' && field !== '_rev' && field !== '_revisions' && field !== '_attachments') {
var password = appuser.GetDBPassword();
var fieldValue = sjcl.encrypt(password,angular.toJson(doc[field]));
doc[field] = fieldValue;
}
});
return doc;
},
outgoing: function (doc) {
Object.keys(doc).forEach(function (field) {
if (field !== '_id' && field !== '_rev' && field !== '_revisions' && field !== '_attachments') {
var password = appuser.GetDBPassword();
var fieldValue = angular.fromJson(sjcl.decrypt(password,doc[field]));
doc[field] = fieldValue;
}
});
return doc;
}
});
Hi,
if I update a doc and then try to sync this doc to a remote db - pouchdb throw this exception:
Error: There was a problem getting docs.
at finishBatch (pouchdb-6.1.1.js:13009)
If I create a new doc in an empty db (local and remote) the first sync works well.
Here is the code of my crypto transform (I am using sjcl because it works well on iOS Safari) :