Open anlambert opened 1 year ago
@grushetsky
Please try this:
//...
async setupNodeEvents(on, config) {
await cloudPlugin(on, config);
//...
}
- setting
video:true
enables videos in cypress 13- please tell me if setting
videoUploadOnPasses: true
incypress.config.js
(despite the warnings) solves the issue for you
ah interesting, yep, that fixes it!
looks like everythins is good passed on CI
I have updated the guide for setting up cypress-cloud together with multiple plugins. There are a few caveats, please take a look here: https://github.com/currents-dev/cypress-cloud#setup-with-existing-plugins
@agoldis, the suggested fix works! Thank you!
@agoldis, the suggested fix works! Thank you!
Awesome, I also updated the documentation
"cypress": "13.2.0", "cypress-cloud": "2.0.0-beta.0",
async setupNodeEvents(on, config) {
cypressGrep(config);
return await cloudPlugin(on, config);
}
I have an error for random specs, which occurs after I switched from cy2 to cypress cloud What can cause the issue?
@romankhomitskyi i need more data to troubleshoot - the debug logs of the affected runs (see cypress-cloud troubleshooting section) and the dump of the affected run item from the database.
Released 2.0.0-beta.1
with a few fixes and improvements:
videoUploadOnPasses
to true
@midleman currents_marker
to warn about config overwrites@romankhomitskyi i need more data to troubleshoot - the debug logs of the affected runs (see cypress-cloud troubleshooting section) and the dump of the affected run item from the database.
I guess that error causing the issue
ok, just noticed something,
2.0.0-beta.0
uploads screenshots on failures
2.0.0-beta.1
does not upload screenshots on failures
i have the same exact config between both and didn't change anything other than the cypress-cloud
package version.
@midleman is it consistently failing? I am challenged because we do have tests that verify uploads on failures. If you have a chance to generate a debug log, please do.
ok, just noticed something,
2.0.0-beta.0
uploads screenshots on failures2.0.0-beta.1
does not upload screenshots on failures i have the same exact config between both and didn't change anything other than thecypress-cloud
package version.
@midleman @agoldis I have upgraded to 2.0.0-beta.1
and the following is the behavior I noticed with cypress-cloud:
Confirmed that 2.0.0-beta.1
does not upload screenshots on failures and on flaky run
Aside from that the test always includes a video which was not the usual behavior before the update (I guess uploading videos for passed tests also takes time in the run? CMIIW)
For the video, I think this has something to do with Set the default value of videoUploadOnPasses to true
that's been a default in 2.0.0-beta.1
Before in 2.0.0-beta.0
my cypress config are the following and all works fine and I didn't change it when I upgraded to 2.0.0-beta.1
:
videoCompression: false,
video: true,
screenshotOnRunFailure: true,
@bilarallen @midleman
videoUploadOnPasses
The option was removed in Cypress 13 - keeping it will trigger a warning message. Enabling videos (videos: true
) will activate videos for all tests, regardless of the outcome. We wanted to have similar behaviour to avoid confusion. You can still provide this option and cypress-cloud will respect it - it will trigger Cypress 13 warnings, though.
The changes between 2.0.0-beta.0
and 2.0.0-beta.1
are not functional - we added tests and a few debug statements. It's very surprising to see different behaviour. We need the debug logs to understand what caused the screenshots to disappear. After the changes to Module API output, we use more complicated methods to capture run information, including screenshots and test attempt details. But that also complicates the troubleshooting. Your help with producing the debug logs or a standalone isolated reproducible example is appreciated - the issues you're reporting are preventing us from releasing 2.0.0.
Hi @agoldis , Right now am using cypress 10.8.0 with cy2 to achieve parallel execution and with sorry cypress dashboard to view results. Now am planning to upgrade to cypress 13.2.0 with cypress cloud and sorry cypress dashboard. Can you please guide me how to perform this ? I tried creating currents.config.js file and added importing cypress-cloud plugin and support in cypress.config.ts and e2e.js file and used below command to execute. npx cypress-cloud run --parallel --record --key somekey --ci-build-id test_build_123.
I started seeing error message as , Unable to resolve cypress configuration
Below are the version used: cypress - 13.2.0 cypress-cloud - beta
@bilarallen @midleman
videoUploadOnPasses
The option was removed in Cypress 13 - keeping it will trigger a warning message. Enabling videos (
videos: true
) will activate videos for all tests, regardless of the outcome. We wanted to have similar behaviour to avoid confusion. You can still provide this option and cypress-cloud will respect it - it will trigger Cypress 13 warnings, though.
- missing screenshots for failed / flaky tests
The changes between
2.0.0-beta.0
and2.0.0-beta.1
are not functional - we added tests and a few debug statements. It's very surprising to see different behaviour. We need the debug logs to understand what caused the screenshots to disappear. After the changes to Module API output, we use more complicated methods to capture run information, including screenshots and test attempt details. But that also complicates the troubleshooting. Your he lp with producing the debug logs or a standalone isolated reproducible example is appreciated - the issues you're reporting are preventing us from releasing 2.0.0.
Hi @agoldis I tried to run a failing test with debug logs, hope this helps.
@bilarallen Thanks, that was helpful!
I can see that the log file has some missing some event that should have been emitted by cypress.
Please try installing cypress-on-fix
plugin as described here: https://github.com/currents-dev/cypress-cloud#event-callbacks-for-multiple-plugins and tell me if it fixed the issue.
@bilarallen Thanks, that was helpful!
I can see that the log file has some missing some event that should have been emitted by cypress. Please try installing
cypress-on-fix
plugin as described here: https://github.com/currents-dev/cypress-cloud#event-callbacks-for-multiple-plugins and tell me if it fixed the issue.
Hi, @agoldis I tried to use the cypress-on-fix
plugin and it worked! The screenshot in the failed/flaky run is now included, but it seems it spawned another issue wherein the screenshot didn't capture the error or the moment the test failed also there's some issue with the video timestamp this occurred in all test retries.
Also, there's one thing I noticed in terminal when running the test in cypress GUI (e2e) see my cypress config file particularly lines 43 and 46
Cypress 13 got us this error tonight:
20:08:25 [AWS CodeBuild Plugin] We've detected that you're using a 3rd party library that is not supported by Cypress: cli.js
20:08:25 [AWS CodeBuild Plugin] To continue running Cypress, please remove this library or reach out for help migrating.
it's working with cypress 12.17.4 but not working again with cypress 13 :(
@estefafdez Same here... i guess, cypress now checks the dependencies and throw this error when they see "cypress-cloud" package. Can we patch this? 🧐^^
Same as @estefafdez Has anyone found a solution for this ?
Right now, downgrade to cypress 12 (latest version) and wait until the currents teams think about a solution :(
This will be hard one, i guess... Seems like this check happens partially remote. If so, its an interesting point that cypress seems to call home with some repo infos 🤡 Our Pipeline already worked with cypress 13.2 since some days... so last night this check "has been activated" in some way
This will be hard one, i guess... Seems like this check happens partially remote. If so, its an interesting point that cypress seems to call home with some repo infos 🤡 Our Pipeline already worked with cypress 13.2 since some days... so last night this check "has been activated" in some way
Same on our side...
This will be hard one, i guess... Seems like this check happens partially remote. If so, its an interesting point that cypress seems to call home with some repo infos 🤡 Our Pipeline already worked with cypress 13.2 since some days... so last night this check "has been activated" in some way
Same issue from my side, regardless cypress-cloud
version used (tested with 1.10.0-beta.4
and 2.0.0-beta.1
): https://jenkins.softwareheritage.org/blue/organizations/jenkins/DWAPPS%2Fgitlab-builds/detail/gitlab-builds/320/pipeline.
Curiously, I can run the tests locally without any issue:
$ CURRENTS_API_URL=http://localhost:1234 CURRENTS_PROJECT_ID=swh-web yarn run cypress-cloud run --record --key swh-web --parallel --ci-build-id build-2
yarn run v1.22.19
$ /home/anlambert/swh/swh-environment/swh-web/node_modules/.bin/cypress-cloud run --record --key swh-web --parallel --ci-build-id build-2
WARNING Failed to load config file, falling back to the default config. Attempted locations: [
'file:///home/anlambert/swh/swh-environment/swh-web/currents.config.js',
'file:///home/anlambert/swh/swh-environment/swh-web/currents.config.cjs',
'file:///home/anlambert/swh/swh-environment/swh-web/currents.config.mjs'
]
Copyright (C) 2023 Currents Software Inc https://currents.dev
This is free software, and you are welcome to redistribute it under certain
conditions. This program comes with no warranty. Parts of this program are MIT
licensed. Refer to the license for details
https://github.com/currents-dev/cypress-cloud/blob/main/LICENSE.md
Cypress-cloud version: 2.0.0-beta.1
Cypress version: 13.3.0
Discovered 25 spec files
Tags: false; Group: false; Parallel: true; Batch Size: 3
Connecting to cloud orchestration service...
🎥 Run URL: http://localhost:8080/run/e455e0bdc0d3226e99bc24547f2ea7ab
====================================================================================================
Running: cypress/e2e/add-forge-now-request-dashboard.cy.js (2/25)
====================================================================================================
(Run Starting)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 13.3.0 │
│ Browser: Electron 114 (headless) │
│ Node Version: v18.16.0 (/usr/bin/node) │
│ Specs: 1 found (add-forge-now-request-dashboard.cy.js) │
│ Searched: cypress/e2e/add-forge-now-request-dashboard.cy.js │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
Running: add-forge-now-request-dashboard.cy.js (1 of 1)
Test add forge now request dashboard load
✓ should load add forge request details
✓ should show send message link
...
[cypress-cloud] Could not get cypress attempt error details so that is the latest error?
"cypress": "13.2.0", "cypress-cloud": "2.0.0-beta.0",
it does not upload screenshots when before all hook is failed
This will be hard one, i guess... Seems like this check happens partially remote. If so, its an interesting point that cypress seems to call home with some repo infos 🤡 Our Pipeline already worked with cypress 13.2 since some days... so last night this check "has been activated" in some way
Same issue from my side, regardless
cypress-cloud
version used (tested with1.10.0-beta.4
and2.0.0-beta.1
): https://jenkins.softwareheritage.org/blue/organizations/jenkins/DWAPPS%2Fgitlab-builds/detail/gitlab-builds/320/pipeline.Curiously, I can run the tests locally without any issue:
$ CURRENTS_API_URL=http://localhost:1234 CURRENTS_PROJECT_ID=swh-web yarn run cypress-cloud run --record --key swh-web --parallel --ci-build-id build-2 yarn run v1.22.19 $ /home/anlambert/swh/swh-environment/swh-web/node_modules/.bin/cypress-cloud run --record --key swh-web --parallel --ci-build-id build-2 WARNING Failed to load config file, falling back to the default config. Attempted locations: [ 'file:///home/anlambert/swh/swh-environment/swh-web/currents.config.js', 'file:///home/anlambert/swh/swh-environment/swh-web/currents.config.cjs', 'file:///home/anlambert/swh/swh-environment/swh-web/currents.config.mjs' ] Copyright (C) 2023 Currents Software Inc https://currents.dev This is free software, and you are welcome to redistribute it under certain conditions. This program comes with no warranty. Parts of this program are MIT licensed. Refer to the license for details https://github.com/currents-dev/cypress-cloud/blob/main/LICENSE.md Cypress-cloud version: 2.0.0-beta.1 Cypress version: 13.3.0 Discovered 25 spec files Tags: false; Group: false; Parallel: true; Batch Size: 3 Connecting to cloud orchestration service... 🎥 Run URL: http://localhost:8080/run/e455e0bdc0d3226e99bc24547f2ea7ab ==================================================================================================== Running: cypress/e2e/add-forge-now-request-dashboard.cy.js (2/25) ==================================================================================================== (Run Starting) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Cypress: 13.3.0 │ │ Browser: Electron 114 (headless) │ │ Node Version: v18.16.0 (/usr/bin/node) │ │ Specs: 1 found (add-forge-now-request-dashboard.cy.js) │ │ Searched: cypress/e2e/add-forge-now-request-dashboard.cy.js │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: add-forge-now-request-dashboard.cy.js (1 of 1) Test add forge now request dashboard load ✓ should load add forge request details ✓ should show send message link ...
same here, I can run in my local successfully, but in lambda environment(Lambda function from a container image) got the 3rd party error. I also tried to run the docker image in my local with docker run
, also got the 3rd party error.
Based on my experimental guesses, the logic for detection is in the cypress binary and does not require an internet connection, and there may be two points of detection:
cypress-cloud
in node_modulesI am a bit confused. Cypress launched the Cypress Gateway Connector
License, (costing around 5k$/y) so that a 3rd party recording solution can be used. And now that does not work? I could not test with the latest version of Sorry Cypress but I will get in touch with Cypress to check, if that should work with this license or not.
Edit: According to Cypress, it should work with a valid Cypress Connector Gateway license, I will give it a try next week.
We are getting this error while running cypress in Jenkins pipeline -
"We've detected that you're using a 3rd party library that is not supported by Cypress: cypress-cloud To continue running Cypress, please remove this library or reach out for help migrating."
below is my configuration:
"cypress": "^13.3.0", "cypress-cloud": "^2.0.0-beta.1"
followed the migration document and made the changes accordingly - https://currents.dev/readme/integration-with-cypress/cypress-cloud/migration-to-cypress-13
The Cypress team is already investigating and working on a fix https://github.com/cypress-io/cypress/discussions/27924 it seems other libraries that do not make test recordings were also affected. 🤞 that this will solve the issue with currents, if not where do we go from here? 🥲
Seems like cypress is not going to fix this. Ticket ist closed and I still get the error message after clearing the runner cache like described in the ticket
Hey everyone, we published the response with more details about the recent blocking, including the technical analysis. We need to change our approach because they will keep implementing new blockings. It requires careful planning and more time. Thanks for your patience and support!
According to Cypress, they want to get this working for paying customers (like we are with the Cypress Gateway Connector
) because they themselves do not have an on-premise dashboard. @agoldis did you ever have contact with Cypress directly? I am in contact with them and they need more details in order to fix it.
@Roemer
Cypress Gateway Connection
Would forking Cypress be a viable solution to this?
Would forking Cypress be a viable solution to this?
I made a fork of cypress-cloud and renamed everything possible. And it worked for.version 13.3.0. I also had to rename all environment variables, for example CURRENTS_API_URL
Would forking Cypress be a viable solution to this?
I made a fork of cypress-cloud and renamed everything possible. And it worked for.version 13.3.0. I also had to rename all environment variables, for example CURRENTS_API_URL
Could you share how to do it please?
Would forking Cypress be a viable solution to this?
I made a fork of cypress-cloud and renamed everything possible. And it worked for.version 13.3.0. I also had to rename all environment variables, for example CURRENTS_API_URL
Could you share how to do it please?
https://www.npmjs.com/package/@krivega/cc
This is a temporary solution, now I am afraid that they will block it too)
so it's dead end of 3rd party self hosted cypress monitor ? 😭
@GeuntaBuwono you can still use older versions of cypress https://currents.dev/readme/integration-with-cypress/alternative-cypress-binaries
Before opening, please confirm:
Environment information
Describe the bug
Due to this cypress commit that introduces some breaking API changes in cypress 13.x, I noticed two issues when using cypress-cloud with it:
See sample cypress-cloud output put below:
After reading cypress-cloud code, it seems that issue can be fixed using the following diff:
Once the fix above applied, there is an error when cypress-cloud attempts to process test screenshots, see output below:
The fix for this one is not straightforward to me.
Expected behavior
cypress 13.x should be supported.
Command and Setup
Just run any cypress-cloud session with cypress 13.x and the reported errors will show up.
Full log and debug output
cypress_cloud_debug_logs.txt