Skip to content
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

Closed
David-Development opened this issue Nov 19, 2020 · 2 comments · Fixed by #4658
Closed

[BUG] Playwright not intercepting fetch requests in WebWorker #4487

David-Development opened this issue Nov 19, 2020 · 2 comments · Fixed by #4658
Assignees

Comments

@David-Development
Copy link

David-Development commented Nov 19, 2020

Context:

  • Playwright Version: 1.6.2
  • Operating System: Mac, Linux, Docker
  • Node.js version: 12 & 14
  • Browser: Chromium
System:
  OS: macOS 11.0.1
  Memory: 651.86 MB / 32.00 GB
Binaries:
  Node: 14.8.0 - /usr/local/bin/node
  npm: 6.14.7 - /usr/local/bin/npm
Languages:
  Bash: 3.2.57 - /bin/bash

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.

@aslushnikov
Copy link
Collaborator

aslushnikov commented Nov 19, 2020

https://github.com/David-Development/playwright-worker-bug

@David-Development thank you for the awesome repro! 🙏

This happens in all browsers and at least on Mac, Linux and inside the Playwright Docker Container.

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.

@David-Development
Copy link
Author

@aslushnikov Thank you for looking into it! 🙇‍♂️ Let me know if there is anything else I can do to help.

Both Firefox and WebKit were able to intercept

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants