Skip to content

Error: could not find CRI target #6518

Closed
@Snidhi-92

Description

@Snidhi-92

Current behavior:

Error: could not find CRI target when running on chrome

Note : Tests run successfully in electron and firefox

Desired behavior:

Tests should run in Chome browser

Test code to reproduce

Run Integration/example tests using command

 node_modules\.bin\cypress run  --browser chrome
could not find CRI target
Error: could not find CRI target
    at lazyAssLogic (C:\Users\nidhi\AppData\Local\Cypress\Cache\4.0.2\Cypress\resources\app\packages\server\node_modules\lazy-ass\index.js:110:14)
    at lazyAss (C:\Users\nidhi\AppData\Local\Cypress\Cache\4.0.2\Cypress\resources\app\packages\server\node_modules\lazy-ass\index.js:115:28)
    at findStartPage (C:\Users\nidhi\AppData\Local\Cypress\Cache\4.0.2\Cypress\resources\app\packages\server\lib\browsers\protocol.js:55:3)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)

Versions

Cypress: 4.0.2
Browser: Chrome 80
Windows 10

Activity

jennifer-shehane

jennifer-shehane commented on Feb 24, 2020

@jennifer-shehane
Member

Could you run Cypress in debug mode mode and print the entire set of logs here?

Specifically run:

set DEBUG=cypress:server:protocol
node_modules\.bin\cypress run  --browser chrome
Snidhi-92

Snidhi-92 commented on Feb 24, 2020

@Snidhi-92
Author
PS C:\Users\nidhi\CypressWorkspace> set DEBUG=cypress:server:protocol
PS C:\Users\nidhi\CypressWorkspace> node_modules\.bin\cypress run  --browser chrome


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

  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:    4.0.2                                                                              │
  │ Browser:    Chrome 80                                                                          │
  │ Specs:      20 found (examples\actions.spec.js, examples\aliasing.spec.js, examples\assertions │
  │             .spec.js, examples\connectors.spec.js, examples\cookies.spec.js, examples\cypress_ │
  │             api.spec.js, examples\files.spec.js, examples\local_storage.spec.js, examples\loca │
  │             tion.spec.j...)                                                                    │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


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

  Running:  examples\actions.spec.js                                                       (1 of 20)
Failed to connect to Chrome, retrying in 1 second (attempt 18/32)
Failed to connect to Chrome, retrying in 1 second (attempt 19/32)
Failed to connect to Chrome, retrying in 1 second (attempt 20/32)
Failed to connect to Chrome, retrying in 1 second (attempt 21/32)
Failed to connect to Chrome, retrying in 1 second (attempt 22/32)
Failed to connect to Chrome, retrying in 1 second (attempt 23/32)
Failed to connect to Chrome, retrying in 1 second (attempt 24/32)
Failed to connect to Chrome, retrying in 1 second (attempt 25/32)
Failed to connect to Chrome, retrying in 1 second (attempt 26/32)
Failed to connect to Chrome, retrying in 1 second (attempt 27/32)
Failed to connect to Chrome, retrying in 1 second (attempt 28/32)
Failed to connect to Chrome, retrying in 1 second (attempt 29/32)
Failed to connect to Chrome, retrying in 1 second (attempt 30/32)
Failed to connect to Chrome, retrying in 1 second (attempt 31/32)
Failed to connect to Chrome, retrying in 1 second (attempt 32/32)
could not find CRI target
Error: could not find CRI target
    at lazyAssLogic (C:\Users\nidhi\AppData\Local\Cypress\Cache\4.0.2\Cypress\resources\app\packages\server\node_modules\lazy-ass\index.js:110:14)
    at lazyAss (C:\Users\nidhi\AppData\Local\Cypress\Cache\4.0.2\Cypress\resources\app\packages\server\node_modules\lazy-ass\index.js:115:28)
    at findStartPage (C:\Users\nidhi\AppData\Local\Cypress\Cache\4.0.2\Cypress\resources\app\packages\server\lib\browsers\protocol.js:55:3)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
jennifer-shehane

jennifer-shehane commented on Feb 25, 2020

@jennifer-shehane
Member

Sorry, I don't see the logs I'm looking for here, it doesn't look like the DEBUG logs are taking effect. Can you actually try the below:

set DEBUG=cypress:*
node_modules\.bin\cypress run  --browser chrome
Snidhi-92

Snidhi-92 commented on Feb 25, 2020

@Snidhi-92
Author

Same error again

image

jennifer-shehane

jennifer-shehane commented on Feb 26, 2020

@jennifer-shehane
Member

@Snidhi-92 Yes, my previous comment and requests will not fix your issue.

The DEBUG logs just give us more information about your run to help fix your issue, but they are not being properly set so we are not seeing the logs. The logs should look something like below if they are set properly with new logs coming from cypress:cli etc:

Screen Shot 2020-02-26 at 3 53 57 PM

mobileappd

mobileappd commented on Mar 10, 2020

@mobileappd

Im experiencing the same issues. See attached logs.
cyrpress_chrome_crash_logs.txt

jennifer-shehane

jennifer-shehane commented on Mar 11, 2020

@jennifer-shehane
Member

Relevant logs from @mobileappd logs. Basically continues to log it's failure to connect over and over again until it gets to retryIndex: 19

  cypress:launcher launching browser { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', version: '80.0.3987.132', path: 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe', majorVersion: 80, isHeadless: false, isHeaded: true } to open about:blank +1s
  cypress:launcher spawning browser { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', version: '80.0.3987.132', path: 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe', majorVersion: 80, isHeadless: false, isHeaded: true } with args about:blank --test-type --ignore-certificate-errors --start-maximized --silent-debugger-extension-api --no-default-browser-check --no-first-run --noerrdialogs --enable-fixed-layout --disable-popup-blocking --disable-password-generation --disable-save-password-bubble --disable-single-click-autofill --disable-prompt-on-repos --disable-background-timer-throttling --disable-renderer-backgrounding --disable-renderer-throttling --disable-restore-session-state --disable-translate --disable-new-profile-management --disable-new-avatar-menu --allow-insecure-localhost --reduce-security-for-testing --enable-automation --disable-device-discovery-notifications --disable-infobars --autoplay-policy=no-user-gesture-required --disable-site-isolation-trials --metrics-recording-only --disable-prompt-on-repost --disable-hang-monitor --disable-sync --disable-web-resources --safebrowsing-disable-auto-update --safebrowsing-disable-download-protection --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --use-fake-ui-for-media-stream --use-fake-device-for-media-stream --disable-ipc-flooding-protection --disable-backgrounding-occluded-window --disable-breakpad --password-store=basic --use-mock-keychain --proxy-server=http://localhost:51998 --proxy-bypass-list=<-loopback> --remote-debugging-port=52001 --remote-debugging-address=127.0.0.1 --load-extension=C:\Users\dmarle\AppData\Roaming\Cypress\cy\production\browsers\chrome-stable\run-17656\CypressExtension,C:\Users\dmarle\AppData\Local\Cypress\Cache\4.1.0\Cypress\resources\app\packages\extension\theme --user-data-dir=C:\Users\dmarle\AppData\Roaming\Cypress\cy\production\browsers\chrome-stable\run-17656 --disk-cache-dir=C:\Users\dmarle\AppData\Roaming\Cypress\cy\production\browsers\chrome-stable\run-17656\CypressCache +0ms
  cypress:server:browsers:chrome connecting to Chrome remote interface at random port 52001 +2ms

---

  cypress:server:protocol attempting to find CRI target... { retryIndex: 0 } +502ms
  cypress:server:protocol CRI.List { 
    host: '127.0.0.1', 
    port: 52001, 
    getDelayMsForRetry: [Function: getDelayMsForRetry] 
  } +0ms
  cypress:server:protocol CRI List { 
    numTargets: 0, 
    targets: [] 
  } +8ms
  cypress:server:protocol error finding CRI target, maybe retrying { 
    delay: 100, 
    err: Error: could not find CRI target at lazyAssLogic (C:\Users\dmarle\AppData\Local\Cypress\Cache\4.1.0\Cypress\resources\app\packages\server\node_modules\lazy-ass\index.js:110:14) 
    at lazyAss (C:\Users\dmarle\AppData\Local\Cypress\Cache\4.1.0\Cypress\resources\app\packages\server\node_modules\lazy-ass\index.js:115:28) 
    at findStartPage (C:\Users\dmarle\AppData\Local\Cypress\Cache\4.1.0\Cypress\resources\app\packages\server\lib\browsers\protocol.js:55:3)     
    at processTicksAndRejections (internal/process/task_queues.js:85:5) 
  } +0ms

Then it starts to log this error over and over, while still throwing errs to connect to CRI target occasionally until it gets to retryIndex: 32, and then the delay on the retry is undefined at this point for some reason. cypress:server:protocol error finding CRI target, maybe retrying { delay: undefined,

  cypress:network:connect error getting address {
  hostname: 'mqitnybaa',
  port: 80,
  err: OperationalError: getaddrinfo ENOTFOUND mqitnybaa
      at GetAddrInfoReqWrap.onlookupall [as oncomplete] (dns.js:72:26)
   {
    cause: Error: getaddrinfo ENOTFOUND mqitnybaa
        at GetAddrInfoReqWrap.onlookupall [as oncomplete] (dns.js:72:26)
     {
      errno: 'ENOTFOUND',
      code: 'ENOTFOUND',
      syscall: 'getaddrinfo',
      hostname: 'mqitnybaa'
    },
    isOperational: true,
    errno: 'ENOTFOUND',
    code: 'ENOTFOUND',
    syscall: 'getaddrinfo',
    hostname: 'mqitnybaa'
  }
} +2s

Then a bunch of these errors:

cypress:network:connect received error on connect, retrying { iteration: 1, delay: 100, err: Error: connect ECANCELED 172.217.17.67:443     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14) { errno: 'ECANCELED', code: 'ECANCELED', syscall: 'connect', address: '172.217.17.67', port: 443 } } +15ms
Snidhi-92

Snidhi-92 commented on Mar 11, 2020

@Snidhi-92
Author

@jennifer-shehane Do we know what is the cause of this issue and how to resolve this?

jennifer-shehane

jennifer-shehane commented on Apr 10, 2020

@jennifer-shehane
Member

No, we haven't been able to reproduce it reliably on our side.

added a commit that references this issue on May 15, 2020
added
stage: needs reviewThe PR code is done & tested, needs review
and removed on May 15, 2020

18 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @jennifer-shehane@kawerewagaba@DarshitChanpura@mobileappd@wasiqkhan786

      Issue actions

        Error: could not find CRI target · Issue #6518 · cypress-io/cypress