ipfs / helia

An implementation of IPFS in JavaScript
https://helia.io
Other
811 stars 81 forks source link

Issues with Yamux / race-signal #554

Open veermetri05 opened 3 weeks ago

veermetri05 commented 3 weeks ago

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