-
Notifications
You must be signed in to change notification settings - Fork 1.2k
files.cat function is not executing or logging anything #1013
Comments
Hi @admazzola. This looks like a bug. A quick way to solve it is just to put the node.files.cat inside the callback for .on('ready'). Seems that bitswap is dropping requests before the node is online. Let me know if this works. |
Thanks for looking at this ! Yeah it seems like a bug I cant figure it out. I tried using the .on(ready) callback and it still doesnt work. Any other possibilities ? Could it be my environment?
|
Which version are you using? I believe you are hitting #959 (comment) which should be fixed by default on the latest js-ipfs version I just tried running your code locally and worked for me |
Thanks for the help! Well I did get this working. It seems like I had used 'ipfs daemon' to upload my file and it wasnt synchroning with my javascript instance of IPFS so that instance didn't have the file. Oddly enough, it did not throw an error it just froze up and never did anything. Does the 'cat' function just freeze up if it can't find the file with that multihash on the network ? If so it seems like it would be nice to have a way to trigger a callback or error when it cannot find the file. |
Awesome @admazzola! re: timeouts. Yes, that is one of the things we still have open for discussion, we definitely want to have it, just want to make sure to do it right as we don't have context like in go -> https://github.com/ipfs/interface-ipfs-core/issues/58 |
Closing this issue as the problem was solved. Continue the timeout convo here https://github.com/ipfs/interface-ipfs-core/issues/58 |
When I run this code, the 'WHY ISNT THIS FIRING' never appears in my console. How can that be? No errors appear either. Nothing really it just locks up.
The text was updated successfully, but these errors were encountered: