Closed sebkasanzew closed 10 months ago
I've successfully got cypress 12.8.1 to work using the module api with:
e.g.
require('dotenv').config();
const { run } = require('cy2');
const opts = {
browser: 'chrome',
parallel: true,
record: true,
key: `key`,
ciBuildId: 'local' + Date.now(),
};
/**
* run Cypress via cy2 to use sorry Cypress director
* https://github.com/sorry-cypress/cy2
*/
run(process.env.CYPRESS_API_URL, opts)
.then((result) => {
/**
* cypress failed to run
* https://docs.cypress.io/guides/guides/module-api.html#Handling-errors
*/
if (result.failures) {
console.error('Could not execute tests');
console.error(result.message);
process.exit(result.failures);
}
// print test results and exit
// with the number of failed tests as exit code
process.exit(result.totalFailed);
})
.catch((err) => {
console.error(err.message);
process.exit(999);
});
My configuration is quite complex (omitted from the above) so can't really try directly on CLI but maybe this helps you
I recommend switching to https://github.com/currents-dev/cypress-cloud, Cypress team put restrictions on their orchestration protocol and started blocking cy2 package. It is still working on windows machines though.
@agoldis architecturally what is the difference? i.e. if Cypress team is actively blocking cy2 what prevents them from doing the same of cypress-cloud?
Presumably cypress-cloud does not utilise the built in cypress orchestration then?
Presumably cypress-cloud does not utilise the built in cypress orchestration then?
indeed
i.e. if Cypress team is actively blocking cy2 what prevents them from doing the same of cypress-cloud?
That's a good topic for discussion. In short: cy2 was piggybacking on their orchestration, cypress-cloud is a kosher plugin using their public APIs in offline mode.
We've seen this after upgrading to Cypress 12.9.0, but only very intermittently (it's working the majority of the time).
[cy2] Using cloud orchestration service: http://sorry-cypress-director:1234/
[1956:0501/171109.357529:ERROR:node_bindings.cc(279)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details.
[1956:0501/171109.760556:ERROR:zygote_host_impl_linux.cc(263)] Failed to adjust OOM score of renderer with pid 2181: Permission denied (13)
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[2181:0501/171109.777341:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
We could not find a Cypress Cloud project with the projectId: unused
This projectId came from your cypress.config.ts file or an environment variable.
Please log into Cypress Cloud and find your project.
We will list the correct projectId in the 'Settings' tab.
Alternatively, you can create a new project directly from within the Cypress app.
https://on.cypress.io/cloud
Thanks for the tip about cypress-cloud @agoldis , nice to have that on my radar!
cypress-cloud does not support typescript, has anyone come up with a solution other than cypress-cloud? https://github.com/currents-dev/cypress-cloud/discussions/170
cypress-cloud doesn't support typescript configuration files, do you really need it @cinorthstarmls?
cypress-cloud doesn't support typescript configuration files, do you really need it @cinorthstarmls?
I am confirming, but I thought that would affect the Test files too. If it's only configuration files that shouldn't be an issue.
cypress-cloud doesn't support typescript configuration files, do you really need it @cinorthstarmls?
I am confirming, but I thought that would affect the Test files too. If it's only configuration files that shouldn't be an issue.
I can confirm that typescript for test files etc is fine, all of our tests are typescript and we're working with cypress-cloud
with no issues :smile:
Before opening, please confirm:
Environment information
Describe the bug
The following error is thrown with cy2
v4.0.6
and cypressv12.7
orv12.8
:It seems like the same as #69, but this issue was closed without a fix and also the title was about cypress
v12.6
, although from the logs it appears, he/she was using cypressv12.7
.With cypress
v12.6
it works fine.Expected behavior
Runs without error.
Command and Setup
Using the Director Service If needed, I can add the detailed configuration.
Full log and debug output