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 crashes after selecting project when back button is pressed #15089

Closed
panzarino opened this issue Feb 15, 2021 · 3 comments · Fixed by #15651
Closed

Cypress crashes after selecting project when back button is pressed #15089

panzarino opened this issue Feb 15, 2021 · 3 comments · Fixed by #15651
Labels
pkg/server This is due to an issue in the packages/server directory type: regression A bug that didn't appear until a specific Cy version release

Comments

@panzarino
Copy link
Contributor

Current behavior

When selecting a project in open mode, the application will crash if the back button is selected before the project has loaded. See gif below for an example:

ezgif-2-121902ee6be6

Error stack:

Error: ServerE2E#open must first be called before accessing 'this.server'
    at ServerE2E.ensureProp (/Users/panzarino/Documents/GitHub/cypress/packages/server/lib/util/class-helpers.ts:13:15)
    at ServerE2E.get server [as server] (/Users/panzarino/Documents/GitHub/cypress/packages/server/lib/server-base.ts:84:21)
    at ServerE2E._port (/Users/panzarino/Documents/GitHub/cypress/packages/server/lib/server-base.ts:179:21)
    at ServerE2E._onDomainSet (/Users/panzarino/Documents/GitHub/cypress/packages/server/lib/server-base.ts:259:72)
    at ServerE2E.reset (/Users/panzarino/Documents/GitHub/cypress/packages/server/lib/server-base.ts:325:21)
    at ServerE2E._close (/Users/panzarino/Documents/GitHub/cypress/packages/server/lib/server-base.ts:328:14)
    at ServerE2E.close (/Users/panzarino/Documents/GitHub/cypress/packages/server/lib/server-base.ts:343:45)
    at ProjectE2E.close (/Users/panzarino/Documents/GitHub/cypress/packages/server/lib/project-base.ts:158:99)
    at ProjectE2E.close (/Users/panzarino/Documents/GitHub/cypress/packages/server/lib/project-e2e.ts:65:22)
    at Object.closeOpenProjectAndBrowsers (/Users/panzarino/Documents/GitHub/cypress/packages/server/lib/open_project.js:279:35)
    at Object.close (/Users/panzarino/Documents/GitHub/cypress/packages/server/lib/open_project.js:293:19)
    at IpcMainImpl.handleEvent (/Users/panzarino/Documents/GitHub/cypress/packages/server/lib/gui/events.js:316:26)
    at apply (/Users/panzarino/Documents/GitHub/cypress/node_modules/lodash/lodash.js:478:17)
    at IpcMainImpl.wrapper (/Users/panzarino/Documents/GitHub/cypress/node_modules/lodash/lodash.js:5337:16)
    at IpcMainImpl.emit (events.js:315:20)
    at Object.<anonymous> (electron/js2c/browser_init.js:157:9051)
    at Object.emit (events.js:315:20)

Versions

I've done some testing and discovered that this bug was introduced in af26fbe. It's not yet been released at the time of this issue being filed but will most likely appear for the first time in the next version (6.5.0 or 7.0.0)

@panzarino panzarino added type: regression A bug that didn't appear until a specific Cy version release pkg/server This is due to an issue in the packages/server directory labels Feb 16, 2021
@flotwig
Copy link
Contributor

flotwig commented Mar 24, 2021

Same issue over here when reloading the project via desktop-gui after a plugin error:

image

@lmiller1990
Copy link
Contributor

We could fix it like this: #15651

@bahmutov
Copy link
Contributor

bahmutov commented Apr 7, 2021

released in 7.0.0

@cypress-io cypress-io locked as resolved and limited conversation to collaborators May 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pkg/server This is due to an issue in the packages/server directory type: regression A bug that didn't appear until a specific Cy version release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants