Js-ipfs: object.patch.addLink not returning

Created on 26 Apr 2017  路  7Comments  路  Source: ipfs/js-ipfs

If no encoding is specified, ex {enc: 'base58'}, this method never returns.
Node version: 7.4.0

dieasy help wanted kinbug

All 7 comments

Same issue for object.links

Thanks for reporting! Would you like to help us fixing it by adding some tests to https://github.com/ipfs/interface-ipfs-core/blob/master/src/object.js#L668 ?

Can you guide me to some docs, where can I find an IPFSFactory simple example for https://github.com/ipfs/interface-ipfs-core#nodejs? I found something on js-ipfs-api but there should be something out of the box available that I can plug and write the tests :)

Absolutely, the simplest way is to:

# git clone https://github.com/ipfs/js-ipfs
# git clone https://github.com/ipfs/interface-ipfs-core
# inside interface-ipfs-core folder
> npm install
> npm link
# inside js-ipfs folder
> npm install
> npm link interface-ipfs-core
# then simply modify the tests on the interface-ipfs-core object.js file --
 https://github.com/ipfs/interface-ipfs-core/blob/master/src/object.js#L17-L35 -- and then to run the do `npm test` in the js-ipfs folder.

I found the problem, when I'm passing an ipfs hash as string and I'm not specifying any encoding it silent fails. This solves the problem. Should I open a pull request? Also I'm preparing some tests for interface-ipfs-core regarding this issue.

@kenshyx yes please :) thanks for catching that!

@kenshyx I believe this all got fixed and tests are https://github.com/ipfs/interface-ipfs-core/pull/139, correct?

Closing this issue, let me know if I missed something.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daviddias picture daviddias  路  3Comments

mnts picture mnts  路  3Comments

OliverUv picture OliverUv  路  3Comments

beingmohit picture beingmohit  路  3Comments

dryajov picture dryajov  路  3Comments