-
Notifications
You must be signed in to change notification settings - Fork 1.2k
UpgradeError Dexie specification of currently installed DB version is missing #528
Comments
Ok, got somewhere with this. Apparently this happens when the daemon is not initialized "correctly". If I init with the following, it works fine: const Ipfs = require('exports?Ipfs!ipfs/dist/index.js')
const IPFSRepo = require('ipfs-repo')
const idb = window.indexedDB ||
window.mozIndexedDB ||
window.webkitIndexedDB ||
window.msIndexedDB
const store = require('idb-pull-blob-store')
const repo = new IPFSRepo('/tmp/hello-world', { stores: store })
const ipfs = new Ipfs(repo)
ipfs.init({ emptyRepo: true, bits: 512 }, (err) => {
console.log("Daemon ready")
}) The question is, @diasdavid and @dignifiedquire, is this the intended API and usage for the startup sequence? There's a lot there that the user has to know / setup and imo can be improved a lot to make it easier an more intuitive to use. If not, can you fill us all in on the plan forwards? |
This hasn't changed since April or May, you have to |
So, are you saying this is intended final design for getting a daemon in js-ipfs and as far as you plan, there are no changes coming? |
@haadcode ah, not that, what was was trying to convey is that the code you had written for orbit with js-ipfs in June, should still apply when it comes to spawning a daemon, that is all. We need to improve that. I want to have just a function call with an options object {online: bool}. In another news, just got the exact error, without touching master, on js-ipfs-bitswap
|
@haadcode found the problem. tl;dr; Dixie (the wrapper used in idb-pull-blob-store) doesn't like anymore that we create instances with the same key. It is a 'feature' that is enforced in order to promote migrations to happen (more here dexie/Dexie.js#156) A way to solve it, is just to add a bit of randomness to the repo path. However, this is not ideal, as users of IPFS apps will come to a default path. Checking if we can override that. https://github.com/dfahlander/Dexie.js/wiki/Dexie @dignifiedquire any special benefit of using Dixie in the first place? idb-pull-blob-store is currently a wrapper of a wrapper of a native API For reference: dexie/Dexie.js#353 |
Another note: I noticed this on js-ipfs-bitswap tests because they always use the same key for repo, tests in js-ipfs are fine because they already had a bit of randomness |
Haven't seen this problem again. Closing, reopen if necessary |
fix: make pubsub unsubscribe tests work in electron renderer
Hit a blocker while trying to get js-ipfs running with orbit-db.
I initialize the daemon with:
Then run my code through webpack and load in the browser. The following error occurs:
Is my initialization code correct? Is there something else to get a running daemon? I tried to look at the tests but couldn't figure out what to do.
The text was updated successfully, but these errors were encountered: