hoodie: Error: database is destroyed
We have a problem with sign in / sign out / sign in again and the scoped store API. Here is a script to reproduce the bug
hoodie.account.on('signin', function () {
// logs error here
hoodie.store('conversation').findAll().then(console.log, console.log)
})
var username = Math.random().toString(36).substr(2, 5)
hoodie.account.signUp({username: username, password:'test'})
.then(function () {
return hoodie.account.signIn({username: username, password:'test'})
})
.then(function () {
return hoodie.account.signOut()
})
.then(function () {
return hoodie.account.signIn({username: username, password:'test'})
})
.then(function () {
console.log('done')
})
I looked into it but could not yet figure it out. Thanks to @brunopedroso who found the error
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 36 (32 by maintainers)
Commits related to this issue
- test: "database is destroyed" error (hoodiehq/hoodie#612) — committed to hoodiehq/hoodie-store-client by gr2m 8 years ago
I see, I’ll try to dig into this a bit more since it seems like the structure changed a lot since this PR was created