js-libp2p
js-libp2p copied to clipboard
Failed using with `datastore-level`
Failed while use with datastore-level.
- Version:
Latest Version
- Platform:
All platform
Severity:
Critical
Description / Steps to reproduce the error:
const Libp2p = require('libp2p')
const TCP = require('libp2p-tcp')
const MPLEX = require('libp2p-mplex')
const { NOISE } = require('libp2p-noise')
const LevelStore = require('datastore-level')
const node = await Libp2p.create({
modules: {
transport: [TCP],
streamMuxer: [MPLEX],
connEncryption: [NOISE]
},
datastore: new LevelStore('path/to/store'),
peerStore: {
persistence: true,
threshold: 5
}
})
await node.start();
Error:
/data/xuxu/Leask/bistrot/node_modules/datastore-level/src/index.js:256
return levelIteratorToIterator(this.db.iterator(iteratorOpts))
^
TypeError: Cannot read property 'iterator' of undefined
at LevelDatastore._query (/data/xuxu/Leask/bistrot/node_modules/datastore-level/src/index.js:256:44)
at LevelDatastore.query (/data/xuxu/Leask/bistrot/node_modules/datastore-level/src/index.js:176:19)
at PersistentPeerStore.start (/data/xuxu/Leask/bistrot/node_modules/libp2p/src/peer-store/persistent/index.js:86:47)
at Libp2p._onStarting (/data/xuxu/Leask/bistrot/node_modules/libp2p/src/index.js:619:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Libp2p.start (/data/xuxu/Leask/bistrot/node_modules/libp2p/src/index.js:363:7)
at async /data/xuxu/Leask/bistrot/rumdev.js:43:5
Hello @Leask Can you let me know what versions you are using of both libp2p and datastore-level?
Libp2p 0.32.4 Datastore-level 6.0.2
That is the latest version I can get.
Thanks!
On Thu, Aug 26, 2021 at 2:19 AM Vasco Santos @.***> wrote:
Hello @Leask https://github.com/Leask Can you let me know what versions you are using of both libp2p and datastore-level?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/libp2p/js-libp2p/issues/970#issuecomment-906127750, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABY4PRAYC72U3ZHYATACNDT6XMFNANCNFSM5C2PYVAA .
--
Sincerely,
Leask Wong http://leaskh.com
@Leask what runtime are you using ? (node? electron?) and what version? Does the issue is still present in the latest version? https://github.com/libp2p/js-libp2p/releases/tag/v0.33.0 (or later)?
latest version node v16. But I switched to another storage lib. I don’t have the original code anymore. It’s easy to reproduce.
On Fri, Oct 15, 2021 at 10:30 AM Marcin Rataj @.***> wrote:
@Leask https://github.com/Leask what runtime are you using ? (node? electron?) and what version?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/libp2p/js-libp2p/issues/970#issuecomment-944348469, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABY4PWIUD2PGA7DMJDQNJ3UHA3HRANCNFSM5C2PYVAA .
--
Sincerely,
Leask Wong http://leaskh.com
Closing due to staleness