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

Issues with Yamux / race-signal #554

Closed
veermetri05 opened this issue Jun 6, 2024 · 7 comments
Closed

Issues with Yamux / race-signal #554

veermetri05 opened this issue Jun 6, 2024 · 7 comments
Labels
kind/stale need/author-input Needs input from the original author

Comments

@veermetri05
Copy link

To reproduce just create a Helia instance,

const libp2p = await createLibp2p({
    datastore,
    addresses: {
        listen: [
            '/ip4/127.0.0.1/tcp/0'
        ]
    },
    transports: [
        tcp()
    ],
    connectionEncryption: [
        noise()
    ],
    streamMuxers: [
        yamux()
    ],
    peerDiscovery: [
        bootstrap({
            list: [
                '/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN',
                '/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa',
                '/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb',
                '/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt'
            ]
        })
    ],
    services: {
        identify: identify()
    }
})
const helia = await createHelia(datastore, blockstore, libp2p)

and run the program, wait for some time, then you get the issue.

return Promise.reject(new AbortError(opts?.errorMessage, opts?.errorCode));
                              ^

AbortError: The operation was aborted
    at raceSignal (file:///C:/Users/VeerMetri/Documents/projects/ipfsDagExperiments/crustLargeFileWorkaround/node_modules/race-signal/dist/src/index.js:22:31)
    at YamuxStream.closeWrite (file:///C:/Users/VeerMetri/Documents/projects/ipfsDagExperiments/crustLargeFileWorkaround/node_modules/@libp2p/utils/dist/src/abstract-stream.js:230:19)
    at YamuxStream.close (file:///C:/Users/VeerMetri/Documents/projects/ipfsDagExperiments/crustLargeFileWorkaround/node_modules/@libp2p/utils/dist/src/abstract-stream.js:189:18)
    at file:///C:/Users/VeerMetri/Documents/projects/ipfsDagExperiments/crustLargeFileWorkaround/node_modules/libp2p/dist/src/connection/index.js:118:63   
    at Array.map (<anonymous>)
    at ConnectionImpl.close (file:///C:/Users/VeerMetri/Documents/projects/ipfsDagExperiments/crustLargeFileWorkaround/node_modules/libp2p/dist/src/connection/index.js:118:44)
    at initiateConnection (file:///C:/Users/VeerMetri/Documents/projects/ipfsDagExperiments/crustLargeFileWorkaround/node_modules/@libp2p/webrtc/dist/src/private-to-private/initiate-connection.js:125:34)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async WebRTCTransport.dial (file:///C:/Users/VeerMetri/Documents/projects/ipfsDagExperiments/crustLargeFileWorkaround/node_modules/@libp2p/webrtc/dist/src/private-to-private/transport.js:91:35)
    at async DefaultTransportManager.dial (file:///C:/Users/VeerMetri/Documents/projects/ipfsDagExperiments/crustLargeFileWorkaround/node_modules/libp2p/dist/src/transport-manager.js:81:20) {
  type: 'aborted',
  code: 'ABORT_ERR'
}

Node.js v20.13.1
@SgtPooki
Copy link
Member

SgtPooki commented Aug 8, 2024

@veermetri05 can you provide your full code or a reproduction repo? I am not seeing the error message you provided match up with the example code you gave in the issue description.

@SgtPooki SgtPooki added the need/author-input Needs input from the original author label Aug 15, 2024
Copy link
Contributor

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.

Copy link
Contributor

This issue was closed because it is missing author input.

@silkroadnomad
Copy link

I have the same error. I had been using:

"helia": "^5.0.0",
"libp2p": "^2.1.10",

"@chainsafe/libp2p-gossipsub": "^14.1.0",
"@chainsafe/libp2p-noise": "^16.0.0",
"@chainsafe/libp2p-yamux": "^7.0.1",
"@helia/interface": "^5.0.0",
"@helia/ipns": "^8.0.0",
"@helia/strings": "^4.0.0",
"@helia/unixfs": "^4.0.0",
"@libp2p/autonat": "^2.0.8",
"@libp2p/bootstrap": "^11.0.8",
"@libp2p/circuit-relay-v2": "^3.0.0",
"@libp2p/crypto": "^5.0.5",
"@libp2p/dcutr": "^2.0.8",
"@libp2p/identify": "^3.0.8",
"@libp2p/interface": "^2.1.3",
"@libp2p/interface-pubsub": "^4.0.1",
"@libp2p/interface-transport": "^4.0.3",
"@libp2p/kad-dht": "^14.0.1",
"@libp2p/logger": "^5.1.1",
"@libp2p/peer-id": "^5.0.5",
"@libp2p/peer-id-factory": "^4.2.4",
"@libp2p/ping": "^2.0.8",
"@libp2p/pubsub-peer-discovery": "^10.0.3",
"@libp2p/tcp": "^10.0.9",
"@libp2p/tls": "^2.0.9",
"@libp2p/upnp-nat": "^2.0.9",
"@libp2p/webrtc": "^5.0.13",
"@libp2p/webrtc-direct": "^6.0.0",
"@libp2p/websockets": "^9.0.9",
"@libp2p/webtransport": "^5.0.13",
"@multiformats/dns": "^1.0.6",
"@multiformats/multiaddr": "^12.3.1",
"@orbitdb/core": "^2.4.2",
"blockstore-core": "^5.0.2",
"blockstore-level": "^2.0.1",
"datastore-core": "^10.0.2",
"datastore-level": "^11.0.1",
"helia": "^5.0.0",
"interface-datastore": "^8.3.1",
"ipns": "^10.0.0",
"libp2p": "^2.1.10",
"multiformats": "^13.3.0",
"uint8arrays": "^5.1.0",
"ws": "^8.18.0"

@SgtPooki
Copy link
Member

@silkroadnomad please open a small repro case if you can, and open a new issue so we can help you out

@silkroadnomad
Copy link

silkroadnomad commented Nov 20, 2024

@SgtPooki It seemed to have disappeared, but today I got it again. The issue is described here more accurately
libp2p/js-libp2p#2702.

It seems related to WebRTC. I will disable WebRTC on the NodeJS Helia since it works mainly via tcp and wss right now.

Lets see if I can do a simple repo for the issue to replicate.

here my stacktrace and it also crashed NodeJS node completely (exited)
relay-service-1 | file:///usr/src/app/node_modules/race-signal/dist/src/index.js:22
relay-service-1 | return Promise.reject(new AbortError(opts?.errorMessage, opts?.errorCode, opts?.errorName));
relay-service-1 | ^
relay-service-1 |
relay-service-1 | AbortError: The operation was aborted
relay-service-1 | at raceSignal (file:///usr/src/app/node_modules/race-signal/dist/src/index.js:22:31)
relay-service-1 | at YamuxStream.closeWrite (file:///usr/src/app/node_modules/@libp2p/utils/dist/src/abstract-stream.js:228:19)
relay-service-1 | at YamuxStream.close (file:///usr/src/app/node_modules/@libp2p/utils/dist/src/abstract-stream.js:187:18)
relay-service-1 | at stream.close (file:///usr/src/app/node_modules/@libp2p/utils/dist/src/stream-to-ma-conn.js:15:15)
relay-service-1 | at ConnectionImpl.close [as _close] (file:///usr/src/app/node_modules/libp2p/dist/src/upgrader.js:429:30)
relay-service-1 | at runNextTicks (node:internal/process/task_queues:60:5)
relay-service-1 | at listOnTimeout (node:internal/timers:545:9)
relay-service-1 | at process.processTimers (node:internal/timers:519:7)
relay-service-1 | at async ConnectionImpl.close (file:///usr/src/app/node_modules/libp2p/dist/src/connection/index.js:118:13)
relay-service-1 | at async initiateConnection (file:///usr/src/app/node_modules/@libp2p/webrtc/dist/src/private-to-private/initiate-connection.js:148:17)
relay-service-1 | at async WebRTCTransport.dial (file:///usr/src/app/node_modules/@libp2p/webrtc/dist/src/private-to-private/transport.js:92:65)
relay-service-1 | at async queue.add.peerId.peerId [as fn] (file:///usr/src/app/node_modules/libp2p/dist/src/connection-manager/dial-queue.js:169:38)
relay-service-1 | at async raceSignal (file:///usr/src/app/node_modules/race-signal/dist/src/index.js:28:16)
relay-service-1 | at async Job.run (file:///usr/src/app/node_modules/@libp2p/utils/dist/src/queue/job.js:55:28) {
relay-service-1 | type: 'aborted',
relay-service-1 | code: 'ABORT_ERR'
relay-service-1 | }

@silkroadnomad
Copy link

silkroadnomad commented Nov 20, 2024

@veermetri05 your transport shows you have only tcp enabled. Question is: How an issue could pop up in a WebRTC lib? Are you sure you only enabled tcp? Because I had webrtc and webrtc-direct enabled. Not properly configured, I must admit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/stale need/author-input Needs input from the original author
Projects
None yet
Development

No branches or pull requests

3 participants