-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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] Playwright not intercepting fetch requests in WebWorker #4487
Comments
@David-Development thank you for the awesome repro! 🙏
Interestingly, I can reproduce this only with Chromium. Both Firefox and WebKit were able to intercept (I'm on Mac 10.15). Looks like a bug in Chromium - investigating. |
@aslushnikov Thank you for looking into it! 🙇♂️ Let me know if there is anything else I can do to help.
Oh, hm.. you are right! I just double checked and it work on Firefox and Safari (Mac 11.0.1). Sorry for the false alarm! After I saw this error the first time I just kept on testing against chromium. I'll adjust the ticket description then |
Context:
Code Snippet
I created a minimal example to reproduce the issue. You can find it here:
https://github.com/David-Development/playwright-worker-bug
Describe the bug
Intercepting network requests does not work if the request is made from a web worker. Only fetch requests from the main execution thread will be intercepted. I'm trying to use the
route.fulfill
method to mock some data that our web workers are fetching. If I disable the web workers in our application it works fine but if the requests are made from the web workers they are not intercepted. This happens on Chromium on Mac, Linux and inside the Playwright Docker Container.The text was updated successfully, but these errors were encountered: