Open ckdiak opened 1 month ago
What version of @chainsafe/libp2p-gossipsub
are you using?
Orbitdb doesn't appear to be compatible with @chainsafe/libp2p-gossipsub
14. Specifying ^13.0.0
may resolve your issue.
EDIT: I suspect I may have actually run into a different issue than you, fwiw.
Could you please share your libp2p configuration? The error suggests that nothing has been configured for pubsub hence the "undefined" error.
I'm minding my own business, sitting here and bumping versions.
The issue occurs as well when upgrading to helia 5.0 and OrbitDB 2.4.3
{
addresses: {
listen: ['/ip4/127.0.0.1/tcp/0/ws'],
},
transports: [
webSockets({
filter: all,
}),
],
connectionEncryption: [noise()],
streamMuxers: [yamux()],
connectionGater: {
denyDialMultiaddr: () => true,
},
services: {
identify: identify(),
pubsub: gossipsub({ allowPublishToZeroTopicPeers: true }),
},
},
Edit:
Last Edit:
@orbitdb/core
admin@Air-von-Admin src % node index.js file:///Users/admin/Projects/Tryvilni/node_modules/@orbitdb/core/src/sync.js:274 pubsub.addEventListener('subscription-change', handlePeerSubscribed)
TypeError: Cannot read properties of undefined (reading 'addEventListener')
The error suggests you don't have any pubsub configuration, hence pubsub is undefined.
I'm minding my own business, sitting here and bumping versions.
The issue occurs as well when upgrading to helia 5.0 and OrbitDB 2.4.3
{ addresses: { listen: ['/ip4/127.0.0.1/tcp/0/ws'], }, transports: [ webSockets({ filter: all, }), ], connectionEncryption: [noise()], streamMuxers: [yamux()], connectionGater: { denyDialMultiaddr: () => true, }, services: { identify: identify(), pubsub: gossipsub({ allowPublishToZeroTopicPeers: true }), }, },
Edit:
* Previous OrbitDB was 2.2.0, Helia 4.2.3, Libp2p 1.6.1 * New: 2.4.3, 5.1.0 2.2.2 * In this configuration downgrading gossip did not help either. * Further investigation hints at libp2p encryption / signature configuration. * Even the helia default createHelia() doesn't work for me.
Last Edit:
* In my case i run a monorepo with multiple packages. A few of them depend upon `@orbitdb/core` * I checked functionality in the middle of updating package by package. * Therefore at some point I was using OrbitDB 2.2.0 and 2.4.3 at the same time.
Are you able to provide a way to reproduce the problem?
I always get this error when I try to use OrbitDB:
This is my code⬇️, but I also get this error when I try to run oribtdb getting started index.js code. What to do?