Upgrade puppeteer for HTTPResponse.stream() and measure it on non-HTML navigations

Open
#1,022 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, node.js
Domain
backend, testing

Research direction

The issue names the Puppeteer dependencies in packages/browserless, agent, and ai, and asks for a test against a local server. First check the current package manifests and test setup, then verify which Puppeteer release provides HTTPResponse.stream(). Measure received versus served bytes and whether streaming rejects for each listed navigation type; release browserless after recording the results.

Written by the indexing model from the issue text.

Description

claude --dangerously-skip-permissions --resume f585c3fe-624a-4f4c-9b28-edf7962e7046

—

Blocked on upstream: https://github.com/puppeteer/puppeteer/issues/7863

Puppeteer is adding HTTPResponse.stream(): Promise<ReadableStream<Uint8Array>>, built on the experimental CDP method Network.streamResourceContent (approved by OrKoN in the issue thread). It returns the data buffered so far and then streams the rest until loading finishes. It must be called from the response event, before loading finishes; after that it rejects. It is CDP only (BiDi throws UnsupportedOperation).

Tasks

  • Bump puppeteer (currently "25" in packages/browserless, agent, ai) to the first release that ships response.stream().

  • Measure, in a test against a local server, whether stream() returns the body when the main-frame navigation is:

    • application/pdf served from a URL without .pdf (PDF viewer case)
    • content-disposition: attachment (download case, goto ends in net::ERR_ABORTED)
    • an image or media type
    • a normal text/html document (baseline)

    Record per case: body bytes received vs. bytes served, and whether stream() rejected. This result decides whether microlinkhq/html-get can use it (see the linked html-get issue).

  • Release browserless so html-get and the API can pick it up.

Out of scope

page.pdf() / page.screenshot() output streaming. response.stream() covers network response bodies only. PDF output streaming is already available through page.createPDFStream(), and Page.captureScreenshot has no stream mode.

Dominant language
JavaScript
Stars
1.8k
Forks
90
Avg merge
5h 42m
Merged PRs (30d)
40

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microlinkhq/browserless

All issues in microlinkhq/browserless

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.