Skip to content

[Bug]: route.continue() works but route.fetch() with route.fulfill() times out #31037

Description

Version

1.44.1

Steps to reproduce

  1. Clone my repo at https://github.com/dpacmittal/playwright-timeout-bug
  2. Run npm install
  3. Run ts-node index.ts

Expected behavior

route.fetch() then route.fulfill() should behave exactly the same as route.continue() and should not time out.

Actual behavior

route.fetch() times out

Additional context

This happens on chromium (and chrome, chrome-beta). Firefox works fine.

If I add Connection: keep-alive header, it starts working normally.

const response = await route.fetch({
   headers: {
     Connection: "keep-alive",
   },
});

Environment

System:
    OS: macOS 14.2
    CPU: (12) arm64 Apple M2 Max
    Memory: 69.70 MB / 32.00 GB
  Binaries:
    Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
    Yarn: 1.22.21 - ~/.nvm/versions/node/v20.9.0/bin/yarn
    npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
    bun: 1.0.2 - ~/.bun/bin/bun
  IDEs:
    VSCode: 1.89.1 - /usr/local/bin/code
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    @playwright/test: ^1.44.1 => 1.44.1

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions