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
[Bug]: protocol.handle unexpected behavior when request.body is a ReadableStream #39658
Closed
3 tasks done
Labels
26-x-y
bug 🪲
has-repro-gist
Issue can be reproduced with code at https://gist.github.com/
platform/windows
status/confirmed
A maintainer reproduced the bug or agreed with the feature
Comments
VerteDinde
added
platform/windows
has-repro-gist
Issue can be reproduced with code at https://gist.github.com/
26-x-y
labels
Sep 4, 2023
codebytere
added
the
status/confirmed
A maintainer reproduced the bug or agreed with the feature
label
Sep 6, 2023
BurningEnlightenment
added a commit
to BurningEnlightenment/electron
that referenced
this issue
Jan 18, 2024
BurningEnlightenment
added a commit
to BurningEnlightenment/electron
that referenced
this issue
Jan 18, 2024
4 tasks
zcbenz
pushed a commit
to BurningEnlightenment/electron
that referenced
this issue
Feb 8, 2024
BurningEnlightenment
added a commit
to BurningEnlightenment/electron
that referenced
this issue
Feb 14, 2024
jkleinsc
pushed a commit
that referenced
this issue
Feb 16, 2024
* refactor(protocol): extract file stream factory Increase readability by moving the file stream creation logic out of the `uploadData` to request body conversion function. * fix: properly flatten streams in `protocol.handle()` Refs: #39658 * fix: `protocol.handle()` filter null origin header Refs: #40754 * fix: remove obsolete TODO comment Refs: #38929 * fix: forward `Blob` parts in `protocol.handle()` Refs: #40826 * fix: explicitly error out on unknown chunk parts
trop bot
added a commit
that referenced
this issue
Feb 16, 2024
Refs: #39658 Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com>
trop bot
added a commit
that referenced
this issue
Feb 16, 2024
Refs: #39658 Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com>
VerteDinde
pushed a commit
that referenced
this issue
Feb 19, 2024
* refactor(protocol): extract file stream factory Increase readability by moving the file stream creation logic out of the `uploadData` to request body conversion function. Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com> * fix: properly flatten streams in `protocol.handle()` Refs: #39658 Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com> * fix: `protocol.handle()` filter null origin header Refs: #40754 Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com> * fix: remove obsolete TODO comment Refs: #38929 Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com> * fix: forward `Blob` parts in `protocol.handle()` Refs: #40826 Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com> * fix: explicitly error out on unknown chunk parts Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com>
mnvr
added a commit
to ente-io/ente
that referenced
this issue
Apr 16, 2024
This was primarily for getting the latest Electron, but I ran `yarn upgrade-interactive` and upgraded the other non-breaking deps (mostly dev) too. Reason for wanting electron is to try and see if this backport fixes the issue with our streams not getting faithfully written: electron/electron#41052 In some ad-hoc and quick testing, I noticed that the new `writeStream` we've implemented works fine for files up to 128 K, presumably some chunk size, but then begins to diverge. Sounds similar (but not exactly the same) as this issue: electron/electron#39658 Unfortunately, this didn't fix the issue we're facing, so our case is perhaps different.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
26-x-y
bug 🪲
has-repro-gist
Issue can be reproduced with code at https://gist.github.com/
platform/windows
status/confirmed
A maintainer reproduced the bug or agreed with the feature
Preflight Checklist
Electron Version
26.1.0
What operating system are you using?
Windows
Operating System Version
Windows 11 22H2
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
Iterating on a
ReadableStream
insideprotocol.handle
should not output anything except what is fed into the stream.Actual Behavior
Currently, doing this outputs a bunch of
undefined
entries when it shouldn'tFor some reason, the first few logs are correct outputting
Uint8Array
as expected but it eventually starts outputtingundefined
:The main problem is that such a
ReadableStream
is not accepted bynet.fetch
orfetch
and they crash with the following error:On the browser side, I am doing a simple fetch like so:
Testcase Gist URL
https://gist.github.com/thecodrr/ddabb97be1e93435f9e25dcfab76876e
Additional Information
No response
The text was updated successfully, but these errors were encountered: