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

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

Security context: 0x35a32fcaeae9 <SharedWorkerGlobalScope map = 0x24862b70cc81>#0#
    2: logStackTrace [native prologue.js:1] [bytecode=0x3b5fb97066a1 offset=4](this=0x35a32fc9b621 <Object map = 0x24862b707429>#1#)
    4: TEMP_ASSERT(aka TEMP_ASSERT) [native WritableStream.js:112] [bytecode=0x35a32fce5a39 offset=55](this=0x1a997ce82311 <undefined>,predicate=0x1a997ce82421 <false>,message=0x3b5fb9705a79 <String[30]: controller.[[queue]] is empty.>)
    6: WritableStreamDefaultControllerProcessClose(aka WritableStreamDefaultControllerProcessClose) [native WritableStream.js:633] [bytecode=0x3b5fb9705d89 offset=169](this=0x1a997ce82311 <undefined>,controller=0x35064e947fa1 <WritableStreamDefaultController map = 0x24862b715029>#2#)
    8: WritableStreamDefaultControllerAdvanceQueueIfNeeded(aka WritableStreamDefaultControllerAdvanceQueueIfNeeded) [native WritableStream.js:616] [bytecode=0x35a32fce8e71 offset=206](this=0x1a997ce82311 <undefined>,controller=0x35064e947fa1 <WritableStreamDefaultController map = 0x24862b715029>#2#)
   10: onFulfilled(aka onFulfilled) [native WritableStream.js:532] [bytecode=0x35a32fcea2a1 offset=58](this=0x1a997ce82311 <undefined>)
   11: arguments adaptor frame: 1->0
   12: /* anonymous */(aka /* anonymous */)(this=0x1a997ce82311 <undefined>)

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

[2]: logStackTrace [native prologue.js:1] [bytecode=0x3b5fb97066a1 offset=4](this=0x35a32fc9b621 <Object map = 0x24862b707429>#1#) {
  // expression stack (top to bottom)
  [00] : 0x35a32fc9b9b1 <JSFunction logStackTrace (sfi = 0x1a997ce89871)>#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=0x35a32fce5a39 offset=55](this=0x1a997ce82311 <undefined>,predicate=0x1a997ce82421 <false>,message=0x3b5fb9705a79 <String[30]: controller.[[queue]] is empty.>) {
  // stack-allocated locals
  var /* anonymous */ = 0x1a997ce82311 <undefined>
  var WritableStreamInternalError = 0x1a997ce82311 <undefined>
  // expression stack (top to bottom)
  [07] : 0x1a997ce82311 <undefined>
  [06] : 0x1a997ce82311 <undefined>
  [05] : 0x35064e9496f1 <String[49]\: Assertion failed: controller.[[queue]] is empty.\n>
  [04] : 0x35a32fc9b621 <Object map = 0x24862b707429>#1#
  [03] : 0x35a32fc9b9b1 <JSFunction logStackTrace (sfi = 0x1a997ce89871)>#3#
  [02] : 0x1a997ce82351 <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=0x3b5fb9705d89 offset=169](this=0x1a997ce82311 <undefined>,controller=0x35064e947fa1 <WritableStreamDefaultController map = 0x24862b715029>#2#) {
  // stack-allocated locals
  var sinkClosePromise = 0x1a997ce82351 <the_hole>
  // heap-allocated locals
  var controller = 0x35064e947fa1 <WritableStreamDefaultController map = 0x24862b715029>#2#
  var stream = 0x35064e947e41 <WritableStream map = 0x24862b714581>#4#
  // expression stack (top to bottom)
  [07] : 0x1a997ce82311 <undefined>
  [06] : 0x1a997ce82311 <undefined>
  [05] : 0x3b5fb9705a79 <String[30]: controller.[[queue]] is empty.>
  [04] : 0x1a997ce82421 <false>
  [03] : 0x1a997ce82311 <undefined>
  [02] : 0x35064e913ef1 <JSFunction TEMP_ASSERT (sfi = 0x35a32fcb5f49)>#5#
  [01] : 0x35064e913881 <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=0x35a32fce8e71 offset=206](this=0x1a997ce82311 <undefined>,controller=0x35064e947fa1 <WritableStreamDefaultController map = 0x24862b715029>#2#) {
  // stack-allocated locals
  var state = 1
  var writeRecord = 0x1a997cea5319 <String[5]: close>
  // expression stack (top to bottom)
  [05] : 0x1a997ce82311 <undefined>
  [04] : 0x35064e9480a1 <SimpleQueue map = 0x24862b714059>#7#
  [03] : 0x1a997ce82311 <undefined>
  [02] : 0x35064e914719 <JSFunction WritableStreamDefaultControllerProcessClose (sfi = 0x35a32fcb76d9)>#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=0x35a32fcea2a1 offset=58](this=0x1a997ce82311 <undefined>) {
  // expression stack (top to bottom)
  [03] : 0x1a997ce823b1 <true>
  [02] : 0x35064e947fa1 <WritableStreamDefaultController map = 0x24862b715029>#2#
  [01] : 0x1a997ce82311 <undefined>
  [00] : 0x35064e914689 <JSFunction WritableStreamDefaultControllerAdvanceQueueIfNeeded (sfi = 0x35a32fcb7539)>#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] : 0x1a997ce82311 <undefined>  // not passed to callee
}

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

 #0# 0x35a32fcaeae9: 0x35a32fcaeae9 <SharedWorkerGlobalScope map = 0x24862b70cc81>
 #1# 0x35a32fc9b621: 0x35a32fc9b621 <Object map = 0x24862b707429>
 #2# 0x35064e947fa1: 0x35064e947fa1 <WritableStreamDefaultController map = 0x24862b715029>
 #3# 0x35a32fc9b9b1: 0x35a32fc9b9b1 <JSFunction logStackTrace (sfi = 0x1a997ce89871)>
 #4# 0x35064e947e41: 0x35064e947e41 <WritableStream map = 0x24862b714581>
        controller: 0x35064e947fa1 <WritableStreamDefaultController map = 0x24862b715029>#2#
            events: 0x35064e948491 <JSArray[0]>#10#
 #5# 0x35064e913ef1: 0x35064e913ef1 <JSFunction TEMP_ASSERT (sfi = 0x35a32fcb5f49)>
 #6# 0x35064e913881: 0x35064e913881 <FixedArray[105]>
                 0: 0x35064e913839 <JSFunction (sfi = 0x35a32fcb5589)>#11#
                 1: 0x35a32fc86ac1 <FixedArray[259]>#12#
                 3: 0x35a32fc86ac1 <FixedArray[259]>#12#
                 4: 0x35a32fc9b621 <Object map = 0x24862b707429>#1#
                 5: 0x35a32fc9bba9 <Object map = 0x24862b70deb9>#13#
                 6: 0x35a32fcbabc9 <Symbol: [[pendingWriteRequest]]>#14#
                 7: 0x35a32fcbac01 <Symbol: [[pendingCloseRequest]]>#15#
                 8: 0x35a32fcbac39 <Symbol: [[pendingAbortRequest]]>#16#
                 9: 0x35a32fcbac71 <Symbol: [[state]]>#17#
                  ...
 #7# 0x35064e9480a1: 0x35064e9480a1 <SimpleQueue map = 0x24862b714059>
             front: 0x35064e9480d9 <Object map = 0x24862b713ef9>#18#
              back: 0x35064e9480d9 <Object map = 0x24862b713ef9>#18#
