cypress run times out waiting for the browser to connect

Created on 4 Feb 2019  Β·  40Comments  Β·  Source: cypress-io/cypress

Current behavior:

I have an automated release for my test suite. It consists of 8 specs that are executed one after the other.

A few weeks back, one of the specs got stuck and I had to force a shutdown of the release. After that, on every release, after the first spec is run, Cypress fails to open the browser or find it or something and the tests fail.

This is the error I'm getting:

2019-02-04T02:11:09.1221261Z Timed out waiting for the browser to connect. Retrying...
2019-02-04T02:11:39.1105823Z 
2019-02-04T02:11:39.4465327Z Timed out waiting for the browser to connect. Retrying again...
2019-02-04T02:12:09.4535443Z 
2019-02-04T02:12:10.1352111Z The browser never connected. Something is wrong. The tests cannot run. Aborting...

I have deleted the Virtual Machine I use for the test and created it again, changed versions of Chrome, changed versions of Cypress and nothing changes.
If I enter the VM with the release user, and use the command manually on a command line, it works, but in the automated release doesn't.

I'm currently out of ideas.

Desired behavior:

Every spec should run correctly as it did before

Versions

Cypress 3.1.4 and 3.1.5
Chrome 72.0.3626
VSTS for release automation

azure needs information

Most helpful comment

@jennifer-shehane , is there any progress on this please? The issue is there from Feb 2019. The question which you asked and on which you set the label "stage: needs information" was answered the very next day - Feb 22, 2019, and the label is still here.

All 40 comments

Is there any way to clear the App Data or maybe uninstall / reinstall Cypress altogether?

Is there any way to clear the App Data or maybe uninstall / reinstall Cypress altogether?

We did. We uninstalled and reinstalled and then uninstalled again and installed previous version.
After that we uninstalled and reinstalled.
We even deleted the VM and created it again new, and nothing changed.

Are these tests able to run when opened in Electron locally?

Could you provide the test code - for spec 1 + spec 2?

Likely something changed a few weeks ago that is causing this.

If I run them locally, they open both in Electron and in Chrome.
In fact, if I enter the VM and run the same command manually it works.

import { documentManagementModule } from "../../id-collection"

const setDate = (datePicker, date) => { 
    datePicker.wait(3000)

    let dels = '{selectall}{del}';

    datePicker.type('${dels}${date}')
    cy.wait(4000)
}

describe('Document Management - Search Document', function () {
    after(function() {
        cy.reload(true)

        cy.url()
            .should('contain',Cypress.env('url_base_comparar'))

        cy.get(documentManagementModule.common.user_badge_topmenu)
            .click()

        cy.get(documentManagementModule.common.user_badge_popup)
            .should('exist')

        cy.get(documentManagementModule.common.user_badge_logout)
            .click()
            .wait(2000)
    })

    it('TC1163 - check functionality of Document List button', function () {
        cy.reload(true)

        cy.get(documentManagementModule.DMcommon.menu_item_UploadDocument)
            .should('be.visible')

        cy.get(documentManagementModule.DMcommon.menu_item_UploadDocument)
            .click()

        cy.get(documentManagementModule.searchDocument.patientSearch)
            .should('be.visible')

        cy.url()
            .should('contain', 'new')

        cy.get(documentManagementModule.DMcommon.menu_item_ListDocuments)
            .should('be.visible')

        cy.get(documentManagementModule.DMcommon.menu_item_ListDocuments)
            .click()

        cy.url()
            .should('contain','search')
    })

    it('TC1205 - check there are no documents when page loads and the filter window is open', function () {
        cy.visit('app/search')

        cy.get('body')
            .type('{esc}',{force:true})

        cy.get(documentManagementModule.searchDocument.noResults)
            .should('exist')
    })

    it('TC1207 - check functionality of select all', function () {
        cy.visit('app/search')

        cy.get('body')
            .type('{esc}',{force:true})

        cy.get(documentManagementModule.searchDocument.noResults)
            .should('exist')

        cy.get(documentManagementModule.searchDocument.medicalServices_Input)
            .wait(4000)
            .type('cardio{enter}',{ force: true })

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.results_list)
            .should('contain','CARDIOLOGÍA')

        cy.get(documentManagementModule.searchDocument.selectCounter)
            .should('contain','0')

        cy.get(documentManagementModule.searchDocument.selectAll)
            .click({force:true})

        cy.get(documentManagementModule.searchDocument.selectCounter)
            .should('contain','52')
    })

    it('TC1206 - chech functionality of filter button', function () {
        cy.visit('app/search')

        cy.get(documentManagementModule.searchDocument.patientSearchComponent)
            .should('exist')

        cy.get(documentManagementModule.searchDocument.btnFilters)
            .click()

        cy.get(documentManagementModule.searchDocument.patientSearchComponent)
            .should('not.exist')

        cy.get(documentManagementModule.searchDocument.btnFilters)
            .click()

        cy.get(documentManagementModule.searchDocument.patientSearchComponent)
            .should('exist')
    })

    it('TC1184 - search by patient', function () {
        cy.visit('app/search')

        cy.get(documentManagementModule.searchDocument.patientSearchComponent)
            .type(Cypress.env('patient'),{ force: true })

        cy.get(documentManagementModule.searchDocument.patient_search_result)
            .should('contain',Cypress.env('patient'))
            .click()

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.results_list)
            .should('contain',Cypress.env('patient'))
    })

    it('TC1185 - search by issuer', function () {
        cy.visit('app/search')

        cy.get(documentManagementModule.searchDocument.issuers_Input)
            .wait(4000)
            .type('adeslas{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.results_list)
            .should('not.contain','Sin resul')
    })

    it('TC1203 - search by document date', function () {
        cy.visit('app/search')

        setDate(cy.get(documentManagementModule.searchDocument.documentDateStart), '01/01/2018')

        cy.get(documentManagementModule.searchDocument.helper_documentDateEnd)
            .should('contain','rellenar tambiΓ©n')

        setDate(cy.get(documentManagementModule.searchDocument.documentDateEnd), '01/01/2017')

        cy.get(documentManagementModule.searchDocument.helper_documentDateEnd)
            .should('contain','debe ser mayor')

        setDate(cy.get(documentManagementModule.searchDocument.documentDateEnd), '07/11/2018')

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.results_list)
            .should('contain','07/11/2018')
    })

    it('TC1204 - search by publish date', function () {    
        cy.visit('app/search')

        setDate(cy.get(documentManagementModule.searchDocument.publishedDateStart), '01/01/2018')

        cy.get(documentManagementModule.searchDocument.helper_publishedDateEnd)
            .should('contain','rellenar tambiΓ©n')

        setDate(cy.get(documentManagementModule.searchDocument.publishedDateEnd), '01/01/2017')

        cy.get(documentManagementModule.searchDocument.helper_publishedDateEnd)
            .should('contain','debe ser mayor')

        setDate(cy.get(documentManagementModule.searchDocument.publishedDateEnd), '07/11/2018')

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.results_list)
            .should('contain','07/11/2018')
    })

    it('TC1186 - search by medical services', function () {
        cy.visit('app/search')

        cy.get(documentManagementModule.searchDocument.medicalServices_Input)
            .wait(4000)
            .debug()
            .type('admi{enter}alerg{enter}qui{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.medicalServices_Values)
            .should('contain','3 seleccionados')     

        cy.get(documentManagementModule.searchDocument.documentName)
            .click()

        cy.get(documentManagementModule.searchDocument.medicalServices_Input)
            .type('qui{enter}alerg{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.medicalServices_Values)
            .should('contain','ADMISIONP')

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.results_list)
            .should('contain','ADMISIΓ“N')
    })

    it('TC1187 - search by document name', function () {
        cy.visit('app/search')

        cy.get(documentManagementModule.searchDocument.documentName)
            .type('UDA',{ force: true })

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.helper_documentName)
            .should('contain','al menos 4')

        cy.get(documentManagementModule.searchDocument.documentName)
            .clear()

        cy.get(documentManagementModule.searchDocument.documentName)
            .type('BUDA',{ force: true })

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.results_list)
            .should('not.contain','Sin resultados')
    })

    it('TC1217 - search by category', function () {
        cy.visit('app/search')

        cy.get(documentManagementModule.searchDocument.categories_Input)
            .wait(4000)
            .type('tipos{enter}acre{enter}ident{enter}local{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.categories_Values)
            .should('contain','4 seleccionados')   

        cy.get(documentManagementModule.searchDocument.documentTypes_Input)
            .type('empa{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.documentTypes_Values)
            .should('contain','EMPADRONAMIENTO')

        cy.get(documentManagementModule.searchDocument.categories_Input)
            .type('local{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.categories_Values)
            .should('contain','3 seleccionados')   

        cy.get(documentManagementModule.searchDocument.documentTypes_clear_button)
            .click()

        cy.get(documentManagementModule.searchDocument.categories_Input)
            .type('{esc}')

        cy.get(documentManagementModule.searchDocument.documentTypes_Input)
            .type('dni{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.documentTypes_Values)
            .should('contain','DNI')

        cy.get(documentManagementModule.searchDocument.categories_Input)
            .type('ident{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.categories_Values)
            .should('contain','2 seleccionados') 

        cy.get(documentManagementModule.searchDocument.documentTypes_clear_button)
            .click()

        cy.get(documentManagementModule.searchDocument.categories_Input)
            .type('{esc}')

        cy.get(documentManagementModule.searchDocument.documentTypes_Input)
            .type('derecho{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.documentTypes_Values)
            .should('contain','DOCUMENTO DE DERECHO')

        cy.get(documentManagementModule.searchDocument.categories_Input)
            .type('acre{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.categories_Values)
            .should('contain','TIPOS FLORENCE')  

        cy.get(documentManagementModule.searchDocument.documentTypes_clear_button)
            .click()

        cy.get(documentManagementModule.searchDocument.categories_Input)
            .type('{esc}')

        cy.get(documentManagementModule.searchDocument.documentTypes_Input)
            .type('alta{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.documentTypes_Values)
            .should('contain','ALTA VOLUNTARIA')

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.results_list)
            .should('contain','ALTA VOLUNTARIA')
    })

    it('TC1218 - search by document type', function () {
        cy.visit('app/search')

        cy.get(documentManagementModule.searchDocument.documentTypes_Input)
            .wait(4000)
            .type('alta{enter}derecho{enter}dni{enter}empa{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.documentTypes_Values)
            .should('contain','4 seleccionados')

        cy.get(documentManagementModule.searchDocument.categories_Input)
            .type('tipos{enter}acre{enter}local{enter}iden{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.categories_Values)
            .should('contain','4 seleccionados') 

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.results_list)
            .should('not.contain','Sin resulta')
    })

    it('TC1221 - search by clinical act type', function () {
        cy.visit('app/search')

        cy.get(documentManagementModule.searchDocument.clinicalActTypes_Input)
            .wait(4000)
            .type('inter{enter}imagen{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.clinicalActTypes_Values)
            .should('contain','2 seleccionados')

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.results_list)
            .should('contain','TORAX')
    })

    it('TC1222 - search by clinical act', function () {
        cy.visit('app/search')

        cy.get(documentManagementModule.searchDocument.clinicalActs_Input)
            .wait(4000)
            .type('13000023 - Densi{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.clinicalActTypes_Input)
            .wait(4000)
            .type('inter{enter}imagen{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.clinicalActs_Values)
            .should('not.exist')

        cy.get(documentManagementModule.searchDocument.clinicalActs_Input)
            .type('13000023 - Densi{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.patientSearchComponent)
            .type(Cypress.env('patient'),{ force: true })

        cy.get(documentManagementModule.searchDocument.patient_search_result)
            .should('contain',Cypress.env('patient'))
            .click()

        cy.get(documentManagementModule.searchDocument.clinicalActs_Input)
            .type('13000023 - Densi{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.clinicalActs_Values)
            .should('contain','DENSITOMETRIA')

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.results_list)
            .should('contain','DENSITOMETRIA')
    })

    it('TC1223 - search by clinical act code', function () {
        cy.visit('app/search')

        cy.get(documentManagementModule.searchDocument.clinicalActCode)
            .type('13000023',{ force: true })

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.results_list)
            .should('contain','13000023')
    })

    it('TC1224 - check functionality of CLEAN button', function () {
        cy.visit('app/search')

        cy.get(documentManagementModule.searchDocument.patientSearchComponent)
            .type(Cypress.env('patient'),{ force: true })//1043319

        cy.get(documentManagementModule.searchDocument.patient_search_result)
            .should('contain',Cypress.env('patient'))
            .click()

        cy.get(documentManagementModule.searchDocument.documentName)
            .type('Test name',{ force: true })
            .wait(4000)

        cy.get(documentManagementModule.searchDocument.medicalServices_Input)
            .type('admisi{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.issuers_Input)
            .type('adeslas{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.medicalServices_Input)
            .type('{esc}')

        cy.get(documentManagementModule.searchDocument.categories_Input)
            .type('florence{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.documentTypes_Input)
            .type('alta{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.clinicalActTypes_Input)
            .type('imagen{enter}{esc}')

        cy.get(documentManagementModule.searchDocument.documentTypes_Input)
            .type('{esc}')

        cy.get(documentManagementModule.searchDocument.clinicalActTypes_Input)
            .type('{esc}')

        cy.get(documentManagementModule.searchDocument.clinicalActs_Input)
            .type('densitometria{enter}{esc}',{forced:true})

        cy.get(documentManagementModule.searchDocument.clinicalActCode)
            .type('13000023',{ force: true })

        setDate(cy.get(documentManagementModule.searchDocument.documentDateStart), '01/04/2018')

        setDate(cy.get(documentManagementModule.searchDocument.documentDateEnd), '30/04/2018')

        setDate(cy.get(documentManagementModule.searchDocument.publishedDateStart), '01/04/2018')

        setDate(cy.get(documentManagementModule.searchDocument.publishedDateEnd), '30/04/2018')

        cy.get(documentManagementModule.searchDocument.cleanButton)
            .click()

        cy.get(documentManagementModule.searchDocument.patientSearchComponent)
            .should('be.empty')

        cy.get(documentManagementModule.searchDocument.documentName)
            .should('be.empty')

        cy.get(documentManagementModule.searchDocument.medicalServices_Input)
            .should('be.empty')

        cy.get(documentManagementModule.searchDocument.issuers_Input)
            .should('be.empty')

        cy.get(documentManagementModule.searchDocument.categories_Input)
            .should('be.empty')

        cy.get(documentManagementModule.searchDocument.documentTypes_Input)
            .should('be.empty')

        cy.get(documentManagementModule.searchDocument.clinicalActTypes_Input)
            .should('be.empty')

        cy.get(documentManagementModule.searchDocument.clinicalActs_Input)
            .should('be.empty')

        cy.get(documentManagementModule.searchDocument.clinicalActCode)
            .should('be.empty')

        cy.get(documentManagementModule.searchDocument.documentDateStart)
            .should('be.empty')

        cy.get(documentManagementModule.searchDocument.documentDateEnd)
            .should('be.empty')

        cy.get(documentManagementModule.searchDocument.publishedDateStart)
            .should('be.empty')

        cy.get(documentManagementModule.searchDocument.publishedDateEnd)
            .should('be.empty')

        cy.get('body')
            .type('{esc}',{force:true})
    })

    it('TC1219 - click on a document and check its opened and data is correct', function () {
        cy.visit('app/search')

        cy.get(documentManagementModule.searchDocument.patientSearchComponent)
            .type(Cypress.env('patient'),{ force: true })

        cy.get(documentManagementModule.searchDocument.patient_search_result)
            .should('contain',Cypress.env('patient'))
            .click()

        cy.get(documentManagementModule.searchDocument.documentName)
            .type('ENALG')

        cy.get(documentManagementModule.searchDocument.searchButton)
            .click()

        cy.get(documentManagementModule.searchDocument.btnView_result)
            .click()

        cy.url()
            .should('contain','/view/')

        cy.get(documentManagementModule.searchDocument.patientSearch)
            .should('contain','FELICISIMO ANGEL')

        cy.get(documentManagementModule.searchDocument.categoryInput)
            .should('contain','TIPOS FLORENCE')

        cy.get(documentManagementModule.searchDocument.serviceInput)
            .should('contain','ALERGOLOGÍA')

        cy.get(documentManagementModule.searchDocument.documentTypeInput)
            .should('contain','INFORME ENDOSCOPIA')
    })
})

The weird thing is that it doesn't seem to be related to the spec as I tried changing them (order and so) and it didn't change a thing.
First spec always executes perfectly, second one can't open browser anymore.

Apart from that, the only thing we do is log in:

it('TC1317 - Check that login works', function () {
    cy.visit('')

    cy.get('#btnLoginOauth')
        .click()

    cy.get("#dniField")
        .type(Cypress.env('user'),{force:true})

    cy.get("#passwordField")
        .type(Cypress.env('pwd'),{force:true})

    cy.get("#btnLogin")
        .click()

    cy.wait(5000)
})

Perhaps try to collect some more logging information during cypress run https://on.cypress.io/debugging#Print-DEBUG-logs

You may also want to be aware of this issue - where the click does not execute in after hooks if a test fails: https://github.com/cypress-io/cypress/issues/2831 but I don't think this is related to your problem.

You may also want to be aware of this issue - where the click does not execute in after hooks if a test fails: #2831 but I don't think this is related to your problem.

Yeah, I've been dealing with this too, but it's not related to my problem as the first spec, which in my case just tries to log in, log out and make an incorrect login, works perfectly and it closes the browser.
And the next spec doesn't even do a click because the browser never opens.

I'm checking 2831 anyway, thanks!

Will try to DEBUG and get extra information.

Just a set DEBUG=cypress:* would work or is it better to go for set DEBUG=cypress:launcher?

Hello,

I have tried using DEBUG=cypress:*, however, didn't get any additional information, as the logs do not include the debugging information in the console, and if I execute everything manually, it works perfectly.

Any other idea or workaround? Is there a way to log in a file everything printed by DEBUG=cypress:*?

I think you're going to have to try to narrow down the test code base to find the core issue. So, cut out half of test code, does it still fail. Try half of that code, etc until you get it to the smallest amount of code to run to reproduce.

@bahmutov - you have any leads or suggestions? I know you worked with VSTS some.

@jennifer-shehane I face the same issue (intermittently). With cypress version 3.1.5. For earlier versions it use to work just fine.

Running my test suite locally using npx cypress run (Electron 59) sometimes works and sometimes it doesn't and fails before running the first test.

image

I too got the same error, the first two specs are running properly, However from the third spec onwards I am gettin the error :
Screenshot 2019-03-23 at 8 54 20 PM

I found the cause of that issue. It seems like while starting, cypress threw an error which didn't allow the headless browser to fetch the URL (baseUrl in cypress.json) because the base URL had auth credentials and there were a couple of other URL's mentioned under env (which were cross domain) which my tests needed to access. This was the primary issue.

Removed baseUrl altogether and I created a variable under 'env' (for all the URL's) and then it worked fine. Looks like there is CORS related bug, where cypress cannot connect to electron while reading the baseUrl value from cypress.json which further has multiple urls (cross-domain) mentioned elsewhere in the same file.

@devsh4 See this issue - it is what you are describing https://github.com/cypress-io/cypress/issues/1598

I have the very same issue. Cypress version 3.1.0. There is no auth credential in the baseUrl. Cypress fails from time to time, about one of 10 times is failed.

Thanks @jennifer-shehane for trying to support, but I am having the same issue and all the suggestions implies try-error attempt. Here is the log I have:

We encountered an unexpected error talking to our servers.
Because you passed the --parallel flag, this run cannot proceed because it requires a valid response from our servers.
The --group flag you passed was: web
The --ciBuildId flag you passed was: 3082
The server's response was:
StatusCodeError: 503
{
  "error": "timed out creating run"
}

and it looks like a failure of cypress to orchestrate parallel request or even allocate diff servers/machines to it.

Were experiencing this right now. Is there any fix for this?

There is a workout around to fix this problem. You can overwrite their values reseting the env variable API_RETRY_INTERVALS. In my case I added to my CI/CD pipeline the following configuration:

Name: API_RETRY_INTERVALS
Value: 5000,5000,5000,10000,5000,5000,5000,10000

It means the Cypress will retry every 5 seconds 3 times, then 10 seconds and so on. The number of retries are exactly the length of your value list.

Looks like headless electron works without that issue. @cbernardes Could you explain that magic ?

Hey @Pavel-Husakouski it is not magic. It is just the way they have built, I hope intentionally, their middleware. In my case it was hanging-out on the first try only, but it was enough to delay my CI/CD. After digging through their code I found this solution :D.

openSource <3.

Actually, all our tests are failed because of this issue. Cypress tries to connect per every test and fails - about twenty times "The browser never connected. Something is wrong. The tests cannot run. Aborting..."
We switched to headless electron because looks like it works a bit better. However, I don't have enough statistic to make any serious judgement.

@Pavel-Husakouski this is only necessary when you run your tests in parallel. This request is exactly to know which suite to pull from the queue. Said so, I would strongly encourage you to run your CI/CD with electron.
If this is happening when you are running your tests locally, I would say you are having the wrong approach. They have a very good dashboard to help you with your tests execution and this don't require the API request which triggers the error referenced in this page issue.

I was experiencing this error while using angular cli for the server and the electron browser. I think the problem was that the live-reload server was trying to reload the application during the process of the cypress testing. When I serverd the code with these flags: ng serve --liveReload=false --watch=false, then it worked perfectly. Hopefully this helps some.

I think the problem was that the live-reload server was trying to reload the application during the process of the cypress testing. When I served the code with these flags: ng serve --liveReload=false --watch=false, then it worked perfectly. Hopefully this helps some.

That's interesting. However, we don't use any live reload under Cypress. Moreover, we face the issue under the production environment. Anyway, electron works much better.

I too got the same error on cypress 4.1.0, auto execution, I run CI/CD with electron, but 10% can got this error.

We are also facing same issue , the fist spec execution is passed and remaining spec file execution status results in failure due to time out issue.continuous failure in headless and test runner too.unable to invoke the electron browser from second spec execution.Tried out with all specified options ,it's invain.

Issue can be reproducible with cypress 3.4.1 ,3.8.3 as well as v4.0.0 on electron .
Looking forward for further resolution .

Same issue here. Everything works like a charm on MacOS, but on our system server with Debian Stretch, google-chrome-stable 79, node 12.16.1 and npm 6.14.4 it does not work. It is 100% cypress error, because I tried the following versions:

  • 4.3.0 - the error occured, browser is not connected
  • 4.2.0 - the error occured, browser is not connected
  • 4.1.0 - the error occured, browser is not connected
  • 4.0.2 - the error occured, browser is not connected
  • 4.0.1 - the error occured, browser is not connected
  • 4.0.0 - the error occured, browser is not connected
  • 3.8.3 - works!

I try to run test in headless mode, and I'm using base url, and my tests return error with:

Timed out to connect to browser, 

after I try to use Chrome headless, it helped for me

npx cypress run --browser chrome --headless --spec

Just tested upgrading to v4. Also producing it within our pipeline (alpine linux). Produced calling Chrome or Electron. Locally (cypress open or run) on an ubuntu it's ok, strangely enough. We're going back to v3 :(.

We actually get 1 file ok, and then 2nd file fails (stopping the pipeline).
image

Cypress: 4.3.0
same issue - after first spec is running well, the next one is showing Time out waiting error, when use cypress run.
2020-04-14_1051

But @rockthis13 solution is working for me too, thank you)

npx cypress run --browser chrome --headless

I think this new onError is not a function error may be due to the changes in https://github.com/cypress-io/cypress/pull/6610. Although this is not related to why the browser is not connecting in the first place and does not address the original issue - just a newer error being thrown since 4.2.0 that should not be.

I indeed added code to the impacted branch, plugin/index file lately to handle baseUrl: a switch case based on a 'platform' --env. variable. This allow us to get the right baseUrl depending on the tested env. We fallback to a default value (dev localhost:xxxx URL) if platform id not defined. Maybe that code is what caused the connection matter to start with. I'm in OOO for several weeks, but I'll try to check for that theory when back at work and let u know.

Same with headless Chrome. Runs fine with Electron.
Using cypress/browsers:chrome69 on AWS Code Pipeline

image

Hi,
So last time I had an OK master, and a KO branch.
I took a new branch from my OK master and just executed the 3.4 to 4.3 upgrade. This works fine.
So indeed, as stated by @jennifer-shehane the update did not trigger the problem for us. I wil re-introduce the remaining cypress code I added to the KO branch progressively and let you know what part triggered the issue for us.

I use "while" command then my Test Case can't connect with any browser. Anyone can give me some solutions for this case?

I got this recently during a upgrade to v5.

Running with DEBUG=cypress:* env variable I compared the logs before a successful transition to a new spec and one that failed. I spotted that the failing logs did not feature a log that the plugin event before browser launch was resolved.
Then I traced back to the previous cypress:server:plugin logs and found a after screenshot plugin event that never returned.. it seems I had made a typo that meant a plugin didn’t respond.
Fixing that fixed the issue. It would be nice if cypress warned if plugin events take more than 20 seconds.
Including this here in case it helps someone else debug this problem in their own case.

Actual for v5.2
As I understand, Cypress sometime can't connect due to some Errors which couldn't be handled
Have multiple Test runnings on Feature branches and have such a "Connection" problem sometimes

Can't connect to Chrome but works with Firefox

@jennifer-shehane , is there any progress on this please? The issue is there from Feb 2019. The question which you asked and on which you set the label "stage: needs information" was answered the very next day - Feb 22, 2019, and the label is still here.

We have the same problem last 2-3 weeks (Chrome + run on Azure Devops Self-Hosted agents).

Running all the tests will kill out machine for self-hosted Azure Agents. Can you help us? Which would help you to better identify the problem?

Output from debug console:
2020-11-19T09:58:20.1270856Z Timed out waiting for the browser to connect. Retrying...
2020-11-19T09:58:20.1271548Z 2020-11-19T09:58:20.095Z cypress:server:run waiting for socket to connect and browser to launch...
2020-11-19T09:58:20.1272623Z 2020-11-19T09:58:20.095Z cypress:server:run waiting for socket connection... { id: 'derj6' }
2020-11-19T09:58:20.1273078Z 2020-11-19T09:58:20.095Z cypress:server:run setting Chrome properties { shouldWriteVideo: false }
2020-11-19T09:58:20.1274831Z 2020-11-19T09:58:20.095Z cypress:server:open_project resetting project state, preparing to launch browser chrome for spec { name: 'features\invoicing\base\email.feature', relative: 'cypress\e2e\features\invoicing\base\email.feature', absolute: 'D:/agents/esw-01/_work/r11/a/E2E_Tests/cypress/e2e/features/invoicing/base/email.feature', specType: 'integration' } options { automationMiddleware: { onAfterResponse: [Function: onAfterResponse] }, projectRoot: 'D:\agents\esw-01\_work\r11\a\E2E_Tests', onWarning: [Function] }
2020-11-19T09:58:20.1276477Z 2020-11-19T09:58:20.095Z cypress:server:project resetting project instance D:agentsesw-01_workr11aE2E_Tests
2020-11-19T09:58:20.1276940Z 2020-11-19T09:58:20.095Z cypress:proxy:http:util:buffers resetting buffers
2020-11-19T09:58:20.1277254Z 2020-11-19T09:58:20.095Z cypress:server:server Setting remoteAuth undefined

...

2020-11-19T09:58:30.0626408Z 2020-11-19T09:58:30.061Z cypress:server:util:process_profiler current & mean memory and CPU usage by process group:
2020-11-19T09:58:30.0627110Z β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
2020-11-19T09:58:30.0628100Z β”‚ (index) β”‚ group β”‚ processCount β”‚ pids β”‚ cpuPercent β”‚ meanCpuPercent β”‚ memRssMb β”‚ meanMemRssMb β”‚ maxMemRssMb β”‚
2020-11-19T09:58:30.0629837Z β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
2020-11-19T09:58:30.0630457Z β”‚ 0 β”‚ 'plugin' β”‚ 1 β”‚ '14560' β”‚ 0 β”‚ 0.21 β”‚ 518.65 β”‚ 353.69 β”‚ 602.35 β”‚
2020-11-19T09:58:30.0630971Z β”‚ 1 β”‚ 'other' β”‚ 12 β”‚ '25244, 23976, 18084, 29176, 26884, 9352 ... 6 more items' β”‚ 10.7 β”‚ 0.5 β”‚ 305.74 β”‚ 91.46 β”‚ 307.82 β”‚
2020-11-19T09:58:30.0631682Z β”‚ 2 β”‚ 'cypress' β”‚ 1 β”‚ '13848' β”‚ 0.23 β”‚ 0.45 β”‚ 150.66 β”‚ 152.75 β”‚ 165.25 β”‚
2020-11-19T09:58:30.0632097Z β”‚ 3 β”‚ 'TOTAL' β”‚ 14 β”‚ '-' β”‚ 10.94 β”‚ 5.37 β”‚ 975.05 β”‚ 1092.71 β”‚ 1338.12 β”‚
2020-11-19T09:58:30.0632560Z β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
2020-11-19T09:58:45.0124591Z 2020-11-19T09:58:45.011Z cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 60939 }
2020-11-19T09:58:45.1372793Z 2020-11-19T09:58:45.011Z cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 60940 }
2020-11-19T09:58:53.9130048Z 2020-11-19T09:58:53.907Z cypress:server:util:process_profiler current & mean memory and CPU usage by process group:
2020-11-19T09:58:53.9377310Z β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
2020-11-19T09:58:53.9901715Z β”‚ (index) β”‚ group β”‚ processCount β”‚ pids β”‚ cpuPercent β”‚ meanCpuPercent β”‚ memRssMb β”‚ meanMemRssMb β”‚ maxMemRssMb β”‚
2020-11-19T09:58:54.0010860Z β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
2020-11-19T09:58:54.0196565Z β”‚ 0 β”‚ 'plugin' β”‚ 1 β”‚ '14560' β”‚ 0 β”‚ 0.21 β”‚ 518.65 β”‚ 355.16 β”‚ 602.35 β”‚
2020-11-19T09:58:54.0328151Z β”‚ 1 β”‚ 'other' β”‚ 13 β”‚ '25244, 23976, 18084, 29176, 26884, 9352 ... 7 more items' β”‚ 56.46 β”‚ 0.99 β”‚ 308.39 β”‚ 93.38 β”‚ 308.39 β”‚
2020-11-19T09:58:54.0523328Z β”‚ 2 β”‚ 'cypress' β”‚ 1 β”‚ '13848' β”‚ 1.82 β”‚ 0.46 β”‚ 150.64 β”‚ 152.74 β”‚ 165.25 β”‚
2020-11-19T09:58:54.0523991Z β”‚ 3 β”‚ 'TOTAL' β”‚ 15 β”‚ '-' β”‚ 58.28 β”‚ 5.84 β”‚ 977.68 β”‚ 1091.69 β”‚ 1338.12 β”‚
2020-11-19T09:58:54.0524612Z β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
2020-11-19T09:59:00.8160677Z 2020-11-19T09:59:00.815Z cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 61289 }
2020-11-19T09:59:04.7564405Z 2020-11-19T09:59:04.746Z cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 61389 }
2020-11-19T09:59:05.3816034Z 2020-11-19T09:59:05.381Z cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 61403 }
2020-11-19T09:59:06.0742786Z 2020-11-19T09:59:06.071Z cypress:server:util:process_profiler current & mean memory and CPU usage by process group:
2020-11-19T09:59:06.0792205Z β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
2020-11-19T09:59:06.0806672Z β”‚ (index) β”‚ group β”‚ processCount β”‚ pids β”‚ cpuPercent β”‚ meanCpuPercent β”‚ memRssMb β”‚ meanMemRssMb β”‚ maxMemRssMb β”‚
2020-11-19T09:59:06.0901859Z β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
2020-11-19T09:59:06.0930358Z β”‚ 0 β”‚ 'plugin' β”‚ 1 β”‚ '14560' β”‚ 0 β”‚ 0.21 β”‚ 518.68 β”‚ 356.61 β”‚ 602.35 β”‚
2020-11-19T09:59:06.0948297Z β”‚ 1 β”‚ 'other' β”‚ 12 β”‚ '25244, 23976, 18084, 29176, 26884, 9352 ... 6 more items' β”‚ 13.98 β”‚ 1.11 β”‚ 306.16 β”‚ 95.24 β”‚ 308.39 β”‚
2020-11-19T09:59:06.1145862Z β”‚ 2 β”‚ 'cypress' β”‚ 1 β”‚ '13848' β”‚ 0.43 β”‚ 0.46 β”‚ 149.04 β”‚ 152.7 β”‚ 165.25 β”‚
2020-11-19T09:59:06.1147184Z β”‚ 3 β”‚ 'TOTAL' β”‚ 14 β”‚ '-' β”‚ 14.41 β”‚ 5.91 β”‚ 973.88 β”‚ 1090.66 β”‚ 1338.12 β”‚
2020-11-19T09:59:06.1167857Z β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
2020-11-19T09:59:12.7409493Z 2020-11-19T09:59:12.736Z cypress:server:cypress exiting with err [OperationalError: EPERM: operation not permitted, unlink 'C:Usersagent-esw-01AppDataRoamingCypresscyproductionbrowserschrome-stablerun-13848CypressCacheDefaultCachedata_2'
2020-11-19T09:59:12.7480918Z
2020-11-19T09:59:12.7930402Z ] {
2020-11-19T09:59:12.9137124Z cause: [Error: EPERM: operation not permitted, unlink 'C:Usersagent-esw-01AppDataRoamingCypresscyproductionbrowserschrome-stablerun-13848CypressCacheDefaultCachedata_2'
2020-11-19T09:59:12.9907060Z
2020-11-19T09:59:13.0034960Z ] {
2020-11-19T09:59:13.0279710Z errno: -4048,
2020-11-19T09:59:13.0360470Z code: 'EPERM',
2020-11-19T09:59:13.0855857Z syscall: 'unlink',
2020-11-19T09:59:13.1072126Z path: 'C:\Users\agent-esw-01\AppData\Roaming\Cypress\cy\production\browsers\chrome-stable\run-13848\CypressCache\Default\Cache\data_2'
2020-11-19T09:59:13.1313669Z },
2020-11-19T09:59:13.1449049Z isOperational: true,
2020-11-19T09:59:13.1455752Z errno: -4048,
2020-11-19T09:59:13.1464100Z code: 'EPERM',
2020-11-19T09:59:13.1477831Z syscall: 'unlink',
2020-11-19T09:59:13.1482595Z path: 'C:\Users\agent-esw-01\AppData\Roaming\Cypress\cy\production\browsers\chrome-stable\run-13848\CypressCache\Default\Cache\data_2'
2020-11-19T09:59:13.1502142Z }
2020-11-19T09:59:13.1562893Z EPERM: operation not permitted, unlink 'C:Usersagent-esw-01AppDataRoamingCypresscyproductionbrowserschrome-stablerun-13848CypressCacheDefaultCachedata_2'
2020-11-19T09:59:13.1563663Z Error: EPERM: operation not permitted, unlink 'C:Usersagent-esw-01AppDataRoamingCypresscyproductionbrowserschrome-stablerun-13848CypressCacheDefaultCachedata_2'
2020-11-19T09:59:13.1566986Z
2020-11-19T09:59:13.1568810Z
2020-11-19T09:59:13.1569374Z 2020-11-19T09:59:12.764Z cypress:server:file get values from C:Usersagent-esw-01AppDataRoamingCypresscyproductioncache
2020-11-19T09:59:13.1570063Z 2020-11-19T09:59:12.765Z cypress:server:file attempt to get lock on C:Usersagent-esw-01AppDataRoamingCypresscyproductioncache
2020-11-19T09:59:13.1570968Z 2020-11-19T09:59:12.768Z cypress:server:file getting lock succeeded or failed for C:Usersagent-esw-01AppDataRoamingCypresscyproductioncache
2020-11-19T09:59:13.1572205Z 2020-11-19T09:59:12.768Z cypress:server:file read C:Usersagent-esw-01AppDataRoamingCypresscyproductioncache
2020-11-19T09:59:13.1572833Z 2020-11-19T09:59:12.769Z cypress:server:file read succeeded or failed for C:Usersagent-esw-01AppDataRoamingCypresscyproductioncache
2020-11-19T09:59:13.1573223Z 2020-11-19T09:59:12.769Z cypress:server:file attempt to unlock C:Usersagent-esw-01AppDataRoamingCypresscyproductioncache
2020-11-19T09:59:13.1574440Z 2020-11-19T09:59:12.770Z cypress:server:file unlock succeeded or failed for C:Usersagent-esw-01AppDataRoamingCypresscyproductioncache
2020-11-19T09:59:13.1577827Z 2020-11-19T09:59:12.771Z cypress:server:api request to url: POST https://api.cypress.io/exceptions with params: {"body":{"err":{"name":"Error","message":"EPERM: operation not permitted, unlink data_2'","stack":"Error: EPERM: operation not permitted, unlink data_2'nn"},"version":"5.6.0","osName":"win32","osVersion":"10.0.18363","osCpus":[{"model":"Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz","speed":3600,"times":{"user":115385015,"nice":0,"sys":170788656,"idle":1014901781,"irq":635171}},{"model":"Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz","speed":3600,"times":{"user":389854468,"nice":0,"sys":821250875,"idle":89970109,"irq":155531}},{"model":"Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz","speed":3600,"times":{"user":220189890,"nice":0,"sys":390782078,"idle":690103484,"irq":225046}},{"model":"Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz","speed":3600,"times":{"user":203989750,"nice":0,"sys":313021421,"idle":784064281,"irq":235625}},{"model":"Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz","speed":3600,"times":{"user":177495046,"nice":0,"sys":305248765,"idle":818331640,"irq":275562}},{"model":"Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz","speed":3600,"times":{"user":165509984,"nice":0,"sys":164163109,"idle":971402359,"irq":265859}},{"model":"Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz","speed":3600,"times":{"user":156038000,"nice":0,"sys":103167625,"idle":1041869828,"irq":235125}},{"model":"Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz","speed":3600,"times":{"user":152720656,"nice":0,"sys":95664937,"idle":1052689859,"irq":220031}}],"osMemory":{"free":35828113408,"total":68573581312}},"headers":{"x-os-name":"win32","x-cypress-version":"5.6.0"}} and token: undefined
2020-11-19T09:59:13.1580785Z 2020-11-19T09:59:12.773Z cypress:network:agent addRequest called { isHttps: true, href: 'https://api.cypress.io/exceptions' }
2020-11-19T09:59:13.1581470Z 2020-11-19T09:59:12.773Z cypress:network:agent got family { family: undefined, href: 'https://api.cypress.io/exceptions' }
2020-11-19T09:59:13.1581881Z 2020-11-19T09:59:12.773Z cypress:network:agent Creating proxied socket for https://api.cypress.io/exceptions through http://192.168.1.3:3128
2020-11-19T09:59:13.1583014Z 2020-11-19T09:59:12.774Z cypress:server:cypress calling exit 1
2020-11-19T09:59:13.1583273Z 2020-11-19T09:59:12.774Z cypress:server:cypress about to exit with code 1
2020-11-19T09:59:13.1584786Z 2020-11-19T09:59:12.775Z cypress:network:connect successfully connected { opts: { port: 3128, host: '192.168.1.3', useTls: false, getDelayMsForRetry: [Function] }, iteration: 0 }
2020-11-19T09:59:13.1704877Z 2020-11-19T09:59:13.169Z cypress:cli child event fired { event: 'exit', code: 1, signal: null }
2020-11-19T09:59:13.1708690Z 2020-11-19T09:59:13.169Z cypress:cli child event fired { event: 'close', code: 1, signal: null }
2020-11-19T09:59:13.3190073Z ##[error]Cmd.exe exited with code '1'.

We have the same problem last 2-3 weeks (Chrome + run on Azure Devops Self-Hosted agents).

It happens at 50 percent...

Many connections to chrome and node.js are created...

Currently this is not applicable for CI :cry:

HighCPU

It works!!! when I run the agent not as a windows service...

RunAgent

It works without problems only when I run the agent as logged windows user. When I run the agent e.g. from windows tasks scheduler it's not working...

@jennifer-shehane Any ideas as next?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zbigniewkalinowski picture zbigniewkalinowski  Β·  3Comments

verheyenkoen picture verheyenkoen  Β·  3Comments

brian-mann picture brian-mann  Β·  3Comments

jennifer-shehane picture jennifer-shehane  Β·  3Comments

simonhaenisch picture simonhaenisch  Β·  3Comments