Open SgtPooki opened 6 months ago
I also ran ncu '*libp2p*' -u
to update all libp2p deps and it's also reproducible on latest:
@chainsafe/libp2p-noise ^14.0.0 → ^15.0.0
@chainsafe/libp2p-yamux ^6.0.1 → ^6.0.2
@libp2p/peer-id-factory ^4.0.0 → ^4.1.1
@libp2p/tcp ^9.0.4 → ^9.0.24
@libp2p/websockets ^8.0.4 → ^8.0.22
libp2p ^1.0.8 → ^1.5.1
this was pushed to repro branch with https://github.com/libp2p/js-libp2p-examples/commit/6b459f6d2c023dfe04afa102670dbd6989be137c
Version:
Platform:
Darwin Russells-MacBook-Pro-314.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64
Subsystem:
@libp2p/webrtc
,AddressManagerInit
, andpackages/libp2p/src/transport-manager
Severity:
Medium
Description:
Possibly fixed by https://github.com/libp2p/js-libp2p/pull/2133
I accidentally had two
/webrtc
entries in mylisten:
array passed tocreateLibp2p
. It took me way too long to figure out what was actually happening. Note that this does not happen for duplicate TCP listen addresses.The error that surfaces is
Which seems to stem from here:
https://github.com/libp2p/js-libp2p/blob/7ae6063dfbc754f95a2c4bd0a6bd146f2989a5f5/packages/libp2p/src/transport-manager.ts#L152C3-L154
Steps to reproduce the error:
You can reproduce this on my branch of a js-libp2p-examples fork, https://github.com/SgtPooki/js-libp2p-examples/tree/bug/repro-dupe-listen-max-call-stack. See the tiny diff of changes required to repro the error here: https://github.com/libp2p/js-libp2p-examples/commit/8abf359b1ea680ef915f01ed8ff73fa312dda59b
Steps to reproduce: