New issue
Advanced search Search tips

Issue 911051 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Error message when calling controller.enqueue() in a closed TransformStream is unhelpful

Project Member Reported by surma@chromium.org, Dec 3

Issue description

Chrome 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



 
Labels: Needs-Triage-M73
Cc: susan.boorgula@chromium.org
Labels: Needs-Feedback Triaged-ET
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.. 
911051-Canary.PNG
76.6 KB View Download
911051-M60.PNG
66.1 KB View Download
Yes, TransformStreams weren’t shipped in M60, they were shipped in M64. (May I ask why M60 is relevant?)
Project Member

Comment 4 by sheriffbot@chromium.org, Dec 4

Labels: -Needs-Feedback
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
Cc: viswa.karala@chromium.org
Labels: M-73 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
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!
Components: -Blink>JavaScript Blink>Network>StreamsAPI
Owner: ricea@chromium.org
Status: Assigned (was: Untriaged)
Good catch, triaging. There may be a badder bug here revealed by this error. Up to ricea@ to determine the priority.
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