Assertion failed: controller.[[queue]] is empty.

==== JS stack trace =========================================

Security context: 0x26400feaf0a9 <SharedWorkerGlobalScope map = 0x3736ac78ce39>#0#
    2: logStackTrace [native prologue.js:1] [bytecode=0xb31e3486219 offset=4](this=0x26400fe9b651 <Object map = 0x3736ac787429>#1#)
    4: TEMP_ASSERT(aka TEMP_ASSERT) [native WritableStream.js:112] [bytecode=0x26400fee5561 offset=55](this=0x2b2f26702311 <undefined>,predicate=0x2b2f26702421 <false>,message=0xb31e34855f1 <String[30]: controller.[[queue]] is empty.>)
    6: WritableStreamDefaultControllerProcessClose(aka WritableStreamDefaultControllerProcessClose) [native WritableStream.js:633] [bytecode=0xb31e3485901 offset=169](this=0x2b2f26702311 <undefined>,controller=0x33c57a5476e1 <WritableStreamDefaultController map = 0x3736ac794dc1>#2#)
    8: WritableStreamDefaultControllerAdvanceQueueIfNeeded(aka WritableStreamDefaultControllerAdvanceQueueIfNeeded) [native WritableStream.js:616] [bytecode=0x26400fee8999 offset=206](this=0x2b2f26702311 <undefined>,controller=0x33c57a5476e1 <WritableStreamDefaultController map = 0x3736ac794dc1>#2#)
   10: onFulfilled(aka onFulfilled) [native WritableStream.js:532] [bytecode=0x26400fee9dc9 offset=58](this=0x2b2f26702311 <undefined>)
   11: arguments adaptor frame: 1->0
   12: /* anonymous */(aka /* anonymous */)(this=0x2b2f26702311 <undefined>)

==== Details ================================================

[2]: logStackTrace [native prologue.js:1] [bytecode=0xb31e3486219 offset=4](this=0x26400fe9b651 <Object map = 0x3736ac787429>#1#) {
  // expression stack (top to bottom)
  [00] : 0x26400fe9b9e1 <JSFunction logStackTrace (sfi = 0x2b2f26709871)>#3#
--------- s o u r c e   c o d e ---------
function logStackTrace(){\x0a%DebugTrace();\x0a}
-----------------------------------------
}

[4]: TEMP_ASSERT(aka TEMP_ASSERT) [native WritableStream.js:112] [bytecode=0x26400fee5561 offset=55](this=0x2b2f26702311 <undefined>,predicate=0x2b2f26702421 <false>,message=0xb31e34855f1 <String[30]: controller.[[queue]] is empty.>) {
  // stack-allocated locals
  var /* anonymous */ = 0x2b2f26702311 <undefined>
  var WritableStreamInternalError = 0x2b2f26702311 <undefined>
  // expression stack (top to bottom)
  [07] : 0x2b2f26702311 <undefined>
  [06] : 0x2b2f26702311 <undefined>
  [05] : 0x33c57a548e31 <String[49]\: Assertion failed: controller.[[queue]] is empty.\n>
  [04] : 0x26400fe9b651 <Object map = 0x3736ac787429>#1#
  [03] : 0x26400fe9b9e1 <JSFunction logStackTrace (sfi = 0x2b2f26709871)>#3#
  [02] : 0x2b2f26702351 <the_hole>
--------- s o u r c e   c o d e ---------
function TEMP_ASSERT(predicate, message) {\x0a    if (predicate) {\x0a      return;\x0a    }\x0a    v8.log(`Assertion failed: ${message}\n`);\x0a    v8.logStackTrace();\x0a    class WritableStreamInternalError extends Error {\x0a      constructor(message) {\x0a        super(message);\x0a      }\x0a    }\x0a    throw new WritableStreamInternalError(mes...

-----------------------------------------
}

[6]: WritableStreamDefaultControllerProcessClose(aka WritableStreamDefaultControllerProcessClose) [native WritableStream.js:633] [bytecode=0xb31e3485901 offset=169](this=0x2b2f26702311 <undefined>,controller=0x33c57a5476e1 <WritableStreamDefaultController map = 0x3736ac794dc1>#2#) {
  // stack-allocated locals
  var sinkClosePromise = 0x2b2f26702351 <the_hole>
  // heap-allocated locals
  var controller = 0x33c57a5476e1 <WritableStreamDefaultController map = 0x3736ac794dc1>#2#
  var stream = 0x33c57a547581 <WritableStream map = 0x3736ac794319>#4#
  // expression stack (top to bottom)
  [07] : 0x2b2f26702311 <undefined>
  [06] : 0x2b2f26702311 <undefined>
  [05] : 0xb31e34855f1 <String[30]: controller.[[queue]] is empty.>
  [04] : 0x2b2f26702421 <false>
  [03] : 0x2b2f26702311 <undefined>
  [02] : 0x33c57a513f69 <JSFunction TEMP_ASSERT (sfi = 0x26400feb6509)>#5#
  [01] : 0x33c57a5138f9 <FixedArray[105]>#6#
--------- s o u r c e   c o d e ---------
function WritableStreamDefaultControllerProcessClose(controller) {\x0a    const stream = controller[_controlledWritableStream];\x0a    TEMP_ASSERT(stream[_state] === CLOSING,\x0a                'stream.[[state]] is "closing".');\x0a    DequeueValueForController(controller);\x0a    TEMP_ASSERT(controller[_queue].length === 0,\x0a                'controller.[[queue]] is...

-----------------------------------------
}

[8]: WritableStreamDefaultControllerAdvanceQueueIfNeeded(aka WritableStreamDefaultControllerAdvanceQueueIfNeeded) [native WritableStream.js:616] [bytecode=0x26400fee8999 offset=206](this=0x2b2f26702311 <undefined>,controller=0x33c57a5476e1 <WritableStreamDefaultController map = 0x3736ac794dc1>#2#) {
  // stack-allocated locals
  var state = 1
  var writeRecord = 0x2b2f26725319 <String[5]: close>
  // expression stack (top to bottom)
  [05] : 0x2b2f26702311 <undefined>
  [04] : 0x33c57a5477e1 <SimpleQueue map = 0x3736ac793df1>#7#
  [03] : 0x2b2f26702311 <undefined>
  [02] : 0x33c57a514791 <JSFunction WritableStreamDefaultControllerProcessClose (sfi = 0x26400feb7c99)>#8#
--------- s o u r c e   c o d e ---------
function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) {\x0a    const state = controller[_controlledWritableStream][_state];\x0a    if (state === CLOSED || state === ERRORED) {\x0a      return;\x0a    }\x0a    if (!getDefaultControllerStartedFlag(controller)) {\x0a      return;\x0a    }\x0a    if (getDefaultControllerWritingFlag(controller)) {\x0a      return;\x0a    }\x0a...

-----------------------------------------
}

[10]: onFulfilled(aka onFulfilled) [native WritableStream.js:532] [bytecode=0x26400fee9dc9 offset=58](this=0x2b2f26702311 <undefined>) {
  // expression stack (top to bottom)
  [03] : 0x2b2f267023b1 <true>
  [02] : 0x33c57a5476e1 <WritableStreamDefaultController map = 0x3736ac794dc1>#2#
  [01] : 0x2b2f26702311 <undefined>
  [00] : 0x33c57a514701 <JSFunction WritableStreamDefaultControllerAdvanceQueueIfNeeded (sfi = 0x26400feb7af9)>#9#
--------- s o u r c e   c o d e ---------
function onFulfilled() => {\x0a        setDefaultControllerStartedFlag(controller, true);\x0a        WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);\x0a      }
-----------------------------------------
}

[11]: arguments adaptor frame: 1->0 {
  // actual arguments
  [00] : 0x2b2f26702311 <undefined>  // not passed to callee
}

[12]: /* anonymous */(aka /* anonymous */)(this=0x2b2f26702311 <undefined>) {
// optimized frame
--------- s o u r c e   c o d e ---------
<No Source>
-----------------------------------------
}
==== Key         ============================================

 #0# 0x26400feaf0a9: 0x26400feaf0a9 <SharedWorkerGlobalScope map = 0x3736ac78ce39>
 #1# 0x26400fe9b651: 0x26400fe9b651 <Object map = 0x3736ac787429>
 #2# 0x33c57a5476e1: 0x33c57a5476e1 <WritableStreamDefaultController map = 0x3736ac794dc1>
 #3# 0x26400fe9b9e1: 0x26400fe9b9e1 <JSFunction logStackTrace (sfi = 0x2b2f26709871)>
 #4# 0x33c57a547581: 0x33c57a547581 <WritableStream map = 0x3736ac794319>
        controller: 0x33c57a5476e1 <WritableStreamDefaultController map = 0x3736ac794dc1>#2#
            events: 0x33c57a547bd1 <JSArray[0]>#10#
 #5# 0x33c57a513f69: 0x33c57a513f69 <JSFunction TEMP_ASSERT (sfi = 0x26400feb6509)>
 #6# 0x33c57a5138f9: 0x33c57a5138f9 <FixedArray[105]>
                 0: 0x33c57a5138b1 <JSFunction (sfi = 0x26400feb5b49)>#11#
                 1: 0x26400fe86ac1 <FixedArray[265]>#12#
                 3: 0x26400fe86ac1 <FixedArray[265]>#12#
                 4: 0x26400fe9b651 <Object map = 0x3736ac787429>#1#
                 5: 0x26400fe9bbd9 <Object map = 0x3736ac78e071>#13#
                 6: 0x26400febb189 <Symbol: [[pendingWriteRequest]]>#14#
                 7: 0x26400febb1c1 <Symbol: [[pendingCloseRequest]]>#15#
                 8: 0x26400febb1f9 <Symbol: [[pendingAbortRequest]]>#16#
                 9: 0x26400febb231 <Symbol: [[state]]>#17#
                  ...
 #7# 0x33c57a5477e1: 0x33c57a5477e1 <SimpleQueue map = 0x3736ac793df1>
             front: 0x33c57a547819 <Object map = 0x3736ac793c91>#18#
              back: 0x33c57a547819 <Object map = 0x3736ac793c91>#18#
       