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

end-of-stream >=1.4.2 update creates a "premature close" error on seed() when using a W3C File input #1757

Open
Evoks opened this issue Oct 10, 2019 · 3 comments

Comments

@Evoks
Copy link

@Evoks Evoks commented Oct 10, 2019

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.

@Evoks Evoks changed the title end-of-stream >1.4.2 update creates a "premature close" error on seed() when using a W3C File input end-of-stream >=1.4.2 update creates a "premature close" error on seed() when using a W3C File input Oct 10, 2019
@alxhotel

This comment has been minimized.

Copy link
Member

@alxhotel alxhotel commented Oct 28, 2019

Yep. Thanks for notifying this @Evoks.

Looks like end-of-stream has added some incompatible changes in the last versions. Related end-of-stream#11

@umbra-scientia

This comment has been minimized.

Copy link

@umbra-scientia umbra-scientia commented Dec 15, 2019

Is there any plan for this issue to be solved? Is there a known workaround to make the most minimal upload functionality work at least? All examples and documentation for uploading a file are broken out of the box using the latest release versions. Always "premature close" in the console after a short delay.

EDIT: The occasional rare file will consistently work correctly, but it seems unpredictable which files are working. This behavior can be observed on instant.io using Chromium 70.

@lovvtide

This comment has been minimized.

Copy link

@lovvtide lovvtide commented Dec 29, 2019

@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

KayleePop added a commit that referenced this issue Jan 3, 2020
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 tests work

issue: #1757 (should maybe keep that open until we can re-enable updates for the package though)
KayleePop added a commit that referenced this issue Jan 3, 2020
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 tests work

issue: #1757 (should maybe keep that open until we can re-enable updates for the package though)
snario added a commit to statechannels/monorepo that referenced this issue Jan 30, 2020
snario added a commit to statechannels/monorepo that referenced this issue Jan 31, 2020
snario added a commit to statechannels/monorepo that referenced this issue Jan 31, 2020
* Run yarn upgrade

* Handle some upgrade issues

* Fix some build typing issues

* Fix a linting rule

* Fix all version mismatches

* Sync all package versions

* Fix some webpack ts loader issues

* Fix rps react testing issue

* Fix wallet gas test

* Revert web3torrent

* Clean up dependencies

* Fix end-of-stream due to webtorrent/webtorrent#1757

* ignore '@typescript-eslint/ban-ts-ignore': 'off',

* Downgrade react-dev-utils

* Remove rps.ts script

* Update package semvers

* Sync versions

* Fix end-of-stream

* Upgrade ethers to 0.4.44

* Set terser parallel to false on CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.