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

Unable to load the JS script due to CSP issue #27809

Closed
nand1234 opened this issue Sep 14, 2023 · 5 comments
Closed

Unable to load the JS script due to CSP issue #27809

nand1234 opened this issue Sep 14, 2023 · 5 comments
Labels
stale no activity on this issue for a long period

Comments

@nand1234
Copy link

Current behavior

image

Desired behavior

should be able to load JS script

Test code to reproduce

var scr = document.createElement('script'),
head = document.head || document.getElementsByTagName('head')[0];
head.appendChild(scr)
scr.src = 'https://www.google.com/recaptcha/enterprise.js?render=&render=explicit';

Cypress Version

13.0.0

Node version

18.5.0

Operating System

ubantu

Debug Logs

No response

Other

same code works on cypress 12.12.0

@nagash77
Copy link
Contributor

In order to give our engineers the best chance at recreating your problem, please create a reproducible example using a fork of Cypress Test Tiny. This gives us the best chance of seeing exactly what you are seeing and being able to investigate effectively.

@nagash77 nagash77 self-assigned this Sep 14, 2023
@nand1234
Copy link
Author

@nagash77 I've created pull request with my test
cypress-io/cypress-test-tiny#85

@nand1234
Copy link
Author

nand1234 commented Sep 16, 2023

The issue is reproducible with latest cypress version too. @nagash77

Add below script to test file

var scr = document.createElement('script'),
head = document.head || document.getElementsByTagName('head')[0];
head.appendChild(scr)
scr.src = 'https://www.google.com/recaptcha/enterprise.js?render=&render=explicit';

Run the cypress test in open mode
Check the console
You will see error

@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Mar 15, 2024
@cypress-app-bot
Copy link
Collaborator

This issue has been closed due to inactivity.

@cypress-app-bot cypress-app-bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity on this issue for a long period
Projects
None yet
Development

No branches or pull requests

3 participants