Closed bahmutov closed 3 years ago
Funny that this crash happens when trying to print an error message when cannot record :)
Seems the --key
by its presence gets cast as a boolean
cypress:electron spawning /Users/gleb/git/cypress/packages/electron/dist/Cypress/Cypress.app/Contents/MacOS/Cypress with args [
'--max-http-header-size=1048576',
'--ciBuildId=bar',
'--config={}',
'--cwd=/Users/gleb/git/cypress/packages/server',
'--key=true',
'--parallel=true',
'--record=true'
]
Looking at the CLI parsing the arguments, it gets confused :) I am looking at DEBUG=cypress:cli:cli
--key --parallel ...
{ key: '--parallel' }
then it passes the list of arguments to the app where it gets --key=true
The code for this is done in cypress-io/cypress#14593, but has yet to be released. We'll update this issue and reference the changelog when it's released.
Released in 6.3.0
.
This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v6.3.0, please open a new issue.
Cypress v6.2.1
Cypress crashes if you pass an empty
--key
CLI parameter.Reproduction steps:
npm i
Crash
Note: if you simply try
The our CLI catches the empty parameter and shows a good message. You must follow
--key
by something else. Then it somehow evades our CLI argument checks. I can see in the crashing caseWhy this matters
As we found with @estrada9166 if you pass an environment variable on CI that is undefined, it happily crashes