Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Already Piped #1446

Closed
agahEbrahimi opened this issue Jul 17, 2018 · 11 comments
Closed

Already Piped #1446

agahEbrahimi opened this issue Jul 17, 2018 · 11 comments
Labels
exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up

Comments

@agahEbrahimi
Copy link

I have been attempting to work with ipfs-pubsub room but it randomly exits and gives this error. I have attempted the fixes in some issues on ipfs but they have not worked. Any ideas of how to fix it?

My ipfs version is the latest stable version.

These are the issues I am referring to:
https://github.com/libp2p/js-libp2p-switch/issues/235
#1156

This is the error:
throw new Error('already piped')
^

Error: already piped
    at sink (/Users/behrad/Desktop/ColIDE/JS/node_modules/pull-pair/index.js:11:13)
    at consume (/Users/behrad/Desktop/ColIDE/JS/node_modules/pull-defer/sink.js:7:17)
    at consume (/Users/behrad/Desktop/ColIDE/JS/node_modules/pull-defer/sink.js:7:17)
    at Connection.consume (/Users/behrad/Desktop/ColIDE/JS/node_modules/pull-defer/sink.js:7:17)
    at pull (/Users/behrad/Desktop/ColIDE/JS/node_modules/pull-stream/pull.js:43:9)
    at Dialer.handle (/Users/behrad/Desktop/ColIDE/JS/node_modules/multistream-select/src/dialer/index.js:47:5)
    at attemptMuxerUpgrade (/Users/behrad/Desktop/ColIDE/JS/node_modules/ipfs/node_modules/libp2p-switch/src/dial.js:157:10)
    at gotWarmedUpConn (/Users/behrad/Desktop/ColIDE/JS/node_modules/ipfs/node_modules/libp2p-switch/src/dial.js:54:7)
    at Switch.dial (/Users/behrad/Desktop/ColIDE/JS/node_modules/ipfs/node_modules/libp2p-switch/src/dial.js:40:9)
    at _getPeerInfo (/Users/behrad/Desktop/ColIDE/JS/node_modules/ipfs/node_modules/libp2p/src/index.js:237:19)
@justuswilhelm
Copy link

Yes, I'm receiving the same error with the newest version 0.30.0:

Uncaught Error: already piped
    at sink (index.js:11)
    at consume (sink.js:7)
    at consume (sink.js:7)
    at Connection.consume (sink.js:7)
    at pull (pull.js:43)
    at Dialer.handle (index.js:47)
    at handleSafe (dial.js:51)
    at Dialer._attemptMuxerUpgrade (dial.js:249)
    at Dialer._createMuxedConnection (dial.js:214)
    at waterfall (dial.js:139)

@alanshaw alanshaw added kind/bug A bug in existing code (including security flaws) exp/expert Having worked on the specific codebase is important status/ready Ready to be worked P2 Medium: Good to have, but can wait until someone steps up labels Jul 17, 2018
@alanshaw
Copy link
Member

@agahEbrahimi could you please upgrade to the latest js-ipfs? Your stack trace is referring to an old version of libp2p-switch.

@justuswilhelm a new version of libp2p-switch has been released if you do a fresh install of js-ipfs you should pick it up.

The new libp2p-switch has a fix for handling an error in the protocol handshake which might fix your issue. Please shout if you're still seeing the issue (with updated stacktrace plz!) and we'll investigate further.

@agahEbrahimi
Copy link
Author

Thank you @alanshaw
That worked.

@ghost ghost removed the status/ready Ready to be worked label Jul 18, 2018
@kalepail
Copy link

kalepail commented Aug 8, 2018

I'm still seeing this issue. All the latest versions of ipfs-js, orbitdb and libp2p-switch

Related. Context.
orbitdb/orbitdb#355 (comment)

/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/pull-pair/index.js:11
      throw new Error('already piped')
      ^

Error: already piped
    at sink (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/pull-pair/index.js:11:13)
    at consume (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/pull-defer/sink.js:7:17)
    at consume (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/pull-defer/sink.js:7:17)
    at Connection.consume (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/pull-defer/sink.js:7:17)
    at pull (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/pull-stream/pull.js:43:9)
    at Dialer.handle (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/multistream-select/src/dialer/index.js:47:5)
    at handleSafe (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/libp2p-switch/src/dial.js:51:12)
    at Dialer._attemptMuxerUpgrade (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/libp2p-switch/src/dial.js:288:5)
    at Dialer._createMuxedConnection (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/libp2p-switch/src/dial.js:252:10)
    at waterfall (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/libp2p-switch/src/dial.js:139:14)
    at nextTask (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/async/waterfall.js:16:14)
    at next (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/async/waterfall.js:23:9)
    at /Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/async/internal/onlyOnce.js:12:16
    at Dialer._createBaseConnection (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/libp2p-switch/src/dial.js:185:14)
    at waterfall (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/libp2p-switch/src/dial.js:135:14)
    at nextTask (/Users/tyler/Desktop/Web/Colorglyph-2.0/colorglyph-express/node_modules/async/waterfall.js:16:14)

@caffeinum
Copy link

I have this issue too. We do use pubsub-room. I have the last versions of js-ipfs, libp2p and libp2p-switch(=0.40.7).

I wrote to this issue first: #1366 (comment)

@th-ink
Copy link

th-ink commented Aug 14, 2018

Can confirm I get the same issue as well, using [email protected]

/home/jwatts/node_modules/pull-pair/index.js:11
      throw new Error('already piped')
      ^

Error: already piped
    at sink (/home/jwatts/node_modules/pull-pair/index.js:11:13)
    at consume (/home/jwatts/node_modules/pull-defer/sink.js:7:17)
    at consume (/home/jwatts/node_modules/pull-defer/sink.js:7:17)
    at Connection.consume (/home/jwatts/node_modules/pull-defer/sink.js:7:17)
    at pull (/home/jwatts/node_modules/pull-stream/pull.js:43:9)
    at Dialer.handle (/home/jwatts/node_modules/multistream-select/src/dialer/index.js:47:5)
    at handleSafe (/home/jwatts/node_modules/libp2p-switch/src/dial.js:51:12)
    at Dialer._attemptMuxerUpgrade (/home/jwatts/node_modules/libp2p-switch/src/dial.js:288:5)
    at Dialer._createMuxedConnection (/home/jwatts/node_modules/libp2p-switch/src/dial.js:252:10)
    at waterfall (/home/jwatts/node_modules/libp2p-switch/src/dial.js:139:14)

@jacobheun
Copy link
Contributor

The latest hotfix for multistream-select, 0.14.3, should prevent the error from being thrown. It will now be caught and logged. I will continue testing this to see if the issue comes up. Once you have [email protected] (new installs should get it), if you do hit this issue, please scream in my general direction with logs and I will take a look!

Just fyi, I have been testing this against pubsub-room, along with a few other sample projects and the error is being logged properly.

@th-ink
Copy link

th-ink commented Aug 15, 2018

thanks @jacobheun, I can confirm that I don't get the error with [email protected]

@mitra42
Copy link

mitra42 commented Aug 16, 2018

How is multistream-select included, I'm not seeing (any version) in package-lock.json , and did a fresh install (from npm, not from github) yesterday.

@jacobheun
Copy link
Contributor

It is used in libp2p (libp2p-switch and libp2p-circuit). npm ls should resolve it. I just did a fresh install from npm to verify.

└─┬ [email protected]
  ├─┬ [email protected]
  │ └─┬ [email protected]
  │   └── [email protected]  deduped
  └─┬ [email protected]
    └── [email protected]

@mitra42
Copy link

mitra42 commented Aug 17, 2018

Confirmed - looks like I installed just before the release. I'll watch for the already piped errors (which I've been seeing regularly up till now)

@ghost ghost removed the status/ready Ready to be worked label Sep 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

No branches or pull requests

9 participants