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

[Not a PR] Problems with latest IPFS #38

Closed

Conversation

isaackwan
Copy link

Was trying to use IPFS on master due to ipfs/js-ipfs#938.

But it's not working, with tests failing:

TypeError: peerAddress.peer.id.toB58String is not a function
at peersAddresses.filter (src/connection.js:81:56)
at Array.filter (<anonymous>)
at _ipfs.swarm.peers (src/connection.js:81:12)
at Function.peers.promisify (node_modules/ipfs/src/core/components/swarm.js:43:7)
at Object.peers (node_modules/promisify-es6/index.js:32:27)
at Connection._getPeerAddresses (src/connection.js:72:22)
at Connection._getConnection (src/connection.js:39:10)
at Connection.push (src/connection.js:26:14)
at PubSubRoom.sendTo (src/index.js:103:10)
at Context.it (test/room.spec.js:131:15)

This is not a PR, but I have updated the package.json to use the master branch of IPFS (including Yarn lock file so you can see the exact version used) so that error messages can be reproduced on CI.

@isaackwan
Copy link
Author

isaackwan commented May 2, 2018

So the right way to fix this is:

.filter((peerAddress) => peerAddress.peer.toB58String() === peerId)

I am not going to open a PR for this because I am not sure if this is available across versions, backward compatibility, etc, but do let me know if I can help.

Cheers!

@pgte
Copy link
Contributor

pgte commented May 3, 2018

@isaackwan thank you for reporting this!
�Looking into this now.

@pgte
Copy link
Contributor

pgte commented May 3, 2018

Fixed in #39 and landed on v1.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants