Closed mbeckenbach closed 2 years ago
Have you installed pouchdb-adapter-memory as a dependency?
It's hard for me to guess what's going wrong since I'm not familiar with Angular (not since a much earlier version). It might be that your compilation process doesn't know what to do with pouchdb-adapter-memory's implementation. It was last modified around 2017 so it might reflect some older conventions that cause more recent tools to choke. If you can isolate a bug, I'd be happy to file the issue and follow up on it.
Furthermore, I've detected some bugs in this E2E approach using ComDB that I am still working to resolve. I'm glad you find this library useful, but be warned it is still rather experimental.
Hi @garbados ! Curious what the status on this is and if you have any plans to tinker with it any further? I wasn't able to get any of the encryption/reload recipes to work.
var PASSWORD = "blahzeblaht";
const db = new PouchDB("local");
db.setPassword(PASSWORD).then(async () => {
await db.loadEncrypted();
});
I then execute:
await db.post({name: 'bob'})
and that works ok.
then
await db.allDocs({include_docs: true})
returns the expected results. However, when I reload the page, I get this error:
If I try the same experiment but with adapter='memory' (after destroying all the databases),
// db already exists, we are just adding encryption
var PASSWORD = "blahzeblaht";
const db = new PouchDB("local3", {adapter: "memory"});
db.setPassword(PASSWORD).then(async () => {
await db.loadEncrypted();
});
I get
I tried tinkering with the source code a little bit but didn't get anywhere. Curious if you had any insight.
Hi @jjtolton ! I'll look into your issue and see if I can't reproduce it. But yeah, my open source contributions outside of work are pretty limited these days.
If it needs to be a paid thing to help move this along let me know. Setup a GitHub sponsors page or send me an email @.***! Happy to contribute.
On Mon, Mar 21, 2022 at 2:54 PM Diana Thayer @.***> wrote:
Hi @jjtolton https://github.com/jjtolton ! I'll look into your issue and see if I can't reproduce it. But yeah, my open source contributions outside of work are pretty limited these days.
— Reply to this email directly, view it on GitHub https://github.com/garbados/comdb/issues/13#issuecomment-1074289487, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPJX45AORD6ON3W4TGCJ6DVBDAVVANCNFSM437ROZ3Q . You are receiving this because you were mentioned.Message ID: @.***>
@garbados sorry, my email is my github name at gmail
Hi @jjtolton ! I'm in the process of setting up a GitHub Sponsors account. In the meantime, I'm taking a look at this today.
Thanks so much! Looking forward to testing, this is a great project.
On Sun, Apr 24, 2022 at 1:49 PM Diana Thayer @.***> wrote:
Hi @jjtolton https://github.com/jjtolton ! I'm in the process of setting up a GitHub Sponsors account. In the meantime, I'm taking a look at this today.
— Reply to this email directly, view it on GitHub https://github.com/garbados/comdb/issues/13#issuecomment-1107887087, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPJX442MEGWYF6DVOZU7KTVGWCRDANCNFSM437ROZ3Q . You are receiving this because you were mentioned.Message ID: @.***>
OK. I'm able to reproduce the bug. It seems the document revision isn't being appropriately tied back to a document after its creation if it was created with post()
. I have a fix locally and I'm writing a test to verify.
Hi,
tanks for this awesome lib!
I am trying to get the e2e encryption working in an angular 10 app. Just like you showed it here: https://github.com/garbados/comdb/issues/4
But i have trouble with the pouchdb-adapter-memory.
When I import it as this:
I get this at app start:
import PouchMemory from 'pouchdb/dist/pouchdb.memory';
memory adapter plugin error: Cannot find global "PouchDB" object! Did you remember to include pouchdb.js? core.js:6210 ERROR Error: Invalid plugin: got "[object Object]", expected an object or a function