-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cypress 12.15 broke the ability to run Web Workers in cypress tests #27298
Comments
Hi, we definitely did not intend to break anything. Thanks for the minimal reproduction, this is really helpful. Let me take a look and isolate the commit that introduced this, and see what we can do. |
The reproduction works as expected. I might tag @chrisbreiding, who has deep expertise in this area of the code base. |
Thanks for working on this issue @lmiller1990, @chrisbreiding . I can provide some clues for your reference. I think the following changes introduced the breaking change. cypress/packages/driver/src/util/privileged_channel.ts Lines 4 to 15 in 1fcdc87
It seems the changes are part of |
Thanks for the prompt fix! Any word on when this will be available in a release? |
@c32hedge There should be a new release out this week, possibly today, that has the fix |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
Running a web worker in a cypress test after v12.15 results in an error
Running a web worker in a cypress test in v12.14 or earlier does not have this problem.
Desired behavior
Cypress should not generate a CSP error when a web worker is used from within the test (note that this does not happen when a webworker is used in the application-under-test, i.e., inside the iframe).
If it was the Cypress team's intention to break this use case, it should have been done in a major release, not a minor release
Test code to reproduce
https://github.com/crfrolik/CypressWebWorkerTest
Instructions to reproduce are provided in the README.
Cypress Version
12.17.1
Node version
16.20.0
Operating System
Ubuntu 20.04
Debug Logs
The error that is encountered is:
However, the error that appears in the browser's console log may be more relevant:
Other
Our assumption is that the changes made related to #1030 are what caused this.
Note that we have tried using the
experimentalCspAllowList
option and that has not addressed the issue, e.g.:The text was updated successfully, but these errors were encountered: