Error message when calling controller.enqueue() in a closed TransformStream is unhelpful |
|||||
Issue descriptionChrome Version : 73.0.3629.0 OS Version: OS X 10.14.1 Repro: https://jsbin.com/milodov/1/edit?js,console ``` new ReadableStream({ start(controller) { controller.close(); } }).pipeThrough(new TransformStream({ start(controller) { setTimeout(() => { // stream is already closed controller.enqueue('lol'); }, 100); } })).pipeTo(new WritableStream({ write(c) { console.log(c); } })); ``` What is the expected result? An error along the lines of: “Cannot enqueue a chunk into a transform stream that is closed or has been requested to be closed” What happens instead of that? “Uncaught TypeError: Cannot read property 'Symbol(bit field for [[started]], [[closeRequested]], [[pulling]], [[pullAgain]])' of undefined” UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
,
Dec 4
surma@ Thanks for the issue. Able to reproduce the issue on Windows 10, Mac OS 10.13.6 and Ubuntu 17.10 on the reported version 73.0.3629.0 and the latest Stable 70.0.3538.110. But on M-60 chrome build, can observe a different error. Attached are the screen shots for reference. Request you to check and confirm if M-60 build is a good behavior or bad behavior, which will help in further triaging. Thanks..
,
Dec 4
Yes, TransformStreams weren’t shipped in M60, they were shipped in M64. (May I ask why M60 is relevant?)
,
Dec 4
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 5
We are considering chrome M-60 as a base milestone to consider the issue as Regression or Non-Regression. Able to reproduce the issue on chrome version# 70.03.538.110 and on latest chrome# 73.0.3630.0 with URL provided in comment# 0. As per screenshots provided in comment# 2, seen same behavior from M-60 to M-67(refer screenshot 911051-M60 in c# 2) and another behavior from M-67 to M-73(refer screenshot 911051-Canary). As we are able to reproduce the issue on latest builds, hence marking this issue as Untriaged. Thanks!
,
Dec 12
Good catch, triaging. There may be a badder bug here revealed by this error. Up to ricea@ to determine the priority.
,
Dec 12
The bug is here: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/streams/TransformStream.js?type=cs&q=TransformStream:343&sq=package:chromium&g=0&l=343 There should be two arguments to getReadableStreamEnqueueError(). Our tests didn't catch this because we consider any TypeError to be a pass. I will add a Chromium-specific test to make sure we don't regress this in future. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by phanindra.mandapaka@chromium.org
, Dec 3