GopeedLab/gopeed · error · TypeError

ReadableStream is locked

Error message

ReadableStream is locked

What it means

Error "ReadableStream is locked" thrown in GopeedLab/gopeed.

Source

Thrown at pkg/download/engine/inject/stream/stream.js:150

            this._error(err);
          })
          .finally(() => {
            this._pulling = false;
            if (!this._closed && !this._errored && this._queue.length === 0 && this._waiters.length > 0) {
              this._maybePull();
            }
          });
      }

      _markBodyUsed() {
        if (typeof this.__gopeedMarkBodyUsed === "function") {
          this.__gopeedMarkBodyUsed();
        }
      }

      getReader() {
        if (this.locked) {
          throw new TypeError("ReadableStream is locked");
        }
        this.locked = true;
        this._reader = new ReadableStreamDefaultReader(this);
        return this._reader;
      }

      cancel(reason) {
        this._markBodyUsed();
        if (this._source && typeof this._source.cancel === "function") {
          return Promise.resolve(this._source.cancel(reason)).then(() => {
            this._close();
          });
        }
        this._close();
        return Promise.resolve();
      }

      async pipeTo(dest) {

View on GitHub (pinned to 7b7327ffb3)

When it happens

Trigger: Thrown at pkg/download/engine/inject/stream/stream.js:150 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of GopeedLab/gopeed@7b7327ffb3 (2026-08-16). Data as JSON: /api/errors/823202a56deafc6b. Report an issue: GitHub.