You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project in question is using 11 PouchDBs. Inorder to ensure syncing, all 11 DBs were instantiated (with sync) when the Angular 5 application was loaded/bootstrapped. Since sync did not function (due to the limitations set by browsers) we moved towards socket-pouch as a solution. We disabled sync on all DBs and incorporated socket-pouch sync to only one DB. The socketPouchServer runs on localhost:5000 & the CouchDB is hosted on DigitalOcean.
On running the system,
the following logs are observed in the browser. As you can see, an "aborting" error is being logged.
the code for the same is
importPouchDBfrom'pouchdb';importPouchDBFindfrom'pouchdb-find';importSocketPouchClientfrom'socket-pouch/client';PouchDB.plugin(PouchDBFind);PouchDB.adapter('socket',SocketPouchClient);PouchDB.debug.enable('pouchdb:socket:*');this.dailyMovementDB=newPouchDB(`${username}_${environment.REQUIRED_DB_VERSION_NUMBER}_daily-movement`,{auto_compaction: true});this.dailyMovementDBRemote=newPouchDB({adapter: 'socket',name: `${username}_${environment.REQUIRED_DB_VERSION_NUMBER}_daily-movement`,url: `${environment.REMOTE_COUCH_DB_BASE_URL}`});varsyncHandler=this.dailyMovementDB.replicate.to(this.dailyMovementDBRemote).on('change',function(change){// yo, something changed!console.log('yo, something changed',change);instance.autosaveMessageService.syncingProcessEndedSubject.next(false);}).on('paused',function(info){console.log('replication was paused, usually because of a lost connection',info);// replication was paused, usually because of a lost connectioninstance.autosaveMessageService.syncingProcessEndedSubject.next(true);}).on('active',function(info){// replication was resumedconsole.log('replication was resumed',info);instance.autosaveMessageService.syncingProcessStartedSubject.next();}).on('denied',function(info){// handle completeconsole.log('denied',info);instance.autosaveMessageService.syncingProcessEndedSubject.next(false);}).on('complete',function(info){// handle completeconsole.log('handle complete',info);instance.autosaveMessageService.syncingProcessEndedSubject.next(false);}).on('error',function(err){console.log(err);// instance.createDailyMovementPouchDBs(username);// totally unhandled error (shouldn't happen)});
And the following logs appear on localhost:5000 (socketPouchServer)
the following is the code for the socketPouchServer
The project in question is using 11 PouchDBs. Inorder to ensure syncing, all 11 DBs were instantiated (with sync) when the Angular 5 application was loaded/bootstrapped. Since sync did not function (due to the limitations set by browsers) we moved towards socket-pouch as a solution. We disabled sync on all DBs and incorporated socket-pouch sync to only one DB. The socketPouchServer runs on localhost:5000 & the CouchDB is hosted on DigitalOcean.
On running the system,
the following logs are observed in the browser. As you can see, an "aborting" error is being logged.
the code for the same is
And the following logs appear on localhost:5000 (socketPouchServer)
the following is the code for the socketPouchServer
Please guide how to resolve this issue.
The text was updated successfully, but these errors were encountered: