1.50.0
Steps to reproduceAfter bumping playwright to 1.50.0, I noticed certain tests failing on Firefox. Digging into stuff, it seems that fetch requests being made with keepalive: true
are no longer handled by e.g. page.on('route')
.
Example:
fetch('https://test-sentry-url.com/', { "method": "POST", keepalive: true, });
And my test:
page.route('https://test-sentry-url.com/', route => { console.log('Handler met'); return route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({ id: 'test-id' }), }); });
Since 1.50.0, the route handler is never triggered (and because of this tests fail). If I remove keepalive: true
, it works.
After some debugging, it seems that Firefox actually implemented support for this flag in v133, which has just been bumped to in playwright 1.50.0 (134, specifically). And looking at a regular app in firefox, I can see there that such keepalive requests do not show up in the network tab 🤔 They do seem to be sent though.
Expected behaviorpage.route()
should continue to handle all requests, even if they have keepalive: true
page.route()
does not match keepalive: true
requests.
Noticed this here: getsentry/sentry-javascript#15164
EnvironmentSystem: OS: macOS 14.4.1 Memory: 1.29 GB / 32.00 GB Binaries: Node: 18.20.5 - ~/.volta/tools/image/node/18.20.5/bin/node Yarn: 1.22.22 - ~/.volta/tools/image/yarn/1.22.22/bin/yarn npm: 10.8.2 - ~/.volta/tools/image/node/18.20.5/bin/npm Languages: Bash: 5.2.26 - /opt/homebrew/bin/bash
Smrtnyk, Mattstir, DerGernTod, NemanjaPecanin, AbhiPrasad and 1 more
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4