Closed martin-ecatch closed 4 weeks ago
I found the issue. There's an extra callback(null) on line 11 in index.ts. This is called without waiting for the database setup. The callback gets called in the correct place in core.ts line 124. I'll prepare a PR (which basically just removing line 11 from index.ts).
Thanks for the PRs!
First of all - this adapter is amazing! Thanks for all the hard work!
The problem I'm facing after upgrading to V4: when reading from a view for the first time, I get an error: Error: [op-sqlite] SQL statement error on opsqlite_execute: no such table: local-store
This happens in only ~5% of the cases, and only on the first read (when PouchDB is building the index for the view). My suspicion is a race condition - the new database for the view (xxxx-mrview-xxxxx) is not ready (the migrations haven't been applied yet).
Any help would be appreciated!