-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ping error #1616
Comments
and when ping in browser,error like this: await ipfs.ping("QmZ6YuHZUJd6k9hbJNaNUZBsWfwZGv62piZMU6oxHPBtDx") |
I've found the first error happens in the first few seconds of starting an IPFS node - after it's found a few peers the error stops occurring and the ping command starts working. |
Without this PR: ```console $ npm test ...*snip* Uncaught TypeError: Cannot read property 'push' of null at /Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-stream/sinks/collect.js:7:9 at /Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-stream/sinks/reduce.js:8:11 at /Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-stream/sinks/drain.js:24:37 at callback (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-pushable/index.js:84:5) at Function.push (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-pushable/index.js:44:7) at libp2pNode.ping (src/core/components/ping-pull-stream.js:79:18) at _getPeerInfo (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/libp2p/src/index.js:339:7) at setImmediate (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/libp2p/src/get-peer-info.js:54:24) at Immediate.<anonymous> (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/async/internal/setImmediate.js:27:16) ``` Might resolve the second issue in #1616
Without this PR: ```console $ npm test ...*snip* Uncaught TypeError: Cannot read property 'push' of null at /Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-stream/sinks/collect.js:7:9 at /Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-stream/sinks/reduce.js:8:11 at /Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-stream/sinks/drain.js:24:37 at callback (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-pushable/index.js:84:5) at Function.push (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-pushable/index.js:44:7) at libp2pNode.ping (src/core/components/ping-pull-stream.js:79:18) at _getPeerInfo (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/libp2p/src/index.js:339:7) at setImmediate (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/libp2p/src/get-peer-info.js:54:24) at Immediate.<anonymous> (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/async/internal/setImmediate.js:27:16) ``` Might resolve the second issue in #1616
await ipfs.ping("QmXp22HFGvo29o6dsGnJwxaHvTieEqMGr1pS55ZsZUonMf") TypeError: Cannot read property 'push' of null TypeError: Cannot read property 'push' of null (anonymous) @ collect.js:7 |
and "QmXp22HFGvo29o6dsGnJwxaHvTieEqMGr1pS55ZsZUonMf" is my node itself. |
and also, i ping others,"QmZ6YuHZUJd6k9hbJNaNUZBsWfwZGv62piZMU6oxHPBtDx",error again |
js-ipfs is being deprecated in favor of Helia. You can follow the migration plan here #4336 and read the migration guide. This issue has been resolved in Helia! if this does not address your concern please let us know by reopening this issue before 2023-06-05! |
jsipfs ping QmW1apH3mUa1SGV9yPfnjhScVDWf3UmWsqCk87MdjbKNSj
Looking up peer QmW1apH3mUa1SGV9yPfnjhScVDWf3UmWsqCk87MdjbKNSj
Error
/usr/lib/node_modules/ipfs/node_modules/pull-stream/sinks/drain.js:22
throw end
^
Error: Error
at PingMessageStream._transform (/usr/lib/node_modules/ipfs/node_modules/ipfs-api/src/utils/ping-message-stream.js:18:15)
at PingMessageStream.Transform._read (/usr/lib/node_modules/ipfs/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at PingMessageStream.Transform._write (/usr/lib/node_modules/ipfs/node_modules/readable-stream/lib/_stream_transform.js:172:83)
at doWrite (/usr/lib/node_modules/ipfs/node_modules/readable-stream/lib/_stream_writable.js:428:64)
at writeOrBuffer (/usr/lib/node_modules/ipfs/node_modules/readable-stream/lib/_stream_writable.js:417:5)
at PingMessageStream.Writable.write (/usr/lib/node_modules/ipfs/node_modules/readable-stream/lib/_stream_writable.js:334:11)
at DestroyableTransform.ondata (/usr/lib/node_modules/ipfs/node_modules/readable-stream/lib/_stream_readable.js:619:20)
at DestroyableTransform.emit (events.js:182:13)
at addChunk (/usr/lib/node_modules/ipfs/node_modules/readable-stream/lib/_stream_readable.js:291:12)
at readableAddChunk (/usr/lib/node_modules/ipfs/node_modules/readable-stream/lib/_stream_readable.js:278:11)
The text was updated successfully, but these errors were encountered: