yjs / y-indexeddb

IndexedDB database adapter for Yjs
https://docs.yjs.dev/ecosystem/database-provider/y-indexeddb
Other
196 stars 30 forks source link

The specified object store was not found #1

Closed Joeao closed 8 years ago

Joeao commented 8 years ago

Hello there,

Tried using the IndexDB adaptor after using y-memory for some time and this error occurred.

Uncaught NotFoundError: Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found.

Store @ y-indexeddb.es6:9
SmallLookupBuffer @ y.js:2899
Transaction @ y-indexeddb.es6:98
handleTransactions @ y-indexeddb.es6:250
request.onsuccess @ y-indexeddb.es6:279

It is initiated as follows:

Y({
    db: {
        name: 'indexeddb'
    },
    connector: {
        name: 'websockets-client',
        room: 'y-' + ID,
        socket: io,
        type: 'n'
    },
    sourceDir: '/javascripts/Plugins/yjs',
    share: {
        richtext: 'Richtext',
        map: 'Map'
    }
}).then(function (y) {
    doStuff()
});

I checked the repo to see if I should be doing something in preparation but couldn't see anything. Let me know if you require more information.

Chrome 50.0 OSX 10.11.3

dmonad commented 8 years ago

Thanks, well reported.

I'm not able to reproduce this problem. It could be possible that this is somehow tied to having a shared socked connection. Maybe it helps to specify namespace in db like this:

Y({
    db: {
        name: 'indexeddb',
        namespace: 'myIndexeddbDatabase'
    },
    connector: {
        name: 'websockets-client',
        room: 'y-' + ID,
        socket: io,
        type: 'n'
    },
    sourceDir: '/javascripts/Plugins/yjs',
    share: {
        richtext: 'Richtext',
        map: 'Map'
    }
})

If that doesn't help, can you please share your bower.json / package.json?

Joeao commented 8 years ago

My B. I was running yjs 11.0.3, upgrading to 11.0.4 and/or 11.1.0 fixed it.