-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] page.route doesn't work with chromium when fetch happens from within a sub worker #27376
Comments
I can repro, there is no pw:protocol ◀ RECV
{
"method": "Fetch.requestPaused",
"params": {
"requestId": "interception-job-9.0",
"request": {
"url": "https://jsonplaceholder.typicode.com/todos/1",
"method": "GET",
"headers": {
"Accept": "*/*",
"Referer": "http://localhost:5173/",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.62 Safari/537.36"
},
"initialPriority": "High",
"referrerPolicy": "strict-origin-when-cross-origin"
},
"frameId": "A428F986F21038EBA77F2B5491D08AB8",
"resourceType": "XHR"
},
"sessionId": "6062893F64A56FF0FA7083FA4815339D"
}
pw:protocol SEND ►
{
"id": 38,
"method": "Fetch.failRequest",
"params": {
"requestId": "interception-job-9.0",
"errorReason": "Aborted"
},
"sessionId": "6062893F64A56FF0FA7083FA4815339D"
} +0ms Running as DEBUG=pw:protocol* npm run test -- --project chromium |
This should now work. There still is a remaining issue with execution within the nested worker in WebKit, but we will wait for an explicit report on it. |
Germandrummer92
pushed a commit
to OctoMind-dev/playwright
that referenced
this issue
Oct 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System info
Source code
Link to the GitHub repository with the repro
https://github.com/azaleas/playwright-route-bug
Steps
pnpm run test --project=chromium
ornpm run test --project=chromium
)Expected
For tests to pass. I have a worker that creates another worker (subworker). The subworker makes a GET request to an API. The request is mocked via
page.route
to feed a different output. The tests are passing fine in webkit and firefox.Actual
Tests are hanging on fetch step due to
page.route
until timeout is reached or tests are force closed/stopped.The text was updated successfully, but these errors were encountered: