-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot record Cypress runs, cannot open Runs tab of Test Runner #1614
Comments
Did you happen to edit your If not, this is a pretty strange error, is there any info you can give above what you did before it stopped working? |
Hmm... I can only think of two ways this is happening..
|
Hmm edit the source code here: https://github.com/cypress-io/cypress/blob/master/packages/server/lib/modes/record.coffee#L80 And add Now also edit this file here: https://github.com/cypress-io/cypress/blob/master/packages/server/lib/konfig.coffee#L16 And add Run and paste the output. You don't have to show your |
Okay so the log from konfig.coffee:
And the stack trace when adding the log to record.coffee:
|
You are missing Go into this file here: https://github.com/cypress-io/cypress/blob/master/packages/server/lib/environment.coffee#L32 And replace that line with these three lines... console.log(process.env["CYPRESS_ENV"], pkg)
env = (base = process.env)["CYPRESS_ENV"] || (base["CYPRESS_ENV"] = (ref = pkg.env) != null ? ref : "development");
console.log(env) |
Okay that gives:
And then an error about the api_url:
|
That's the problem. You are setting This could be somewhere inside your bash profile... try searching around and let me know what you find. It's expected that this value gets set to |
We can put an assertion of the value of env variable la(check.oneOf... to catch things like these when calling api
…Sent from my iPhone
On Apr 19, 2018, at 21:48, Brian Mann ***@***.***> wrote:
That's the problem. You are setting process.env["CYPRESS_ENV"] somewhere to the value of live.
This could be somewhere inside your bash profile... try searching around and let me know what you find. It's expected that this value gets set to production. live is definitely not coming anywhere inside of Cypress code.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yeah we could make sure its oneOf a valid value, and if not, dont use the env var, and instead let it hit |
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! |
@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. |
Current behavior:
I try to record my Cypress run and see the message:
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
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
andyarn.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 dashboardVersions
Cypress 2.1.0
Mac High Sierra
Electron 59.0.3071.115
The text was updated successfully, but these errors were encountered: