Cannot record Cypress runs, cannot open Runs tab of Test Runner
See original GitHub issueCurrent behavior:
I try to record my Cypress run and see the message:
Opening Cypress...
Warning: We encountered an error talking to our servers.
This run will not be recorded.
This error will not alter the exit code.
RequestError: Error: Invalid URI "/builds"
The tests continue to run fine, but they aren’t recorded and then available in my dashboard.
I am running yarn cypress run --record --key xxx
and have verified the key is correct.
If I try and access the ‘Runs’ tab of the Test Runner, the Test Runner crashes and closes and I see the stack trace
TypeError: Parameter "url" must be a string, not undefined
at Url.parse (url.js:102:11)
at Object.urlParse [as parse] (url.js:96:5)
at Object.ensureUrl (/Users/heatherroberts/Desktop/3P Projects/school-usage-reports/node_modules/cypress/dist/Cypress.app/Contents/Resources/app/packages/server/lib/util/connect.js:38:17)
at EventEmitter.handleEvent (/Users/heatherroberts/Desktop/3P Projects/school-usage-reports/node_modules/cypress/dist/Cypress.app/Contents/Resources/app/packages/server/lib/gui/events.js:222:24)
at apply (/Users/heatherroberts/Desktop/3P Projects/school-usage-reports/node_modules/cypress/dist/Cypress.app/Contents/Resources/app/packages/server/node_modules/lodash/lodash.js:499:17)
at EventEmitter.wrapper (/Users/heatherroberts/Desktop/3P Projects/school-usage-reports/node_modules/cypress/dist/Cypress.app/Contents/Resources/app/packages/server/node_modules/lodash/lodash.js:5356:16)
at emitThree (events.js:135:13)
at EventEmitter.emit (events.js:216:7)
at WebContents.<anonymous> (/Users/heatherroberts/Desktop/3P Projects/school-usage-reports/node_modules/cypress/dist/Cypress.app/Contents/Resources/electron.asar/browser/api/web-contents.js:266:13)
at emitTwo (events.js:125:13)
at WebContents.emit (events.js:213:7)
Interesting to note is that if I install Cypress globally and run it this way (cypress run --record --key xxx
), there is no issue. Using the globally installed version is how I managed to set my project up on the dashboard in the first place (as using local Cypress crashes when I open the Runs tab). I also have Cypress in 2 other projects (same version 2.1.0) and have been recording runs in the exact same way with no issue.
I tried removing node_modules
and yarn.lock
and installing from scratch but the problem persists.
Desired behavior:
I am able to run yarn cypress run --record --key xxx
and see my recorded run in the dashboard
Versions
Cypress 2.1.0 Mac High Sierra Electron 59.0.3071.115
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (12 by maintainers)
Top GitHub Comments
@chinchiheather you don’t need to set it at all. Just remove it and Cypress will set it to what it needs to be set to.
I’ll open an issue stating what we can do in the future to prevent this.
Ahh yeah I was experimenting with using environment variables to set some custom configuration. I must have called one CYPRESS_ENV.
Set it back to ‘production’ and all is good now, thanks so much!