Skip to content
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

Cypress runner v8.0.0 crashes when clicking + New Spec File #17430

Closed
wlsf82 opened this issue Jul 21, 2021 · 4 comments
Closed

Cypress runner v8.0.0 crashes when clicking + New Spec File #17430

wlsf82 opened this issue Jul 21, 2021 · 4 comments
Assignees
Labels
type: regression A bug that didn't appear until a specific Cy version release

Comments

@wlsf82
Copy link

wlsf82 commented Jul 21, 2021

Current behavior

I've initialized NPM with npm init -y, I've installed Cypress v8 as a dev dependency with npm i cypress@8.0.0 -D, and I've opened the Cypress runner with npx cypress open. Right after the runner has finished loading, I just clicked the + New Spec File, then the runner crashed (closed automatically), and the following error was left in the terminal:

npm i cypress@8.0.0 -D

changed 1 package, and audited 171 packages in 1s

24 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
walmyr@Walmyrs-MacBook-Pro cyv8 % npx cypress open
TypeError: open_project_1.default.getConfig(...).then(...).tap is not a function
    at Object.showDialogAndCreateSpec (/Users/walmyr/Library/Caches/Cypress/8.0.0/Cypress.app/Contents/Resources/app/packages/server/lib/gui/files.js:18:10)
    at IpcMainImpl.handleEvent (/Users/walmyr/Library/Caches/Cypress/8.0.0/Cypress.app/Contents/Resources/app/packages/server/lib/gui/events.js:115:20)
    at apply (/Users/walmyr/Library/Caches/Cypress/8.0.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/lodash/lodash.js:492:17)
    at IpcMainImpl.wrapper (/Users/walmyr/Library/Caches/Cypress/8.0.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/lodash/lodash.js:5379:16)
    at IpcMainImpl.emit (events.js:315:20)
    at Object.<anonymous> (electron/js2c/browser_init.js:161:10092)
    at Object.emit (events.js:315:20)

TypeError: open_project_1.default.getConfig(...).then(...).tap is not a function
    at Object.showDialogAndCreateSpec (/Users/walmyr/Library/Caches/Cypress/8.0.0/Cypress.app/Contents/Resources/app/packages/server/lib/gui/files.js:18:10)
    at IpcMainImpl.handleEvent (/Users/walmyr/Library/Caches/Cypress/8.0.0/Cypress.app/Contents/Resources/app/packages/server/lib/gui/events.js:115:20)
    at apply (/Users/walmyr/Library/Caches/Cypress/8.0.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/lodash/lodash.js:492:17)
    at IpcMainImpl.wrapper (/Users/walmyr/Library/Caches/Cypress/8.0.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/lodash/lodash.js:5379:16)
    at IpcMainImpl.emit (events.js:315:20)
    at Object.<anonymous> (electron/js2c/browser_init.js:161:10092)
    at Object.emit (events.js:315:20)

I tested the same steps with Cypress 7.7.0 (previous version of 8.0.0), and it worked fine.

Desired behavior

The new test file should be created without crashing the runner.

Test code to reproduce

Here is the repo with Cypress v8.0.0 and its package-lock.json file: https://github.com/wlsf82/cyv8

Cypress Version

8.0.0

Other

No response

@jennifer-shehane
Copy link
Member

What version were you updating from? Likely this was introduced in 7.6.0 where we introduced the deleting of examples files + create new spec button.

Can you give specifics on your OS? What version of Mac are you using?

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Jul 21, 2021
@panzarino
Copy link
Contributor

panzarino commented Jul 21, 2021

Looks like we missed out on updating this one in the changes here - #17319. I'll submit a fix soon.

Edit - looks like the code has actually been updated, but the error being shown seems to be from the previous version - weird but I'll try to reproduce locally.

@panzarino panzarino added type: regression A bug that didn't appear until a specific Cy version release stage: ready for work The issue is reproducible and in scope and removed OS: mac type: bug stage: needs information Not enough info to reproduce the issue labels Jul 21, 2021
@panzarino
Copy link
Contributor

panzarino commented Jul 21, 2021

Ok so that commit actually didn't make it into the release - this issue has actually been fixed in #17319 but that came a day after the release. I think this was the only instance where we chained a .tap off of the promise so it should be the only instance that's affected by this change.

Fix should be coming in the next release (either 8.0.1 or 8.1.0)

We should update unit tests to no longer stub getConfig as a promise to prevent this from flying under the radar again

@panzarino panzarino added stage: pending release and removed stage: ready for work The issue is reproducible and in scope labels Jul 21, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 29, 2021

Released in 8.1.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v8.1.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jul 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: regression A bug that didn't appear until a specific Cy version release
Projects
None yet
Development

No branches or pull requests

3 participants