-
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
cy.origin()` failed to create a spec bridge to communicate with the specified origin. Only occurs when running from ECS Fargate #28284
Comments
I am also encountered same issue. Following is the code where issue is occur: cy.origin(newOrigin, { args: { printCertificateUrl } }, ({ printCertificateUrl }) => {
cy.request({
url: `https://domain.com${printCertificateUrl}`,
encoding: 'binary',
}).then((response) => {
cy.writeFile('cypress/downloads/cert1.pdf', response.body, 'binary')
})
}) |
@EddySum @asadullahqazi-360training What browser are you running tests in and what version browser? Did the browser recently update or anything else update before you began seeing this error? Chrome recently made changes to http -> https upgrading and was just asking this line of questioning to see whether this may be related. This error is supposed to throw in the situation of visiting an https and then an origin of http of the same domain. The example we test below should throw the error for instance: cy.visit('https://www.foobar.com:3502/fixtures/primary-origin.html')
cy.origin('http://www.foobar.com:3500', () => {}) In this case, the browser itself would throw an error and we are trying to alert you to check the actual error in DevTools. If this is not what either of you are doing, we'd like to track down this error cause. |
Hello, We are also encountering this issue. We've been seeing it for several months at this point and are addressing it now because it is generating an enormous amount of test flake. We are doing the following:
We are considering putting a long sleep between 1 and 2 to give time for the redirection to complete (sometimes it takes a few seconds). That being said, this is a common use case documented in the Also to be clear the url we are putting into |
Hi all! I also ran into this problem and noticed that this error is reproduced periodically on CI (GitHub Actions). Locally, everything goes without problems, it doesn't matter in headed or headless mode. I'm currently using Cypress v13.12.0 and the latest version of Chrome, but this is also reproduced on previous versions of Cypress and Chrome on CI. |
Also having this issue. Problem does not occur locally on chrome, chromium, firefox or electron. Only occurs on GitHub Actions with chrome. |
Is there any news on this? |
Current behavior
Desired behavior
The cy.origin command should work without an error. The commands inside the cy.origin callback should run.
At the minimum, the error message should be more descriptive/ provide more insight into the issue.
Test code to reproduce
This can get a bit tricky/puzzling. Running our tests locally or from within a docker image locally does not prompt the error seen above.
However, running the docker image on AWS ECS does prompt the issue seen. I have confirmed the issue is not an environment variable issue. I have also confirmed that we are switching from HTTPs origin to HTTPs origin.
This is the code that is causing the issue. Our web application triggers the redirect to an external login page.
Cypress Version
13.4.0
Node version
19
Operating System
ECS Fargate with a bullseye slim linux machine
Debug Logs
No response
Other
The error message is not very descriptive. I have also used an npm package to print the chrome messages to the console and thus our logs in ecs. However, no error related to cy.origin was displayed there either.
I have also run the code in debug mode and am able provide this if needed. (Will need to make sure no sensitive information is included in those logs)
Could anyone shed insight into what could be causing this issue or how to get more information into what is prompting the error?
The text was updated successfully, but these errors were encountered: