webtorrent: end-of-stream >=1.4.2 update creates a "premature close" error on seed() when using a W3C File input
What version of this package are you using? 0.107.16
What operating system, Node.js, and npm version? Mac OS 10.14.6 / Chrome 77.0.3865.90 or Safari 13 / Node 12.0.0 / npm 6.11.3
What happened?
On browser, when I call the seed method using a W3C File input, “end-of-stream” is throwing an error :
error Error: premature close
at onclosenexttick (webtorrent.min.js:12485)
at Item.run (webtorrent.min.js:3160)
at drainQueue (webtorrent.min.js:3130)
It adds the torrent in the WebTorrent client but the torrent.files === [] and torrent.done === false.
If I put the 1.4.1 end-of-stream package, there is no problem.
What did you expect to happen?
And the torrent.files should contain the input data and torrent.done should be true.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 8
- Comments: 16 (7 by maintainers)
Commits related to this issue
- downgrade end-of-stream to v1.4.1 The minor update in our version range was breaking. We can update it later when it's fixed. even without an NPM bump, this is patch is useful to just let the CI ... — committed to webtorrent/webtorrent by KayleePop 4 years ago
- downgrade end-of-stream to v1.4.1 The minor update in our version range was breaking. We can update it later when it's fixed. even without an NPM bump, this is patch is useful to just let the CI ... — committed to webtorrent/webtorrent by KayleePop 4 years ago
- Fix end-of-stream due to https://github.com/webtorrent/webtorrent/issues/1757 — committed to statechannels/statechannels by snario 4 years ago
- Fix end-of-stream due to https://github.com/webtorrent/webtorrent/issues/1757 — committed to statechannels/statechannels by snario 4 years ago
- [monorepo] Run yarn upgrade (#946) * Run yarn upgrade * Handle some upgrade issues * Fix some build typing issues * Fix a linting rule * Fix all version mismatches * Sync all package v... — committed to statechannels/statechannels by snario 4 years ago
- Pin readable-stream to workaround version. #50 Because of webtorrent/webtorrent#1757 — committed to chr15m/slingcode by chr15m 4 years ago
- Fix end-of-stream to 1.4.1 because of webtorrent issue https://github.com/webtorrent/webtorrent/issues/1757 — committed to statechannels/apps by snario 4 years ago
- [monorepo] Run yarn upgrade (#946) * Run yarn upgrade * Handle some upgrade issues * Fix some build typing issues * Fix a linting rule * Fix all version mismatches * Sync all package v... — committed to statechannels/statechannels by snario 4 years ago
@umbra-scientia Webtorrent just requires ^1.1.0 so what I ended up doing was explicitly requiring end-of-stream@1.4.1 in my dependencies, and that solved the problem for me. Hope it helps
yeah, works on my laptop but not my phone for some reason.
I don’t have any control over instant.io, but here’s a version on glitch.com that uses these PRs (that eliminate multistream as a dependency) https://github.com/webtorrent/create-torrent/pull/115, and https://github.com/webtorrent/webtorrent/pull/1832.
Nothing else is changed from the instant.io master branch except pulling those PRs from github for
webtorrentandcreate-torrentI also tried with just the
create-torrentPR, so pinning end of stream in webtorrent seems to work.