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

Cannot read property 'show' of undefined when opening links in Command Log in Electron #14912

Closed
jennifer-shehane opened this issue Feb 4, 2021 · 4 comments · Fixed by #14914
Labels
browser: electron type: regression A bug that didn't appear until a specific Cy version release v6.4.0 🐛 Issue present since 6.4.0

Comments

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Feb 4, 2021

Current behavior

Starting in Cypress 6.4.0, Clicking the 'Learn more' link containing a docsUrl from within the Command Log of the Test Runner crashes when running tests in Electron browser.

(node:84685) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information
TypeError: Cannot read property 'show' of undefined
    at Object._launch (/Users/jennifer/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/electron.js:193:17)
    at Object._launchChild (/Users/jennifer/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/electron.js:189:17)
    at BrowserWindow.onNewWindow (/Users/jennifer/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/electron.js:137:22)
    at Object.<anonymous> (/Users/jennifer/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/gui/windows.js:192:36)
    at Object.emit (events.js:315:20)
    at Object.internalWindowOpen (electron/js2c/browser_init.js:181:2714)
    at Object.<anonymous> (electron/js2c/browser_init.js:157:11014)
    at Object.emit (events.js:315:20)

TypeError: Cannot read property 'show' of undefined
    at Object._launch (/Users/jennifer/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/electron.js:193:17)
    at Object._launchChild (/Users/jennifer/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/electron.js:189:17)
    at BrowserWindow.onNewWindow (/Users/jennifer/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/electron.js:137:22)
    at Object.<anonymous> (/Users/jennifer/Library/Caches/Cypress/6.4.0/Cypress.app/Contents/Resources/app/packages/server/lib/gui/windows.js:192:36)
    at Object.emit (events.js:315:20)
    at Object.internalWindowOpen (electron/js2c/browser_init.js:181:2714)
    at Object.<anonymous> (electron/js2c/browser_init.js:157:11014)
    at Object.emit (events.js:315:20)

This is being thrown at this line of code: https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/browsers/electron.js#L189:L189

Test code to reproduce

it('test', () => {
  cy.clock('250')
})
  1. cypress open and select 'Electron' browser
  2. Run test code above
  3. Click 'Learn More' when the test fails

Versions

Cypress 6.4.0

@jennifer-shehane jennifer-shehane added type: regression A bug that didn't appear until a specific Cy version release browser: electron v6.4.0 🐛 Issue present since 6.4.0 labels Feb 4, 2021
@cypress-bot cypress-bot bot added the stage: ready for work The issue is reproducible and in scope label Feb 4, 2021
@jennifer-shehane
Copy link
Member Author

This was introduced in this PR: #14749 The signature of the _launch function was changed and the call was not updated with the new order of args.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2021

Internal Jira issue: TR-663

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 9, 2021

The code for this is done in cypress-io/cypress#14914, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label Feb 9, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 16, 2021

Released in 6.5.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Feb 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
browser: electron type: regression A bug that didn't appear until a specific Cy version release v6.4.0 🐛 Issue present since 6.4.0
Projects
None yet
1 participant