-
Notifications
You must be signed in to change notification settings - Fork 298
go-ipfs sometimes closes the stream preemptively #339
Comments
@diasdavid @dignifiedquire could you find a way to reproduce this with a simple curl command? I guess i'm just not very good at javascript but i have trouble even getting these tests to run, consistently hitting new and exciting problems. |
After we talked and you getting the test to run, are you still getting that issue? |
apparently i just needed to rerun it a few times for the tests to run. I was having issues with karma and chrome, but a few more tries and it started running the tests. |
A relevant note: this has only been reproduced in the browser testing. |
might be related to: ipfs/kubo#2112 Which i can only reproduce using ipfs 0.4.2 or earlier. |
Still seeing the same problem in 0.4.3. |
@diasdavid thanks for checking. |
@whyrusleeping anything else I can do to help with this bug? |
Any developments? |
@keks, @whyrusleeping mentioned that you found an issue on the http-api that might be the root of this problem (about closing the multipart stream), does it ring a bell? |
Spoke too soon. This is still a thing, although less frequently! |
I think I might be running into this error, but it happens every time for me. I made a quick and dirty paired down testcase here: https://github.com/GTRI-nathan/js-ipfs-api-test Thanks! |
I think the same was happening to me. When I try to create a directory of files using I get the error from my daemon'expected at least one child dir'. But outside of an array of objects, it's working completely fine. Not sure if this is the same problem but it seemed similar since it would just stop and not return any errors. Working around it with using ipfs.files.mkdir and write. |
License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io>
License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io>
License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io>
License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io>
* feat: uses modular interface tests Reduces code repetition, allows test skipping and running only some tests. License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * feat: skip unimplemented files tests and add ls* tests License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix: adds skips for #339 License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix: adds skips for key and miscellaneous License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * feat: add types and util tests (skipped as currently failing) License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * feat: add pin tests License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix(pubsub): adds skips for tests on windows License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix(config): adds skip for config.replace License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: re-adds bitswap tests License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: move detect-node back to dependencies License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: add skip reasons License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: update interface-ipfs-core dependency License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: add reason for pubsub in browser skips License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: add bitswap skips for offline errors License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix: remove skip for test that was removed License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: update interface-ipfs-core version License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: update deps and test on CI (#802) * chore: update interface-ipfs-core * fix(dag): `dag.put()` allows for optional options (#801) * fix(dag): ensure `dag.put()` allows for optional options This is to align with API changes made in ipfs-inactive/interface-js-ipfs-core@011c417 and ipfs/js-ipfs#1415 License: MIT Signed-off-by: Pascal Precht <pascal.precht@gmail.com> * fix(dag): fixes to allow options to be optional License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: update interface-ipfs-core dependency License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: update ipfsd-ctl dependency License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix: increase timeout for addFromURL with wrap-with-directory Sadly we can't guarantee ipfs.io will respond within 5s License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix: skip bitswap offline tests on all platforms The offline tests create and stop a node. ipfs/kubo#4078 seems to not only be restricted to windows. License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io>
* feat: uses modular interface tests Reduces code repetition, allows test skipping and running only some tests. License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * feat: skip unimplemented files tests and add ls* tests License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix: adds skips for ipfs-inactive#339 License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix: adds skips for key and miscellaneous License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * feat: add types and util tests (skipped as currently failing) License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * feat: add pin tests License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix(pubsub): adds skips for tests on windows License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix(config): adds skip for config.replace License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: re-adds bitswap tests License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: move detect-node back to dependencies License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: add skip reasons License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: update interface-ipfs-core dependency License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: add reason for pubsub in browser skips License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: add bitswap skips for offline errors License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix: remove skip for test that was removed License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: update interface-ipfs-core version License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: update deps and test on CI (ipfs-inactive#802) * chore: update interface-ipfs-core * fix(dag): `dag.put()` allows for optional options (ipfs-inactive#801) * fix(dag): ensure `dag.put()` allows for optional options This is to align with API changes made in ipfs-inactive/interface-js-ipfs-core@011c417 and ipfs/js-ipfs#1415 License: MIT Signed-off-by: Pascal Precht <pascal.precht@gmail.com> * fix(dag): fixes to allow options to be optional License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: update interface-ipfs-core dependency License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * chore: update ipfsd-ctl dependency License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix: increase timeout for addFromURL with wrap-with-directory Sadly we can't guarantee ipfs.io will respond within 5s License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io> * fix: skip bitswap offline tests on all platforms The offline tests create and stop a node. ipfs/kubo#4078 seems to not only be restricted to windows. License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io>
This issue is very stale so I'm going to close it. Tests were previously skipped for this PR but aren't any more. Please open a new issue against ipfs/js-ipfs if you still see it. |
From: #337 (comment)
Ok, I thought I had fixed the adding dirs on the browser, but then realised that there is a bug that only happens sometimes (like 1 out of 20), where we don't receive all the hashes for the files added.
I thought this could be an js-ipfs-api problem, but further testing (and some fixes) narrowed down the problem to how go-ipfs is responding, even when requests are 100% the same, the response may differ.
The failing failing test is: https://github.com/ipfs/interface-ipfs-core/blob/feat/ipfs.files.get/src/files.js#L113-L143 (again: just fails in the browser and some of the times)
(left -> success; center -> fails)
Full request + response of a Success
Full request + response of a Failure
wireshark pcap (filter for HTTP and then look for the POST /add
How to reproduce
The text was updated successfully, but these errors were encountered: