Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: subscription fails, no peer available #2211

Open
dbu9 opened this issue Jan 17, 2025 · 3 comments
Open

bug: subscription fails, no peer available #2211

dbu9 opened this issue Jan 17, 2025 · 3 comments
Assignees

Comments

@dbu9
Copy link

dbu9 commented Jan 17, 2025

Here is my code:

import { createLightNode, createEncoder, createDecoder,Protocols } from "@waku/sdk";
import protobuf from "protobufjs";


const sleep = async (ms:number) => new Promise((resolve) => setTimeout(resolve, ms));
async function main() {
	
	const node = await createLightNode({ defaultBootstrap: true });

	await node.start();
	console.log("Node started");
	
	try {
		console.time("ts");
		await node.waitForPeers([Protocols.LightPush, Protocols.Filter], 40000);
		console.timeEnd("ts")
	} catch (e) {
		console.log("Error waiting for remote:" + e);	
	}
	
	if (node.isConnected() === false) {
		console.log("Could not connect");
		return;
	}

	//await sleep(30000);
	const remotePeers = await node.libp2p.peerStore.all();
	const remotePeerIds = remotePeers.map((peer) => peer.id.toString());
	console.log("peer:", node.peerId, "protocols:", node.protocols, ' peers:', remotePeerIds);
	
	const contentTopic = "/light-guide/2/message/proto";
	
	// Create a message encoder and decoder
	const encoder = createEncoder({ contentTopic });
	const decoder = createDecoder(contentTopic);
	const DataPacket = new protobuf.Type("DataPacket")
		.add(new protobuf.Field("timestamp", 1, "uint64"))
		.add(new protobuf.Field("sender", 2, "string"))
		.add(new protobuf.Field("message", 3, "string"));


	const protoMessage = DataPacket.create({
		timestamp: Date.now(),
		sender: "Alice2",
		message: "Hello, World!",
	});
	
	// Serialise the message using Protobuf
	const serialisedMessage = DataPacket.encode(protoMessage).finish();
	
	// Send the message using Light Push
	await node.lightPush.send(encoder, {
		payload: serialisedMessage,
	});
		
	console.log("Sent message");
		
	// Create the callback function
	const callback = (wakuMessage:any) => {
		// Check if there is a payload on the message
		if (!wakuMessage.payload) return;
		// Render the messageObj as desired in your application
		const messageObj = DataPacket.decode(wakuMessage.payload);
		console.log(messageObj);
	};

	// Create a Filter subscription
	const {error, subscription} = await node.filter.subscribe([decoder], callback);


	if (error) {
		// handle errors if happens
		throw Error(error);
	}
	await node.stop();
}
	

main();

The output:

npm start

> waku-client@1.0.0 start
> tsx src/main.ts

Ignore WebSocket connection failures
Waku tries to discover peers and some of them are expected to fail
Node started
ts: 19.996s
peer: PeerId(12D3KooWFJx1eP5QBQPbXTf2DTD8BTqstT6ZfFJLHM8jc1wMziVb) protocols: [
  '/ipfs/id/1.0.0',
  '/ipfs/ping/1.0.0',
  '/vac/waku/filter-push/2.0.0-beta1',
  '/vac/waku/metadata/1.0.0'
]  peers: [
  '16Uiu2HAmDCp8XJ9z1ev18zuv8NHekAsjNyezAvmMfFEJkiharitG',
  '16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W'
]
Sent message
/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/src/main.ts:73
                throw Error(error);
                      ^


Error: No peer available
    at main (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/src/main.ts:73:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.11.0

The entire code:

https://github.com/dbu9/waku-test.git

What do I do incorrectly?

@chair28980 chair28980 added this to Waku Jan 17, 2025
@weboko weboko changed the title help needed: subscription fails, no peer available bug: subscription fails, no peer available Jan 18, 2025
@weboko weboko self-assigned this Jan 18, 2025
@weboko weboko moved this to In Progress in Waku Jan 18, 2025
@dbu9
Copy link
Author

dbu9 commented Jan 20, 2025

Is there exepected resolution time?

@weboko weboko moved this from In Progress to Code Review / QA in Waku Jan 21, 2025
@weboko
Copy link
Collaborator

weboko commented Jan 21, 2025

@dbu9 I managed to repro it under latest version of js-waku but it seems not happening against laters RC version.
Could you, please, help me verify if it sill happens to you with @waku/sdk: 0.0.30-9f1d8ca.0?

If it still happens, could you share logs with process.env.DEBUG = "waku:*";?

Also, it can be due to connection being established but then dropped right before subscription happens in NodeJS - for it we will conduct investigation to see if it happens - #2209 (cc @adklempner )

@weboko weboko added bug Something isn't working and removed bug Something isn't working labels Jan 21, 2025
@dbu9
Copy link
Author

dbu9 commented Jan 22, 2025

Thanks for your fast reponse!

I upgraded the version and it did not help.

I pushed the updated version to https://github.com/waku-org/js-waku.git and updated the README.md with the steps. Here I duplicate the description:

Upgrade version

npm remove @waku/sdk
npm install @waku/sdk@next

After install package.json:

{
  "name": "waku-client",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "type": "module",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "tsx src/main.ts",
    "build": "npx tsc"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@waku/dns-discovery": "^0.0.21",
    "@waku/sdk": "^0.0.30-1c0c5ee.0",
    "protobufjs": "^7.4.0",
    "tsx": "^4.19.2"
  },
  "devDependencies": {
    "@types/node": "^22.10.7",
    "typescript": "^5.7.3"
  }
}

Running without debug:

npm start

> waku-client@1.0.0 start
> tsx src/main.ts

Ignore WebSocket connection failures
Waku tries to discover peers and some of them are expected to fail
Node started
ts: 1.193s
peer: PeerId(12D3KooWSGRJzf9k8kPiYjYZpBLmVuBG5uBSdDBqF2z6RzthjzNH) protocols: [
  '/ipfs/id/1.0.0',
  '/ipfs/ping/1.0.0',
  '/vac/waku/filter-push/2.0.0-beta1',
  '/vac/waku/metadata/1.0.0'
]  peers: [ '16Uiu2HAmNaeL4p3WEYzC9mgXBmBWSgWjPHRvatZTXnp8Jgv3iKsb' ]
Sent message
/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/src/main.ts:73
                throw Error(error);
                      ^


Error: No peer available
    at main (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/src/main.ts:73:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.11.0

Running with debug

DEBUG="waku:*" npm start

Output:

DEBUG="waku:*" npm start

> waku-client@1.0.0 start
> tsx src/main.ts

  waku:info:sdk:create Creating Waku node with pubsub topics [
  '/waku/2/rs/1/0',
  '/waku/2/rs/1/1',
  '/waku/2/rs/1/2',
  '/waku/2/rs/1/3',
  '/waku/2/rs/1/4',
  '/waku/2/rs/1/5',
  '/waku/2/rs/1/6',
  '/waku/2/rs/1/7',
  '/waku/2/rs/1/8'
] +0ms
Ignore WebSocket connection failures
Waku tries to discover peers and some of them are expected to fail
  waku:info:peer-discovery-dns Use following EIP-1459 ENR Tree URLs:  [
  'enrtree://AIRVQ5DDA4FFWLRBCHJWUWOO6X6S4ZTZ5B667LQ6AJU6PEYDLRD5O@sandbox.waku.nodes.status.im',
  'enrtree://AOGYWMBYOUIMOENHXCHILPKY3ZRFEULMFI4DOM442QSZ73TT2A7VI@test.waku.nodes.status.im'
] +0ms
  waku:error:peer-exchange-discovery Error parsing peers from local storage: ReferenceError: localStorage is not defined
    at LocalPeerCacheDiscovery.getPeersFromLocalStorage (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/@waku/sdk/node_modules/@waku/discovery/src/local-peer-cache/index.ts:127:31)
    at LocalPeerCacheDiscovery (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/@waku/sdk/node_modules/@waku/discovery/src/local-peer-cache/index.ts:43:23)
    at <anonymous> (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/@waku/sdk/node_modules/@waku/discovery/src/local-peer-cache/index.ts:162:8)
    at <anonymous> (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/libp2p/src/libp2p.ts:151:74)
    at Array.forEach (<anonymous>)
    at Libp2p (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/libp2p/src/libp2p.ts:150:33)
    at createLibp2p (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/libp2p/src/index.ts:202:16)
    at createLibp2pAndUpdateOptions (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/@waku/sdk/src/create/libp2p.ts:102:18)
    at createLightNode (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/@waku/sdk/src/create/create.ts:15:36)
    at main (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/src/main.ts:8:15) +0ms
  waku:info:peer-discovery-dns Starting peer discovery via dns +7ms
  waku:info:peer-exchange-discovery Starting Local Storage Discovery +0ms
  waku:info:peer-exchange-discovery Discovered 0 peers +0ms
  waku:info:peer-exchange-discovery Starting peer exchange node discovery, discovering peers +0ms
  waku:info:discovery:fetch_nodes got new peer candidate from DNS address=7842c8cb303b6a0504aca97b711b7f0676890599e60def6224d83c383481bc43@8.218.219.107 +0ms
  waku:info:discovery:fetch_nodes got new peer candidate from DNS address=b33fce94a9d9f670a47c0ecf89e3d977e68048c22bb2dffbcc13bea3ef76aacc@178.128.141.171 +836ms
  waku:error:connection-manager Failed to start network listener: TypeError: globalThis.addEventListener is not a function +0ms
  waku:info:sdk:/vac/waku/store-query/3.0.0 Initializing BaseProtocolSDK with numPeersToUse: 1, maintainPeersInterval: 30000ms +0ms
  waku:info:sdk:/vac/waku/store-query/3.0.0 Starting maintain peers interval with 30000ms interval +0ms
  waku:info:sdk:/vac/waku/store-query/3.0.0 Maintain peers interval started successfully +0ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Initializing BaseProtocolSDK with numPeersToUse: 2, maintainPeersInterval: 30000ms +0ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Starting maintain peers interval with 30000ms interval +0ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Maintain peers interval started successfully +0ms
  waku:info:waku Waku node created 12D3KooWHY2EACpG5CsXdhjGpEgRT2wZd4f767GLs98hbRtj2Gxc relay: false, store: true, light push: true, filter: true +0ms
  waku:info:connection-manager Connection Manager is now running +0ms
Node started
  waku:info:wait-for-remote-peer Waiting for /vac/waku/lightpush/2.0.0-beta1 peer. +0ms
  waku:info:wait-for-remote-peer Waiting for /vac/waku/filter-subscribe/2.0.0-beta1 peer. +0ms
  waku:info:connection-manager Dialing peer 16Uiu2HAkzHaTP5JsUwfR9NR8Rj9HC24puS6ocaU8wze4QrXr9iXp on attempt 1 +4ms
  waku:info:connection-manager Dialing peer 16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W on attempt 1 +1ms
  waku:info:connection-manager Connected to peer 16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W +2s
  waku:info:stream-manager:/vac/waku/metadata/1.0.0 Scheduling creation of a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/metadata/1.0.0 +0ms
  waku:info:stream-manager:/vac/waku/metadata/1.0.0 Attempting to create a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/metadata/1.0.0 +0ms
  waku:info:stream-manager:/vac/waku/metadata/1.0.0 Scheduling creation of a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/metadata/1.0.0 +197ms
  waku:info:stream-manager:/vac/waku/metadata/1.0.0 Skipping creation of a stream due to lock for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/metadata/1.0.0 +0ms
  waku:info:stream-manager:/vac/waku/peer-exchange/2.0.0-alpha1 Scheduling creation of a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/peer-exchange/2.0.0-alpha1 +0ms
  waku:info:stream-manager:/vac/waku/peer-exchange/2.0.0-alpha1 Attempting to create a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/peer-exchange/2.0.0-alpha1 +0ms
  waku:info:stream-manager:/vac/waku/metadata/1.0.0 Scheduling creation of a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/metadata/1.0.0 +3ms
  waku:info:stream-manager:/vac/waku/metadata/1.0.0 Skipping creation of a stream due to lock for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/metadata/1.0.0 +0ms
  waku:info:stream-manager:/vac/waku/store-query/3.0.0 Scheduling creation of a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/store-query/3.0.0 +0ms
  waku:info:stream-manager:/vac/waku/store-query/3.0.0 Attempting to create a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/store-query/3.0.0 +0ms
  waku:info:stream-manager:/vac/waku/lightpush/2.0.0-beta1 Scheduling creation of a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/lightpush/2.0.0-beta1 +0ms
  waku:info:stream-manager:/vac/waku/lightpush/2.0.0-beta1 Attempting to create a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/lightpush/2.0.0-beta1 +0ms
  waku:info:stream-manager:/vac/waku/filter-subscribe/2.0.0-beta1 Scheduling creation of a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/filter-subscribe/2.0.0-beta1 +0ms
  waku:info:stream-manager:/vac/waku/filter-subscribe/2.0.0-beta1 Attempting to create a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/filter-subscribe/2.0.0-beta1 +0ms
  waku:info:stream-manager:/vac/waku/peer-exchange/2.0.0-alpha1 Scheduling creation of a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/peer-exchange/2.0.0-alpha1 +1ms
  waku:info:stream-manager:/vac/waku/peer-exchange/2.0.0-alpha1 Skipping creation of a stream due to lock for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/peer-exchange/2.0.0-alpha1 +0ms
  waku:info:stream-manager:/vac/waku/metadata/1.0.0 Scheduling creation of a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/metadata/1.0.0 +1ms
  waku:info:stream-manager:/vac/waku/metadata/1.0.0 Skipping creation of a stream due to lock for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/metadata/1.0.0 +0ms
  waku:info:stream-manager:/vac/waku/store-query/3.0.0 Scheduling creation of a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/store-query/3.0.0 +1ms
  waku:info:stream-manager:/vac/waku/store-query/3.0.0 Skipping creation of a stream due to lock for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/store-query/3.0.0 +0ms
  waku:info:stream-manager:/vac/waku/lightpush/2.0.0-beta1 Scheduling creation of a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/lightpush/2.0.0-beta1 +1ms
  waku:info:stream-manager:/vac/waku/lightpush/2.0.0-beta1 Skipping creation of a stream due to lock for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/lightpush/2.0.0-beta1 +0ms
  waku:info:stream-manager:/vac/waku/filter-subscribe/2.0.0-beta1 Scheduling creation of a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/filter-subscribe/2.0.0-beta1 +1ms
  waku:info:stream-manager:/vac/waku/filter-subscribe/2.0.0-beta1 Skipping creation of a stream due to lock for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/filter-subscribe/2.0.0-beta1 +0ms
  waku:error:peer-exchange-discovery Error parsing peers from local storage: ReferenceError: localStorage is not defined
    at LocalPeerCacheDiscovery.getPeersFromLocalStorage (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/@waku/sdk/node_modules/@waku/discovery/src/local-peer-cache/index.ts:127:31)
    at TypedEventEmitter.handleNewPeers (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/@waku/sdk/node_modules/@waku/discovery/src/local-peer-cache/index.ts:105:36)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:826:20)
    at TypedEventEmitter.dispatchEvent (node:internal/event_target:761:26)
    at TypedEventEmitter.dispatchEvent (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/libp2p/node_modules/@libp2p/interface/src/event-target.ts:89:26)
    at TypedEventEmitter.Libp2p.events.dispatchEvent (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/libp2p/src/libp2p.ts:51:30)
    at TypedEventEmitter.safeDispatchEvent (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/libp2p/node_modules/@libp2p/interface/src/event-target.ts:104:17)
    at consumeIdentifyMessage (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/@libp2p/identify/src/utils.ts:185:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +5s
  waku:error:peer-exchange-discovery Error saving peers to local storage: ReferenceError: localStorage is not defined
    at LocalPeerCacheDiscovery.savePeersToLocalStorage (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/@waku/sdk/node_modules/@waku/discovery/src/local-peer-cache/index.ts:139:7)
    at TypedEventEmitter.handleNewPeers (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/@waku/sdk/node_modules/@waku/discovery/src/local-peer-cache/index.ts:122:10)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:826:20)
    at TypedEventEmitter.dispatchEvent (node:internal/event_target:761:26)
    at TypedEventEmitter.dispatchEvent (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/libp2p/node_modules/@libp2p/interface/src/event-target.ts:89:26)
    at TypedEventEmitter.Libp2p.events.dispatchEvent (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/libp2p/src/libp2p.ts:51:30)
    at TypedEventEmitter.safeDispatchEvent (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/libp2p/node_modules/@libp2p/interface/src/event-target.ts:104:17)
    at consumeIdentifyMessage (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/node_modules/@libp2p/identify/src/utils.ts:185:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +0ms
  waku:info:peer-exchange-discovery Querying peer: 16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W (attempt 1) +5s
ts: 2.105s
  waku:info:stream-manager:/vac/waku/peer-exchange/2.0.0-alpha1 Attempting to create a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/peer-exchange/2.0.0-alpha1 +3ms
peer: PeerId(12D3KooWHY2EACpG5CsXdhjGpEgRT2wZd4f767GLs98hbRtj2Gxc) protocols: [
  '/ipfs/id/1.0.0',
  '/ipfs/ping/1.0.0',
  '/vac/waku/filter-push/2.0.0-beta1',
  '/vac/waku/metadata/1.0.0'
]  peers: [
  '16Uiu2HAkzHaTP5JsUwfR9NR8Rj9HC24puS6ocaU8wze4QrXr9iXp',
  '16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W'
]
  waku:info:stream-manager:/vac/waku/lightpush/2.0.0-beta1 Attempting to create a stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/lightpush/2.0.0-beta1 +8ms
  waku:info:stream-manager:/vac/waku/metadata/1.0.0 Created stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/metadata/1.0.0 +11ms
  waku:info:stream-manager:/vac/waku/peer-exchange/2.0.0-alpha1 Created stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/peer-exchange/2.0.0-alpha1 +195ms
  waku:info:stream-manager:/vac/waku/store-query/3.0.0 Created stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/store-query/3.0.0 +198ms
  waku:info:stream-manager:/vac/waku/lightpush/2.0.0-beta1 Created stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/lightpush/2.0.0-beta1 +191ms
  waku:info:stream-manager:/vac/waku/filter-subscribe/2.0.0-beta1 Created stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/filter-subscribe/2.0.0-beta1 +199ms
  waku:info:stream-manager:/vac/waku/peer-exchange/2.0.0-alpha1 Created stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/peer-exchange/2.0.0-alpha1 +2ms
  waku:info:stream-manager:/vac/waku/peer-exchange/2.0.0-alpha1 Locking stream for peerId:16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W streamId:i6 +0ms
  waku:info:stream-manager:/vac/waku/lightpush/2.0.0-beta1 Created stream for peerId=16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W multicodec=/vac/waku/lightpush/2.0.0-beta1 +2ms
  waku:info:stream-manager:/vac/waku/lightpush/2.0.0-beta1 Locking stream for peerId:16Uiu2HAkykgaECHswi3YKJ5dMLbq2kPVCo89fcyTd38UcQD6ej5W      streamId:i7 +0ms
  waku:info:peer-exchange-discovery Discovered peer: 16Uiu2HAkuYgRgbrSd7cfcZafVuWmaM4tJrUHaMs8SecBGPKQWF52 +1s
  waku:info:peer-exchange-discovery Discovered peer: 16Uiu2HAmSQzErTEwA64xApHz8MUVTwjirGtVnp5Pu29jnVqD7utS +2ms
  waku:info:connection-manager Dialing peer 16Uiu2HAkuYgRgbrSd7cfcZafVuWmaM4tJrUHaMs8SecBGPKQWF52 on attempt 1 +2s
  waku:error:connection-manager Error dialing peer 16Uiu2HAkuYgRgbrSd7cfcZafVuWmaM4tJrUHaMs8SecBGPKQWF52 - The dial request has no valid addresses +4s
  waku:info:connection-manager Dialing peer 16Uiu2HAkuYgRgbrSd7cfcZafVuWmaM4tJrUHaMs8SecBGPKQWF52 on attempt 2 +1ms
  waku:info:peer-exchange-discovery Discovered peer: 16Uiu2HAm2TEYg7xQdSCKQDND28PuzvNC4pJYLGc6rqFYDjvVFuzT +1ms
  waku:info:connection-manager Dialing peer 16Uiu2HAmSQzErTEwA64xApHz8MUVTwjirGtVnp5Pu29jnVqD7utS on attempt 1 +1ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAkuYgRgbrSd7cfcZafVuWmaM4tJrUHaMs8SecBGPKQWF52 - The dial request has no valid addresses +1ms
  waku:info:connection-manager Dialing peer 16Uiu2HAkuYgRgbrSd7cfcZafVuWmaM4tJrUHaMs8SecBGPKQWF52 on attempt 3 +0ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAmSQzErTEwA64xApHz8MUVTwjirGtVnp5Pu29jnVqD7utS - The dial request has no valid addresses +1ms
  waku:info:connection-manager Dialing peer 16Uiu2HAmSQzErTEwA64xApHz8MUVTwjirGtVnp5Pu29jnVqD7utS on attempt 2 +1ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAkuYgRgbrSd7cfcZafVuWmaM4tJrUHaMs8SecBGPKQWF52 - The dial request has no valid addresses +0ms
  waku:info:connection-manager Deleting undialable peer 16Uiu2HAkuYgRgbrSd7cfcZafVuWmaM4tJrUHaMs8SecBGPKQWF52 from peer store. Reason: The dial request has no valid addresses +0ms
  waku:info:peer-exchange-discovery Discovered peer: 16Uiu2HAm4MmdJ283rbCBjbcvaA1hHiGa4jPaRqVKzvVNz8fVsh5U +3ms
  waku:info:connection-manager Dialing peer 16Uiu2HAm2TEYg7xQdSCKQDND28PuzvNC4pJYLGc6rqFYDjvVFuzT on attempt 1 +1ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAmSQzErTEwA64xApHz8MUVTwjirGtVnp5Pu29jnVqD7utS - The dial request has no valid addresses +2ms
  waku:info:connection-manager Dialing peer 16Uiu2HAmSQzErTEwA64xApHz8MUVTwjirGtVnp5Pu29jnVqD7utS on attempt 3 +1ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAm2TEYg7xQdSCKQDND28PuzvNC4pJYLGc6rqFYDjvVFuzT - The dial request has no valid addresses +0ms
  waku:info:connection-manager Dialing peer 16Uiu2HAm2TEYg7xQdSCKQDND28PuzvNC4pJYLGc6rqFYDjvVFuzT on attempt 2 +0ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAmSQzErTEwA64xApHz8MUVTwjirGtVnp5Pu29jnVqD7utS - The dial request has no valid addresses +1ms
  waku:info:connection-manager Deleting undialable peer 16Uiu2HAmSQzErTEwA64xApHz8MUVTwjirGtVnp5Pu29jnVqD7utS from peer store. Reason: The dial request has no valid addresses +1ms
  waku:info:peer-exchange-discovery Discovered peer: 16Uiu2HAmFhtkH9kXgeGyVfVeeznDqeqr62nSU5HY5qdXVMXiuGo7 +2ms
  waku:info:connection-manager Dialing peer 16Uiu2HAm4MmdJ283rbCBjbcvaA1hHiGa4jPaRqVKzvVNz8fVsh5U on attempt 1 +0ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAm2TEYg7xQdSCKQDND28PuzvNC4pJYLGc6rqFYDjvVFuzT - The dial request has no valid addresses +1ms
  waku:info:connection-manager Dialing peer 16Uiu2HAm2TEYg7xQdSCKQDND28PuzvNC4pJYLGc6rqFYDjvVFuzT on attempt 3 +1ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAm4MmdJ283rbCBjbcvaA1hHiGa4jPaRqVKzvVNz8fVsh5U - The dial request has no valid addresses +1ms
  waku:info:connection-manager Dialing peer 16Uiu2HAm4MmdJ283rbCBjbcvaA1hHiGa4jPaRqVKzvVNz8fVsh5U on attempt 2 +1ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAm2TEYg7xQdSCKQDND28PuzvNC4pJYLGc6rqFYDjvVFuzT - The dial request has no valid addresses +0ms
  waku:info:connection-manager Deleting undialable peer 16Uiu2HAm2TEYg7xQdSCKQDND28PuzvNC4pJYLGc6rqFYDjvVFuzT from peer store. Reason: The dial request has no valid addresses +0ms
  waku:info:peer-exchange-discovery Discovered peer: 16Uiu2HAmRW9rdzsSUv21ZYBimDXDDUoYEXzPvHEwo9ZJ8Zi1TXzX +2ms
  waku:info:connection-manager Dialing peer 16Uiu2HAmFhtkH9kXgeGyVfVeeznDqeqr62nSU5HY5qdXVMXiuGo7 on attempt 1 +0ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAm4MmdJ283rbCBjbcvaA1hHiGa4jPaRqVKzvVNz8fVsh5U - The dial request has no valid addresses +1ms
  waku:info:connection-manager Dialing peer 16Uiu2HAm4MmdJ283rbCBjbcvaA1hHiGa4jPaRqVKzvVNz8fVsh5U on attempt 3 +1ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAmFhtkH9kXgeGyVfVeeznDqeqr62nSU5HY5qdXVMXiuGo7 - The dial request has no valid addresses +1ms
  waku:info:connection-manager Dialing peer 16Uiu2HAmFhtkH9kXgeGyVfVeeznDqeqr62nSU5HY5qdXVMXiuGo7 on attempt 2 +1ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAm4MmdJ283rbCBjbcvaA1hHiGa4jPaRqVKzvVNz8fVsh5U - The dial request has no valid addresses +0ms
  waku:info:connection-manager Deleting undialable peer 16Uiu2HAm4MmdJ283rbCBjbcvaA1hHiGa4jPaRqVKzvVNz8fVsh5U from peer store. Reason: The dial request has no valid addresses +0ms
  waku:info:peer-exchange-discovery Discovered peer: 16Uiu2HAm5FxJuazJVvvMhrcNajYFwD4fhEXM2GFMtEMfN7Jk77FU +2ms
  waku:info:connection-manager Dialing peer 16Uiu2HAmRW9rdzsSUv21ZYBimDXDDUoYEXzPvHEwo9ZJ8Zi1TXzX on attempt 1 +1ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAmFhtkH9kXgeGyVfVeeznDqeqr62nSU5HY5qdXVMXiuGo7 - The dial request has no valid addresses +1ms
  waku:info:connection-manager Dialing peer 16Uiu2HAmFhtkH9kXgeGyVfVeeznDqeqr62nSU5HY5qdXVMXiuGo7 on attempt 3 +0ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAmFhtkH9kXgeGyVfVeeznDqeqr62nSU5HY5qdXVMXiuGo7 - The dial request has no valid addresses +2ms
  waku:info:connection-manager Deleting undialable peer 16Uiu2HAmFhtkH9kXgeGyVfVeeznDqeqr62nSU5HY5qdXVMXiuGo7 from peer store. Reason: The dial request has no valid addresses +2ms
  waku:info:peer-exchange-discovery Discovered peer: 16Uiu2HAmSJnNzyfpL326ibTUBVTyBvjBsPMYfNkxLiVaG7WiBiQQ +3ms
  waku:info:connection-manager Dialing peer 16Uiu2HAm5FxJuazJVvvMhrcNajYFwD4fhEXM2GFMtEMfN7Jk77FU on attempt 1 +0ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAm5FxJuazJVvvMhrcNajYFwD4fhEXM2GFMtEMfN7Jk77FU - The dial request has no valid addresses +1ms
  waku:info:connection-manager Dialing peer 16Uiu2HAm5FxJuazJVvvMhrcNajYFwD4fhEXM2GFMtEMfN7Jk77FU on attempt 2 +1ms
  waku:info:peer-exchange-discovery Discovered peer: 16Uiu2HAmUwH4bMog2bU8CwUByDuaJqFXkdpUNhUTZFcu5jCLT8nb +1ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAm5FxJuazJVvvMhrcNajYFwD4fhEXM2GFMtEMfN7Jk77FU - The dial request has no valid addresses +1ms
  waku:info:connection-manager Dialing peer 16Uiu2HAm5FxJuazJVvvMhrcNajYFwD4fhEXM2GFMtEMfN7Jk77FU on attempt 3 +1ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAm5FxJuazJVvvMhrcNajYFwD4fhEXM2GFMtEMfN7Jk77FU - The dial request has no valid addresses +1ms
  waku:info:connection-manager Deleting undialable peer 16Uiu2HAm5FxJuazJVvvMhrcNajYFwD4fhEXM2GFMtEMfN7Jk77FU from peer store. Reason: The dial request has no valid addresses +1ms
  waku:info:peer-exchange-discovery Discovered peer: 16Uiu2HAm2J2ngDzuL1VfWkdNmZkUsrJSRomnmkDegzKqfge4CYaw +2ms
  waku:info:connection-manager Dialing peer 16Uiu2HAmUwH4bMog2bU8CwUByDuaJqFXkdpUNhUTZFcu5jCLT8nb on attempt 1 +0ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAmUwH4bMog2bU8CwUByDuaJqFXkdpUNhUTZFcu5jCLT8nb - The dial request has no valid addresses +1ms
  waku:info:connection-manager Dialing peer 16Uiu2HAmUwH4bMog2bU8CwUByDuaJqFXkdpUNhUTZFcu5jCLT8nb on attempt 2 +1ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAmUwH4bMog2bU8CwUByDuaJqFXkdpUNhUTZFcu5jCLT8nb - The dial request has no valid addresses +0ms
  waku:info:connection-manager Dialing peer 16Uiu2HAmUwH4bMog2bU8CwUByDuaJqFXkdpUNhUTZFcu5jCLT8nb on attempt 3 +0ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAmUwH4bMog2bU8CwUByDuaJqFXkdpUNhUTZFcu5jCLT8nb - The dial request has no valid addresses +0ms
  waku:info:connection-manager Deleting undialable peer 16Uiu2HAmUwH4bMog2bU8CwUByDuaJqFXkdpUNhUTZFcu5jCLT8nb from peer store. Reason: The dial request has no valid addresses +0ms
  waku:info:connection-manager Dialing peer 16Uiu2HAmSJnNzyfpL326ibTUBVTyBvjBsPMYfNkxLiVaG7WiBiQQ on attempt 1 +1ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAmSJnNzyfpL326ibTUBVTyBvjBsPMYfNkxLiVaG7WiBiQQ - The dial request has no valid addresses +1ms
  waku:info:connection-manager Dialing peer 16Uiu2HAmSJnNzyfpL326ibTUBVTyBvjBsPMYfNkxLiVaG7WiBiQQ on attempt 2 +0ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAmSJnNzyfpL326ibTUBVTyBvjBsPMYfNkxLiVaG7WiBiQQ - The dial request has no valid addresses +0ms
  waku:info:connection-manager Dialing peer 16Uiu2HAmSJnNzyfpL326ibTUBVTyBvjBsPMYfNkxLiVaG7WiBiQQ on attempt 3 +0ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAmSJnNzyfpL326ibTUBVTyBvjBsPMYfNkxLiVaG7WiBiQQ - The dial request has no valid addresses +1ms
  waku:info:connection-manager Deleting undialable peer 16Uiu2HAmSJnNzyfpL326ibTUBVTyBvjBsPMYfNkxLiVaG7WiBiQQ from peer store. Reason: The dial request has no valid addresses +1ms
  waku:info:connection-manager Dialing peer 16Uiu2HAm2J2ngDzuL1VfWkdNmZkUsrJSRomnmkDegzKqfge4CYaw on attempt 1 +0ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAm2J2ngDzuL1VfWkdNmZkUsrJSRomnmkDegzKqfge4CYaw - The dial request has no valid addresses +0ms
  waku:info:connection-manager Dialing peer 16Uiu2HAm2J2ngDzuL1VfWkdNmZkUsrJSRomnmkDegzKqfge4CYaw on attempt 2 +0ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAm2J2ngDzuL1VfWkdNmZkUsrJSRomnmkDegzKqfge4CYaw - The dial request has no valid addresses +0ms
  waku:info:connection-manager Dialing peer 16Uiu2HAm2J2ngDzuL1VfWkdNmZkUsrJSRomnmkDegzKqfge4CYaw on attempt 3 +0ms
  waku:error:connection-manager Error dialing peer 16Uiu2HAm2J2ngDzuL1VfWkdNmZkUsrJSRomnmkDegzKqfge4CYaw - The dial request has no valid addresses +1ms
  waku:info:connection-manager Deleting undialable peer 16Uiu2HAm2J2ngDzuL1VfWkdNmZkUsrJSRomnmkDegzKqfge4CYaw from peer store. Reason: The dial request has no valid addresses +1ms
Sent message
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Checking for peers. forceUseAllPeers: false, maxAttempts: 3 +4s
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Attempt 1/3 to reach required number of peers +0ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Current peer count: 0, target: 2 +0ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Attempting to add 2 peer(s) +0ms
  waku:warn:filter:v2 No peers found. Ensure you have a connection to the network. +0ms
  waku:warn:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 No additional peers found +0ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Peer maintenance completed. Initial count: 0, Final count: 0 +2ms
  waku:warn:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Found only 0/2 required peers. Retrying... +0ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Attempt 2/3 to reach required number of peers +0ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Current peer count: 0, target: 2 +0ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Attempting to add 2 peer(s) +0ms
  waku:warn:filter:v2 No peers found. Ensure you have a connection to the network. +1ms
  waku:warn:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 No additional peers found +1ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Peer maintenance completed. Initial count: 0, Final count: 0 +1ms
  waku:warn:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Found only 0/2 required peers. Retrying... +0ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Attempt 3/3 to reach required number of peers +0ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Current peer count: 0, target: 2 +0ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Attempting to add 2 peer(s) +0ms
  waku:warn:filter:v2 No peers found. Ensure you have a connection to the network. +1ms
  waku:warn:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 No additional peers found +1ms
  waku:info:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Peer maintenance completed. Initial count: 0, Final count: 0 +1ms
  waku:warn:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Found only 0/2 required peers. Retrying... +0ms
  waku:error:sdk:/vac/waku/filter-subscribe/2.0.0-beta1 Failed to find required number of peers (2) after 3 attempts +0ms
/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/src/main.ts:73
                throw Error(error);
                      ^


Error: No peer available
    at main (/home/morpher/Documents/MyProjects/MOSHE/tradeflow/waku-test/src/main.ts:73:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.11.0

@weboko weboko moved this from Code Review / QA to Done in Waku Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants