mbolotov / intellij-cypress

IntelliJ-Cypress plugin: https://plugins.jetbrains.com/plugin/13819-intellij-cypress Pro version: https://plugins.jetbrains.com/plugin/13987-cypress-support-pro
MIT License
35 stars 5 forks source link

Cypress Support Plugin 1.6 gives errors and does not start test #123

Closed Willem1987 closed 1 year ago

Willem1987 commented 1 year ago

Describe the bug Cypress fails to start any tests.

"C:\Program Files\nodejs\npx.cmd" cypress run --e2e --config-file=projects/e2e-tests/cypress.config.ts --browser=chrome --e2e --reporter ....\intellij-cypress-reporter5743605112796192572.js --spec some-spec.cy.ts

DevTools listening on ws://127.0.0.1:53786/devtools/browser/99cd64c9-5fee-4f26-a86e-672722332e34

====================================================================================================

(Run Starting)

┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Cypress: 12.11.0 │ │ Browser: Chrome 116 (headless) │ │ Node Version: v18.17.1 (C:\Program Files\nodejs\node.exe) │ │ Specs: 1 found (beroep-detail.cy.ts) │ │ Searched: D:\some-path\some-spec-. │ │ cy.ts │ └────────────────────────────────────────────────────────────────────────────────────────────────┘

────────────────────────────────────────────────────────────────────────────────────────────────────

Running: some-spec.cy.ts (1 of 1) Launching browser chrome. Is headless: true Setting the browser window size to 2433 x 1080 Adding browser option for reduced motion to stabilize cypress scrolls All promises were rejected AggregateError: All promises were rejected

Versions:

Disabling the custom plugins seemed to have no effect. (Launching browser chrome. Is headless: true Setting the browser window size to 2433 x 1080 Adding browser option for reduced motion to stabilize cypress scrolls)

Manually installing version 1.5.2 seems to solve the issue. Updating back to 1.6 breaks it again

mbolotov commented 1 year ago

Hi @Willem1987! Thanks for reporting this issue. It will be fixed in 1.6.1 release which is under JetBrains review now. Meanwhile, you can try this bundle directly: Cypress Support-1.6.1.zip

Willem1987 commented 1 year ago

@mbolotov I can confirm the normal run works again with 1.6.1. Thank you for the quick fix.

2 days ago I moved my .IntelliJ folder and lost plugins, so i came across this by accident. Took me a while to figure out the version seems faulty.

I saw a mention in the release notes: Debugging support: a debug session can be started from IDE (Chrome and Electron browsers are supported).

Unfortunately I failed to find any additional info about how to go about this. I tried the Debug button on IntelliJ but got the following(trimmed attempt 1 up to 61 for brevity):

Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 50 seconds.

This usually indicates there was a problem opening the Chrome browser.

The CDP port requested was 62629.

Error: Could not find url target in browser about:blank. Targets were []
    at <embedded>:4614:316868
    at async n (<embedded>:4614:316032)
    at async Object.open (<embedded>:4620:50360)
    at async Object.open (<embedded>:4620:26066)
    at async v.relaunchBrowser (<embedded>:4686:433601)
mbolotov commented 1 year ago

Could you try to use the Electron browser? The debugging is started by clicking on the Debug button. No additional steps required.

Willem1987 commented 1 year ago

With electron (removing --browser chrome) it seems to work.

Willem1987 commented 1 year ago

I'm closing this issue as the new version works for me. I made a new issue for the chrome debugging support