You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: MacOS (but the bug will be present on every platform)
Severity: Medium/High
Description: So while working on Topology ts-drp. I encounter this
/node_modules/.pnpm/@[email protected]/node_modules/@libp2p/websockets/src/listener.ts:347
throw new Error('Listener is not ready yet')
^
Error: Listener is not ready yet
at WebSocketListener.getAddrs (/node_modules/.pnpm/@[email protected]/node_modules/@libp2p/websockets/src/listener.ts:347:13)
at DefaultTransportManager.getAddrs (/node_modules/.pnpm/[email protected]/node_modules/libp2p/src/transport-manager.ts:136:40)
at AddressManager.getAddressesWithMetadata (/node_modules/.pnpm/[email protected]/node_modules/libp2p/src/address-manager/index.ts:358:40)
at AddressManager.getAddresses (/node_modules/.pnpm/[email protected]/node_modules/libp2p/src/address-manager/index.ts:304:29)
at @libp2p/pubsub-peer-discovery._broadcast (/node_modules/.pnpm/@[email protected]/node_modules/@libp2p/pubsub-peer-discovery/src/index.ts:247:44)
at @libp2p/pubsub-peer-discovery.afterStart (/node_modules/.pnpm/@[email protected]/node_modules/@libp2p/pubsub-peer-discovery/src/index.ts:203:5)
at <anonymous> (/node_modules/.pnpm/[email protected]/node_modules/libp2p/src/components.ts:80:6)
at Array.map (<anonymous>)
at Proxy._invokeStartableMethod (/node_modules/.pnpm/[email protected]/node_modules/libp2p/src/components.ts:77:10)
at Proxy.afterStart (/node_modules/.pnpm/[email protected]/node_modules/libp2p/src/components.ts:96:9)
The usage of pubsubdiscovery is broken if you only use the ws transport. As not the pubsub won't be able to call this.addressManager.getAddresses() in the afterStart like it does right now.
The problem is both the late init of the WS server, and the fact that all the after start are called at the same time in components.ts
Hello 👋
Severity: Medium/High
Description: So while working on Topology ts-drp. I encounter this
The usage of pubsubdiscovery is broken if you only use the ws transport. As not the pubsub won't be able to call
this.addressManager.getAddresses()
in the afterStart like it does right now.The problem is both the late init of the WS server, and the fact that all the after start are called at the same time in components.ts
Steps to reproduce the error: Just add this unit test in
packages/transport-websockets/test/node.ts
I've made a fix but I don't fix this is the one you'd want to add in the repo.
So:
What ever solution you'll decide to implement could you please ping me so I can see the way you'll do it 🙏
Nevertheless here's my shot at it: #2903
The text was updated successfully, but these errors were encountered: