sorry-cypress / cy2

Integrate Cypress with alternative cloud services like Sorry Cypress or Currents
https://docs.sorry-cypress.dev/cypress-agent/cy2
GNU General Public License v3.0
32 stars 5 forks source link

Not working with Cypress 12.5.1 #65

Closed segevfiner closed 1 year ago

segevfiner commented 1 year ago

Before opening, please confirm:

Environment information

``` System: OS: macOS 13.2 CPU: (10) arm64 Apple M1 Pro Memory: 81.31 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.19.0/bin/yarn npm: 9.4.1 - ~/.nvm/versions/node/v16.19.0/bin/npm Browsers: Chrome: 109.0.5414.119 Safari: 16.3 npmPackages: @rushstack/eslint-patch: ^1.1.4 => 1.2.0 @types/node: ^18.11.12 => 18.11.19 @vitejs/plugin-vue: ^4.0.0 => 4.0.0 @vue/eslint-config-prettier: ^7.0.0 => 7.0.0 @vue/eslint-config-typescript: ^11.0.0 => 11.0.2 @vue/tsconfig: ^0.1.3 => 0.1.3 cy2: ^4.0.6 => 4.0.6 cypress: ^12.0.2 => 12.5.1 eslint: ^8.22.0 => 8.33.0 eslint-plugin-cypress: ^2.12.1 => 2.12.1 eslint-plugin-vue: ^9.3.0 => 9.9.0 npm-run-all: ^4.1.5 => 4.1.5 prettier: ^2.7.1 => 2.8.3 start-server-and-test: ^1.15.2 => 1.15.3 typescript: ~4.7.4 => 4.7.4 vite: ^4.0.0 => 4.1.1 vue: ^3.2.45 => 3.2.47 vue-tsc: ^1.0.12 => 1.0.24 npmGlobalPackages: @vue/cli: 5.0.8 corepack: 0.15.3 fastify-cli: 5.7.1 firebase-tools: 11.22.0 generator-code: 1.7.3 gulp-cli: 2.3.0 npm: 9.4.1 ts-node: 10.9.1 tsx: 3.12.2 vsce: 2.15.0 yo: 4.3.1 ``` Also using pnpm 7.26.3 as package manager

Describe the bug

Getting an error trying to use cy2:

You passed the --record flag but this project has not been setup to record.

This project is missing the projectId inside of: cypress.config.ts

We cannot uniquely identify this project without this id.

You need to setup this project to record. This will generate a unique projectId.

Alternatively if you omit the --record flag this project will run without recording.

https://on.cypress.io/recording-project-runs

Expected behavior

It works as documented.

Command and Setup

CYPRESS_API_URL="https://sorry-cypress-demo-director.herokuapp.com" pnpm start-server-and-test preview :4173 'cy2 run --parallel --record --key segev-test --ci-build-id hello-cypress'

In a bare bones pnpm create vue@3 project with TypeScript, ESLint, Prettier & Cypress enabled. Installing cy2 and running this command.

Full log and debug output

log.txt

agoldis commented 1 year ago

This project is missing the projectId inside of: cypress.config.js

Add a projectId entry to cypress.config.js

edenhermelin commented 1 year ago

This project is missing the projectId inside of: cypress.config.js

Add a projectId entry to cypress.config.js

hey @agoldis, we added the projectId to cypress.config.ts and now the error is different (looks like it tries to go to the actual cypress servers?). We did also configured of course the env variable of CYPRESS_API_URL to point at the right place, same as it was before the update.

We could not find a Cypress Cloud project with the projectId: modalProject

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 using the Desktop Application.

https://on.cypress.io/dashboard
Error: Process completed with exit code 1.

any idea what we are missing?

agoldis commented 1 year ago

seems like it's not running cy2 at all. I am running cy12.5.1 on my machine right now with no problem. you can enable DEBUG=cy2* to see if there're any messages from cy2 at all