cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.77k stars 3.16k forks source link

We encountered an unexpected error talking to our servers (error: socket hang up) #3825

Closed itslenny closed 1 year ago

itslenny commented 5 years ago

Current behavior:

Whenever I run tests with recording enable I get an error about it not being able to communicate with Cypress. Additionally, it retries at 30 seconds, 1 minute, and 2 minutes which adds 3:30 on to my total test run time.

What's really interesting is it does successfully record the test on the cypress dashboard so I'm not sure what call is failing / retrying. Everything is working great. The logs and video are uploaded to the dashboard. However, my tests take 3 minutes longer than they should because they need to retry whatever this call is 3 times before the tests can even start.

Error message

Screenshot from 2019-03-25 18-14-53

Results in dashboard

Screenshot from 2019-03-25 18-20-35

Desired behavior:

Should not fail to contact cypress server or retry repeatedly on a call that is clearly not needed for the core functionality to succeed.

Steps to reproduce: (app code and test code)

This is just a default install of cypress running on a newly created Digital Ocean droplet running Ubuntu 18 Server. I also see this issue if I try to run it locally (on Ubuntu 18 desktop). Repro is probably just npm install cypress on Ubuntu and try to have it report to the dashboard.

The error happens during initialization (before any tests run) so I doubt the test code is relevant

This is the command I'm using to run the tests:

cypress run --spec cypress/tests/live-tests.spec.js --record --key my-key-here

(if I remove --record --key there is no error, but obviously it doesn't record to the dashboard)

cypress.json is pretty minimal, but here it is just in case:

{
  "fixturesFolder": false,
  "integrationFolder": "cypress/tests",
  "pluginsFile": false,
  "defaultCommandTimeout": 15000,
  "projectId": "redacted"
}

Versions

OS: Ubuntu 18.04.2 LTS Browser: Electron 59.0.3071.115 (default) Cypress: 3.2.0 (in the screenshots it's 3.1.5, but I upgraded and tried again and got the same result)

jennifer-shehane commented 5 years ago

You get this with every recording?

itslenny commented 5 years ago

Yes.

On the server (which is admittedly under powered) it almost always retries 3 times, but occasionally it'll stop after 1 or 2. However, the test data always shows up in my dashboard so it is communicating to the server.

Locally on my laptop (16GB ram and latest gen i7) it retries at least once every time, but usually only retries once or twice rarely all 3 times. So, it seems like there is some correlation to system specs, but it still happens on my laptop pretty consistently.

Once the retries are over the tests start and run fine / quickly. It is a suite of 13 tests running against my live production site so I know network connectivity is fine.

Both the server and my laptop are running Ubuntu 18.04.2

jennifer-shehane commented 5 years ago

Are you behind any sort of proxy?

itslenny commented 5 years ago

No, proxy or VPN at the office or my laptop, and it's also behaving identically on the server I'm running it on which is just a default Digital Ocean small droplet running Ubuntu.

I'll try running it on OSX and Windows tomorrow to see if it's just an Ubuntu thing.

itslenny commented 5 years ago

@jennifer-shehane

Alright, this is almost certainly an issue on Ubuntu (or linux) specifically. I've now run the same exact test suite on Windows, OSX, and Ubuntu. It consistently has this error on Ubuntu and never anywhere else. I also ran it on all 3 OSs at my office and on my home internet which are different ISPs, and I also have it running on an Ubuntu VPS in a data center (Digital Ocean).

Never once seen this error on windows or OSX. I've run the test over 200 times on the server now and it happens every time. Also, happens every time I run it on my Ubuntu laptop both at work and at home.

There is nothing special about my Ubuntu setup. My desktop is just a default install. The server is the default Digital Ocean droplet so that should be easy to repro there.

flotwig commented 5 years ago

I can't reproduce this on my Ubuntu 18.10 system. Can you try running Cypress with some debug logs enabled?

Specifically, try this command:

DEBUG=cypress:server:api,cypress:server:record cypress run --spec cypress/tests/live-tests.spec.js --record --key my-key-here

Paste the logs here. That should help give us an idea of what's failing and why. Note, please go over the logs before pasting them, you will want to scrub any mentions of your Cypress record key or authorization token.

itslenny commented 5 years ago

@flotwig This is a local run on my laptop. It only failed to connect once which is pretty typical on my laptop. On the server it usually retires 3 times (occasionally only 1 or 2).

I purposely made the first test fail (and I have it set to bail on the first failure) so it'd be a shorter log. This issue basically entirely exists before the tests start, but I figured I'd give you an end to end log anyways in case some of the data about the upload after the run (which I've never seen fail) sheds any light.

Gtk-Message: 13:26:18.560: Failed to load module "canberra-gtk-module"
Mon, 01 Apr 2019 20:26:22 GMT cypress:server:record found the following git information
Mon, 01 Apr 2019 20:26:22 GMT cypress:server:record { branch: 'master',
  message: 'Add per test retries and locking to test runner\n',
  email: '[MY_EMAIL]',
  author: '[MY_NAME]',
  sha: '3b7193c7d37c0d3ea6c31a3ad6dec37a0aa7ede1',
  remote: '[MY_REMOTE]' }
Mon, 01 Apr 2019 20:26:22 GMT cypress:server:record commit information from Git or from environment variables
Mon, 01 Apr 2019 20:26:22 GMT cypress:server:record { sha: '3b7193c7d37c0d3ea6c31a3ad6dec37a0aa7ede1',
  branch: 'master',
  authorName: '[MY_NAME]',
  authorEmail: '[MY_EMAIL]',
  message: 'Add per test retries and locking to test runner\n',
  remoteOrigin: '[MY_REMOTE]',
  defaultBranch: null }
Mon, 01 Apr 2019 20:26:22 GMT cypress:server:api request to url: POST https://api.cypress.io/runs with params: {"body":{"ci":{"params":null,"provider":null},"specs":["cypress/tests/live-tests.spec.js"],"commit":{"sha":"3b7193c7d37c0d3ea6c31a3ad6dec37a0aa7ede1","branch":"master","authorName":"[MY_NAME]","authorEmail":"[MY_EMAIL]","message":"Add per test retries and locking to test runner\n","remoteOrigin":"[MY_REMOTE]","defaultBranch":null},"group":null,"platform":{"osCpus":[{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3922,"times":{"user":18496800,"nice":36800,"sys":4301400,"idle":2618472300,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3977,"times":{"user":16559500,"nice":50400,"sys":16407700,"idle":2603572700,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3968,"times":{"user":19118900,"nice":26700,"sys":4354600,"idle":2618357800,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3994,"times":{"user":18126600,"nice":29000,"sys":4251200,"idle":2619443900,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3947,"times":{"user":17990100,"nice":8700,"sys":4230900,"idle":2619573000,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3980,"times":{"user":18290800,"nice":11400,"sys":4117100,"idle":2619562300,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3952,"times":{"user":17637700,"nice":19300,"sys":3985900,"idle":2620549100,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3952,"times":{"user":13922000,"nice":10800,"sys":7155000,"idle":2619377800,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3993,"times":{"user":17244800,"nice":27200,"sys":4178400,"idle":2620580900,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3968,"times":{"user":17871600,"nice":14000,"sys":4423800,"idle":2619774700,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3964,"times":{"user":18030300,"nice":18400,"sys":4316700,"idle":2619748300,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3960,"times":{"user":19231400,"nice":20600,"sys":4574200,"idle":2613064600,"irq":0}}],"osName":"linux","osMemory":{"free":5384351744,"total":16446308352},"osVersion":"Ubuntu Linux - 18.04","browserName":"Electron","browserVersion":"59.0.3071.115"},"parallel":null,"ciBuildId":null,"projectId":"[MY_PROJECT_ID]","recordKey":"[MY_RECORD_KEY]","specPattern":"cypress/tests/live-tests.spec.js"},"headers":{"x-route-version":"4","x-os-name":"linux","x-cypress-version":"3.2.0"}}
Mon, 01 Apr 2019 20:26:22 GMT cypress:server:api response { groupId: 'linux-Electron-59-769021154a', machineId: '', runId: '[MY_RUN_ID]', runUrl: 'https://dashboard.cypress.io/#/projects/[MY_PROJECT_ID]/runs/526', warnings: [] }

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

  (Run Starting)

  ┌──────────────────────────────────────────────────────────────────────────┐
  │ Cypres…  3.2.0                                                           │
  │ Browse…  Electron 59 (headless)                                          │
  │ Specs:   1 found (live-tests.spec.js)                                    │
  │ Search…  cypress/tests/live-tests.spec.js                                │
  │ Params:  Group: false, Parallel: false                                   │
  │ Run UR…  https://dashboard.cypress.io/#/projects/[MY_PROJECT_ID]/runs/526         │
  └──────────────────────────────────────────────────────────────────────────┘

Mon, 01 Apr 2019 20:26:22 GMT cypress:server:record before spec run { spec: { name: 'live-tests.spec.js', relative: 'cypress/tests/live-tests.spec.js', absolute: '[MY_BASEPATH]/synthetic-tests/cypress/tests/live-tests.spec.js' } }
Mon, 01 Apr 2019 20:26:22 GMT cypress:server:api request to url: POST https://api.cypress.io/runs/[MY_RUN_ID]/instances with params: {"body":{"spec":"cypress/tests/live-tests.spec.js","groupId":"linux-Electron-59-769021154a","machineId":"","platform":{"osCpus":[{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3922,"times":{"user":18496800,"nice":36800,"sys":4301400,"idle":2618472300,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3977,"times":{"user":16559500,"nice":50400,"sys":16407700,"idle":2603572700,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3968,"times":{"user":19118900,"nice":26700,"sys":4354600,"idle":2618357800,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3994,"times":{"user":18126600,"nice":29000,"sys":4251200,"idle":2619443900,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3947,"times":{"user":17990100,"nice":8700,"sys":4230900,"idle":2619573000,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3980,"times":{"user":18290800,"nice":11400,"sys":4117100,"idle":2619562300,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3952,"times":{"user":17637700,"nice":19300,"sys":3985900,"idle":2620549100,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3952,"times":{"user":13922000,"nice":10800,"sys":7155000,"idle":2619377800,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3993,"times":{"user":17244800,"nice":27200,"sys":4178400,"idle":2620580900,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3968,"times":{"user":17871600,"nice":14000,"sys":4423800,"idle":2619774700,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3964,"times":{"user":18030300,"nice":18400,"sys":4316700,"idle":2619748300,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3960,"times":{"user":19231400,"nice":20600,"sys":4574200,"idle":2613064600,"irq":0}}],"osName":"linux","osMemory":{"free":5384351744,"total":16446308352},"osVersion":"Ubuntu Linux - 18.04","browserName":"Electron","browserVersion":"59.0.3071.115"}},"headers":{"x-route-version":"5","x-os-name":"linux","x-cypress-version":"3.2.0"}}
We encountered an unexpected error talking to our servers.

We will retry 3 more times in 30 seconds...

The server's response was:

RequestError: Error: socket hang up
Mon, 01 Apr 2019 20:27:52 GMT cypress:server:api retry #1 after 30000ms
Mon, 01 Apr 2019 20:27:52 GMT cypress:server:api request to url: POST https://api.cypress.io/runs/[MY_RUN_ID]/instances with params: {"body":{"spec":"cypress/tests/live-tests.spec.js","groupId":"linux-Electron-59-769021154a","machineId":"","platform":{"osCpus":[{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3922,"times":{"user":18496800,"nice":36800,"sys":4301400,"idle":2618472300,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3977,"times":{"user":16559500,"nice":50400,"sys":16407700,"idle":2603572700,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3968,"times":{"user":19118900,"nice":26700,"sys":4354600,"idle":2618357800,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3994,"times":{"user":18126600,"nice":29000,"sys":4251200,"idle":2619443900,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3947,"times":{"user":17990100,"nice":8700,"sys":4230900,"idle":2619573000,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3980,"times":{"user":18290800,"nice":11400,"sys":4117100,"idle":2619562300,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3952,"times":{"user":17637700,"nice":19300,"sys":3985900,"idle":2620549100,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3952,"times":{"user":13922000,"nice":10800,"sys":7155000,"idle":2619377800,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3993,"times":{"user":17244800,"nice":27200,"sys":4178400,"idle":2620580900,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3968,"times":{"user":17871600,"nice":14000,"sys":4423800,"idle":2619774700,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3964,"times":{"user":18030300,"nice":18400,"sys":4316700,"idle":2619748300,"irq":0}},{"model":"Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz","speed":3960,"times":{"user":19231400,"nice":20600,"sys":4574200,"idle":2613064600,"irq":0}}],"osName":"linux","osMemory":{"free":5384351744,"total":16446308352},"osVersion":"Ubuntu Linux - 18.04","browserName":"Electron","browserVersion":"59.0.3071.115"}},"headers":{"x-route-version":"5","x-os-name":"linux","x-cypress-version":"3.2.0"}}
Mon, 01 Apr 2019 20:27:52 GMT cypress:server:api response { spec: 'cypress/tests/live-tests.spec.js', instanceId: 'e83f28c2-3494-42ac-b39a-e9891d0180c3', claimedInstances: 1, totalInstances: 1, estimatedWallClockDuration: 183370 }

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

  Running: live-tests.spec.js...                                     (1 of 1)
  Estimated: 3 minutes, 3 seconds

  Live site tests
    Login and pair device

      1) MERCHANT - Should log in as merchant

  0 passing (492ms)
  1 failing

  1) Live site tests Login and pair device MERCHANT - Should log in as merchant:
     CypressError: cy.visit() must be called with a URL or an options object containing a URL as its 1st argument
      at Object.cypressErr (http://localhost:46237/__cypress/runner/cypress_runner.js:65727:11)
      at Object.throwErr (http://localhost:46237/__cypress/runner/cypress_runner.js:65692:18)
      at Object.throwErrByPath (http://localhost:46237/__cypress/runner/cypress_runner.js:65719:17)
      at Context.visit (http://localhost:46237/__cypress/runner/cypress_runner.js:56064:16)
      at http://localhost:46237/__cypress/runner/cypress_runner.js:61291:33
      at tryCatcher (http://localhost:46237/__cypress/runner/cypress_runner.js:131273:23)
      at Promise._settlePromiseFromHandler (http://localhost:46237/__cypress/runner/cypress_runner.js:129291:31)
      at Promise._settlePromise (http://localhost:46237/__cypress/runner/cypress_runner.js:129348:18)
      at Promise._settlePromiseCtx (http://localhost:46237/__cypress/runner/cypress_runner.js:129385:10)
      at Async._drainQueue (http://localhost:46237/__cypress/runner/cypress_runner.js:126202:12)
      at Async._drainQueues (http://localhost:46237/__cypress/runner/cypress_runner.js:126207:10)
      at Async.drainQueues (http://localhost:46237/__cypress/runner/cypress_runner.js:126081:14)
      at <anonymous>

  (Results)

  ┌────────────────────────────────────┐
  │ Tests:        13                   │
  │ Passing:      0                    │
  │ Failing:      1                    │
  │ Pending:      0                    │
  │ Skipped:      12                   │
  │ Screenshots:  4                    │
  │ Video:        true                 │
  │ Duration:     0 seconds            │
  │ Estimated:    3 minutes, 3 seconds │
  │ Spec Ran:     live-tests.spec.js   │
  └────────────────────────────────────┘

  (Screenshots)

  - [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed).png (1280x720)
  - [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (1).png (1280x720)
  - [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (2).png (1280x720)
  - [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (3).png (1280x720)

  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  [MY_BASEPATH]/synthetic-tests/cypress/videos/live-tests.spec.js.mp4 (0 seconds)

Mon, 01 Apr 2019 20:27:55 GMT cypress:server:record after spec run { spec: { name: 'live-tests.spec.js', relative: 'cypress/tests/live-tests.spec.js', absolute: '[MY_BASEPATH]/synthetic-tests/cypress/tests/live-tests.spec.js' } }

  (Uploading Results)

Mon, 01 Apr 2019 20:27:55 GMT cypress:server:api request to url: PUT https://api.cypress.io/instances/e83f28c2-3494-42ac-b39a-e9891d0180c3 with params: {"body":{"stats":{"suites":4,"tests":13,"passes":0,"pending":0,"skipped":12,"failures":1,"wallClockStartedAt":"2019-04-01T20:27:55.009Z","wallClockEndedAt":"2019-04-01T20:27:55.504Z","wallClockDuration":495},"tests":[{"testId":"r4","title":["Live site tests","Login and pair device","MERCHANT - Should log in as merchant"],"state":"failed","body":"function () {\n      cy.visit(_environment.MERCHANT_BASE_URL);\n      cy.get('.e2e-login-form input[formcontrolname=email]').type(_environment.STORE_OWNER_EMAIL);\n      cy.get('.e2e-login-form input[formcontrolname=password]').type(_environment.STORE_OWNER_PASSWORD + '{enter}');\n      cy.url().should('include', 'm/company');\n      cy.window().then(function (window) {\n        var userData = window.localStorage.getItem(USER_KEY);\n        cy.writeFile(DATA_DIRECTORY + USER_KEY, userData);\n      });\n    }","stack":"CypressError: cy.visit() must be called with a URL or an options object containing a URL as its 1st argument\n    at Object.cypressErr (http://localhost:46237/__cypress/runner/cypress_runner.js:65727:11)\n    at Object.throwErr (http://localhost:46237/__cypress/runner/cypress_runner.js:65692:18)\n    at Object.throwErrByPath (http://localhost:46237/__cypress/runner/cypress_runner.js:65719:17)\n    at Context.visit (http://localhost:46237/__cypress/runner/cypress_runner.js:56064:16)\n    at http://localhost:46237/__cypress/runner/cypress_runner.js:61291:33\n    at tryCatcher (http://localhost:46237/__cypress/runner/cypress_runner.js:131273:23)\n    at Promise._settlePromiseFromHandler (http://localhost:46237/__cypress/runner/cypress_runner.js:129291:31)\n    at Promise._settlePromise (http://localhost:46237/__cypress/runner/cypress_runner.js:129348:18)\n    at Promise._settlePromiseCtx (http://localhost:46237/__cypress/runner/cypress_runner.js:129385:10)\n    at Async._drainQueue (http://localhost:46237/__cypress/runner/cypress_runner.js:126202:12)\n    at Async._drainQueues (http://localhost:46237/__cypress/runner/cypress_runner.js:126207:10)\n    at Async.drainQueues (http://localhost:46237/__cypress/runner/cypress_runner.js:126081:14)\n    at <anonymous>","error":"cy.visit() must be called with a URL or an options object containing a URL as its 1st argument","timings":{"lifecycle":7,"test":{"fnDuration":7,"afterFnDuration":61}},"failedFromHookId":null,"wallClockStartedAt":"2019-04-01T20:27:55.427Z","wallClockDuration":77,"videoTimestamp":2394},{"testId":"r5","title":["Live site tests","Login and pair device","MERCHANT - Should pair device for store"],"state":"skipped","body":"function () {\n      cy.server().route('POST', '/api/v1/auth/refresh-merchant').as('refreshMerchant');\n      cy.readFile(DATA_DIRECTORY + USER_KEY).then(function (userData) {\n        var storeUrl = _environment.MERCHANT_BASE_URL + '/m/store/' + _environment.STORE_ID + '?ALLOW_WEB_DEVICE_PAIR=true';\n        cy.visit(storeUrl, (0, _localStorage.setLocalStorage)(USER_KEY, userData));\n      });\n      cy.get('.mat-tab-label').contains('Devices').click();\n      cy.get('.e2e-pair-button').click();\n      cy.wait('@refreshMerchant').its('status').should('be', 200);\n      cy.get('.pos-device-badge').should('be.visible');\n      cy.get('.mat-tab-body-wrapper .device-card').should('have.length', 1).find('h3').should('have.text', 'Paired to ' + MOCK_STORE_NAME);\n      cy.get('error-dialog').should('not.exist');\n      cy.window().then(function (window) {\n        var deviceData = window.localStorage.getItem(DEVICE_KEY);\n        cy.writeFile(DATA_DIRECTORY + DEVICE_KEY, deviceData);\n      });\n    }","stack":null,"error":null,"timings":null,"failedFromHookId":null,"wallClockStartedAt":null,"wallClockDuration":null,"videoTimestamp":null},{"testId":"r6","title":["Live site tests","Login and pair device","MERCHANT - Should redirect to pos view (also clear / reject any pending orders)"],"state":"skipped","body":"function () {\n      cy.server().route('POST', '/api/v1/auth/refresh-merchant').as('refreshMerchant');\n      cy.readFile(DATA_DIRECTORY + DEVICE_KEY).then(function (deviceData) {\n        cy.visit(_environment.MERCHANT_BASE_URL, (0, _localStorage.setLocalStorage)(DEVICE_KEY, deviceData));\n      });\n      cy.wait('@refreshMerchant').its('status').should('be', 200);\n      cy.get('.e2e-stores-loading').should('not.exist'); // finds any left over orders and rejects them\n\n      cy.get('.orders-list-wrap .active-orders-list').then(function (orderListWrap) {\n        var orderCards = orderListWrap.find('.order-card');\n\n        if (orderCards.length > 0) {\n          orderCards.each(function (idx, card) {\n            cy.wrap(card).find('.e2e-pos-cancel-btn,.e2e-pos-reject-btn').should('be.visible').click();\n          });\n        }\n      }); // waits until there are no cards\n\n      cy.get('.e2e-active-orders-list .e2e-order-card').should('not.exist');\n    }","stack":null,"error":null,"timings":null,"failedFromHookId":null,"wallClockStartedAt":null,"wallClockDuration":null,"videoTimestamp":null},{"testId":"r8","title":["Live site tests","Send and receive order","CONSUMER - Should display store as online"],"state":"skipped","body":"function () {\n      cy.visit(_environment.CONSUMER_BASE_URL + \"/stores\", (0, _geolocation.setGeolocation)(coords));\n      cy.get('a.store-card-link').should('have.length', 1).first().should('have.attr', 'href').and('include', _environment.STORE_ID);\n      cy.get('a.store-card-link .store-card-inner').should('not.have.class', 'dimmed').click();\n    }","stack":null,"error":null,"timings":null,"failedFromHookId":null,"wallClockStartedAt":null,"wallClockDuration":null,"videoTimestamp":null},{"testId":"r9","title":["Live site tests","Send and receive order","CONSUMER - Should place order"],"state":"skipped","body":"function () {\n      cy.readFile(DATA_DIRECTORY + USER_KEY).then(function (userData) {\n        var storeUrl = _environment.CONSUMER_BASE_URL + '/stores/store-name-here/' + _environment.STORE_ID + '/details?ALLOW_WEB_CHECKOUT=true';\n        cy.visit(storeUrl, (0, _localStorage.setLocalStorage)(USER_KEY, userData));\n      });\n      cy.get('a.mat-flat-button').contains('New Order').click();\n      cy.get('.menu-list .mat-list-item').contains('Latte').click();\n      cy.get('.mat-bottom-sheet-container .mat-nav-list .mat-list-item').should('have.length', 3).first().click();\n      cy.get('a.mat-flat-button').contains('Add to order').click();\n      cy.get('.cart-items-wrap .item-card').should('have.length', 1).first().find('h3').should('have.text', '8oz Latte');\n      cy.get('button.mat-flat-button').contains('Checkout').click();\n      cy.get('.tip-wrap .mat-button-toggle').eq(1).click();\n      cy.get('button.mat-flat-button').contains('Pay ').click(); // wait for order status screen - longer timeout for reward animation\n\n      cy.get('.e2e-progress-card', {\n        timeout: 20000\n      }).should('be.visible').should('have.class', 'new');\n      cy.url().then(function (url) {\n        cy.writeFile(DATA_DIRECTORY + ORDER_URL_KEY, url.replace('new-order', ''));\n      });\n    }","stack":null,"error":null,"timings":null,"failedFromHookId":null,"wallClockStartedAt":null,"wallClockDuration":null,"videoTimestamp":null},{"testId":"r10","title":["Live site tests","Send and receive order","MERCHANT - Should receive and accept order"],"state":"skipped","body":"function () {\n      cy.server().route('POST', '/api/v1/auth/refresh-merchant').as('refreshMerchant');\n      cy.readFile(DATA_DIRECTORY + DEVICE_KEY).then(function (deviceData) {\n        cy.visit(_environment.MERCHANT_BASE_URL, (0, _localStorage.setLocalStorage)(DEVICE_KEY, deviceData));\n      });\n      cy.wait('@refreshMerchant').its('status').should('be', 200);\n      cy.get('.e2e-stores-loading').should('not.exist');\n      cy.get('.e2e-active-orders-list .e2e-order-card').should('have.length', 1).within(function () {\n        cy.get('.e2e-pos-accept-btn').should('be.visible').click();\n      }); // should remove accept button, show ready button\n\n      cy.get('.e2e-active-orders-list .e2e-order-card .e2e-pos-accept-btn').should('not.exist');\n      cy.get('.e2e-active-orders-list .e2e-order-card .e2e-pos-ready-btn').should('be.visible');\n    }","stack":null,"error":null,"timings":null,"failedFromHookId":null,"wallClockStartedAt":null,"wallClockDuration":null,"videoTimestamp":null},{"testId":"r11","title":["Live site tests","Send and receive order","CONSUMER - Should show accepted status"],"state":"skipped","body":"function () {\n      cy.readFile(DATA_DIRECTORY + USER_KEY).then(function (userData) {\n        cy.readFile(DATA_DIRECTORY + ORDER_URL_KEY).then(function (orderUrl) {\n          cy.visit(orderUrl, (0, _localStorage.setLocalStorage)(USER_KEY, userData));\n        });\n      });\n      cy.get('.e2e-progress-card').should('be.visible').should('have.class', 'accepted');\n    }","stack":null,"error":null,"timings":null,"failedFromHookId":null,"wallClockStartedAt":null,"wallClockDuration":null,"videoTimestamp":null},{"testId":"r12","title":["Live site tests","Send and receive order","MERCHANT - Should mark order as ready"],"state":"skipped","body":"function () {\n      cy.server().route('POST', '/api/v1/auth/refresh-merchant').as('refreshMerchant');\n      cy.readFile(DATA_DIRECTORY + DEVICE_KEY).then(function (deviceData) {\n        cy.visit(_environment.MERCHANT_BASE_URL, (0, _localStorage.setLocalStorage)(DEVICE_KEY, deviceData));\n      });\n      cy.wait('@refreshMerchant').its('status').should('be', 200);\n      cy.get('.e2e-stores-loading').should('not.exist');\n      cy.get('.e2e-completed-orders-list').then(function (list) {\n        var completedCardCount = 0;\n        completedCardCount = list.find('.e2e-order-card').length;\n        cy.get('.e2e-active-orders-list .e2e-order-card').should('have.length', 1).within(function () {\n          cy.get('.e2e-pos-ready-btn').should('be.visible').click();\n        }); // should move order to completed list\n\n        cy.get('.e2e-active-orders-list .e2e-order-card').should('not.exist');\n        cy.get('.e2e-completed-orders-list .e2e-order-card').should('have.length', completedCardCount + 1);\n      });\n    }","stack":null,"error":null,"timings":null,"failedFromHookId":null,"wallClockStartedAt":null,"wallClockDuration":null,"videoTimestamp":null},{"testId":"r13","title":["Live site tests","Send and receive order","CONSUMER - Should show ready status and post review"],"state":"skipped","body":"function () {\n      cy.readFile(DATA_DIRECTORY + USER_KEY).then(function (userData) {\n        cy.readFile(DATA_DIRECTORY + ORDER_URL_KEY).then(function (orderUrl) {\n          console.log('userDatauserDatauserData', userData);\n          cy.visit(orderUrl, (0, _localStorage.setLocalStorage)(USER_KEY, userData));\n        });\n      });\n      cy.server().route('POST', '/api/v1/order/*/review').as('postReview'); // post review\n\n      cy.get('.e2e-review-posted-label').should('not.exist');\n      cy.get('.e2e-progress-card').should('be.visible').should('have.class', 'completed');\n      cy.get('.e2e-beans').should('be.visible').within(function () {\n        cy.get('.e2e-bean-btn').eq(3).click();\n      });\n      cy.get('.e2e-review-text').type(MOCK_REVIEW);\n      cy.get('.e2e-review-submit-btn').click();\n      cy.get('.e2e-review-posted-label').should('be.visible');\n      cy.wait('@postReview').its('status').should('be', 200);\n    }","stack":null,"error":null,"timings":null,"failedFromHookId":null,"wallClockStartedAt":null,"wallClockDuration":null,"videoTimestamp":null},{"testId":"r14","title":["Live site tests","Send and receive order","MERCHANT - Should show customer review"],"state":"skipped","body":"function () {\n      cy.server().route('POST', '/api/v1/auth/refresh-merchant').as('refreshMerchant');\n      cy.readFile(DATA_DIRECTORY + DEVICE_KEY).then(function (deviceData) {\n        cy.visit(_environment.MERCHANT_BASE_URL, (0, _localStorage.setLocalStorage)(DEVICE_KEY, deviceData));\n      });\n      cy.wait('@refreshMerchant').its('status').should('be', 200);\n      cy.get('.e2e-stores-loading').should('not.exist');\n      cy.get('.e2e-completed-orders-list .e2e-order-card').first().within(function () {\n        cy.get('.e2e-review-wrap .beans .bean').should('have.length', 5);\n        cy.get('.e2e-review-wrap .beans .bean.active').should('have.length', 4);\n        cy.get('.e2e-review-wrap .e2e-review-text').should('contain', MOCK_REVIEW);\n      });\n    }","stack":null,"error":null,"timings":null,"failedFromHookId":null,"wallClockStartedAt":null,"wallClockDuration":null,"videoTimestamp":null},{"testId":"r16","title":["Live site tests","Reorder","CONSUMER - Should show order in recent orders and reorder"],"state":"skipped","body":"function () {\n      cy.server().route('GET', '/api/v1/order').as('listReviews');\n      cy.readFile(DATA_DIRECTORY + USER_KEY).then(function (userData) {\n        cy.readFile(DATA_DIRECTORY + ORDER_URL_KEY).then(function (orderUrl) {\n          cy.visit(_environment.CONSUMER_BASE_URL + '/orders', (0, _localStorage.setLocalStorage)(USER_KEY, userData));\n        });\n      });\n      cy.wait('@listReviews').its('status').should('be', 200);\n      cy.get('.e2e-recent-orders .e2e-order-card').first().within(function () {\n        cy.get('.e2e-order-status').should('contain', 'Completed');\n        cy.get('.e2e-reorder-btn').should('be.visible').click();\n      });\n      cy.get('.cart-items-wrap .item-card').should('have.length', 1).first().find('h3').should('have.text', '8oz Latte');\n      cy.get('button.mat-flat-button').contains('Checkout').click();\n      cy.get('.tip-wrap .mat-button-toggle').eq(1).click();\n      cy.get('button.mat-flat-button').contains('Pay ').click(); // wait for order status screen - longer timeout for reward animation\n\n      cy.get('.e2e-progress-card', {\n        timeout: 20000\n      }).should('be.visible').should('have.class', 'new');\n    }","stack":null,"error":null,"timings":null,"failedFromHookId":null,"wallClockStartedAt":null,"wallClockDuration":null,"videoTimestamp":null},{"testId":"r17","title":["Live site tests","Reorder","MERCHANT - Should receive and reject order"],"state":"skipped","body":"function () {\n      cy.server().route('POST', '/api/v1/auth/refresh-merchant').as('refreshMerchant');\n      cy.readFile(DATA_DIRECTORY + DEVICE_KEY).then(function (deviceData) {\n        cy.visit(_environment.MERCHANT_BASE_URL, (0, _localStorage.setLocalStorage)(DEVICE_KEY, deviceData));\n      });\n      cy.wait('@refreshMerchant').its('status').should('be', 200);\n      cy.get('.e2e-stores-loading').should('not.exist');\n      cy.get('.e2e-completed-orders-list').then(function (list) {\n        var completedCardCount = 0;\n        completedCardCount = list.find('.e2e-order-card').length;\n        cy.get('.e2e-active-orders-list .e2e-order-card').should('have.length', 1).within(function () {\n          cy.get('.e2e-pos-reject-btn').should('be.visible').click();\n        }); // should move order to completed list\n\n        cy.get('.e2e-active-orders-list .e2e-order-card').should('not.exist');\n        cy.get('.e2e-completed-orders-list .e2e-order-card').should('have.length', completedCardCount + 1);\n      });\n    }","stack":null,"error":null,"timings":null,"failedFromHookId":null,"wallClockStartedAt":null,"wallClockDuration":null,"videoTimestamp":null},{"testId":"r18","title":["Live site tests","Reorder","CONSUMER - Should show rejected order in recent orders"],"state":"skipped","body":"function () {\n      cy.server().route('GET', '/api/v1/order').as('listReviews');\n      cy.readFile(DATA_DIRECTORY + USER_KEY).then(function (userData) {\n        cy.readFile(DATA_DIRECTORY + ORDER_URL_KEY).then(function (orderUrl) {\n          cy.visit(_environment.CONSUMER_BASE_URL + '/orders', (0, _localStorage.setLocalStorage)(USER_KEY, userData));\n        });\n      });\n      cy.wait('@listReviews').its('status').should('be', 200);\n      cy.get('.e2e-recent-orders .e2e-order-card').first().within(function () {\n        cy.get('.e2e-order-status').should('contain', 'Rejected');\n        cy.get('.e2e-reorder-btn').should('not.exist');\n      });\n    }","stack":null,"error":null,"timings":null,"failedFromHookId":null,"wallClockStartedAt":null,"wallClockDuration":null,"videoTimestamp":null}],"error":null,"video":true,"hooks":[{"hookId":"h1","hookName":"after each","title":["\"after each\" hook"],"body":"function () {\n    if (this.currentTest.state === 'failed') {\n      Cypress.runner.stop();\n    }\n  }"}],"stdout":"We encountered an unexpected error talking to our servers.\n\nWe will retry 3 more times in 30 seconds...\n\nThe server's response was:\n\nRequestError: Error: socket hang up\n\n──────────────────────────────────────────────────────────────────────────────\n                                                                              \n  Running: live-tests.spec.js...                                     (1 of 1) \n  Estimated: 3 minutes, 3 seconds\n\n\n  Live site tests\n    Login and pair device\n\r      1) MERCHANT - Should log in as merchant\n\n  0 passing (492ms)\n  1 failing\n\n  1) Live site tests Login and pair device MERCHANT - Should log in as merchant:\n     CypressError: cy.visit() must be called with a URL or an options object containing a URL as its 1st argument\n      at Object.cypressErr (http://localhost:46237/__cypress/runner/cypress_runner.js:65727:11)\n      at Object.throwErr (http://localhost:46237/__cypress/runner/cypress_runner.js:65692:18)\n      at Object.throwErrByPath (http://localhost:46237/__cypress/runner/cypress_runner.js:65719:17)\n      at Context.visit (http://localhost:46237/__cypress/runner/cypress_runner.js:56064:16)\n      at http://localhost:46237/__cypress/runner/cypress_runner.js:61291:33\n      at tryCatcher (http://localhost:46237/__cypress/runner/cypress_runner.js:131273:23)\n      at Promise._settlePromiseFromHandler (http://localhost:46237/__cypress/runner/cypress_runner.js:129291:31)\n      at Promise._settlePromise (http://localhost:46237/__cypress/runner/cypress_runner.js:129348:18)\n      at Promise._settlePromiseCtx (http://localhost:46237/__cypress/runner/cypress_runner.js:129385:10)\n      at Async._drainQueue (http://localhost:46237/__cypress/runner/cypress_runner.js:126202:12)\n      at Async._drainQueues (http://localhost:46237/__cypress/runner/cypress_runner.js:126207:10)\n      at Async.drainQueues (http://localhost:46237/__cypress/runner/cypress_runner.js:126081:14)\n      at <anonymous>\n\n\n\n\n  (Results)\n\n  ┌────────────────────────────────────┐\n  │ Tests:        13                   │\n  │ Passing:      0                    │\n  │ Failing:      1                    │\n  │ Pending:      0                    │\n  │ Skipped:      12                   │\n  │ Screenshots:  4                    │\n  │ Video:        true                 │\n  │ Duration:     0 seconds            │\n  │ Estimated:    3 minutes, 3 seconds │\n  │ Spec Ran:     live-tests.spec.js   │\n  └────────────────────────────────────┘\n\n\n  (Screenshots)\n\n  - [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed).png (1280x720)\n  - [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (1).png (1280x720)\n  - [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (2).png (1280x720)\n  - [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (3).png (1280x720)\n\n\n  (Video)\n\n  - Started processing:   Compressing to 32 CRF\n  - Finished processing:  [MY_BASEPATH]/synthetic-tests/cypress/videos/live-tests.spec.js.mp4 (0 seconds)\n\n\n  (Uploading Results)\n\n","screenshots":[{"screenshotId":"o3ov5","name":null,"testId":"r4","takenAt":"2019-04-01T20:27:55.147Z","height":720,"width":1280},{"screenshotId":"zohdm","name":null,"testId":"r4","takenAt":"2019-04-01T20:27:55.257Z","height":720,"width":1280},{"screenshotId":"if0t2","name":null,"testId":"r4","takenAt":"2019-04-01T20:27:55.360Z","height":720,"width":1280},{"screenshotId":"vioxl","name":null,"testId":"r4","takenAt":"2019-04-01T20:27:55.443Z","height":720,"width":1280}],"cypressConfig":{"fixturesFolder":false,"integrationFolder":"[MY_BASEPATH]/synthetic-tests/cypress/tests","pluginsFile":false,"defaultCommandTimeout":15000,"projectId":"[MY_PROJECT_ID]","projectRoot":"[MY_BASEPATH]/synthetic-tests","projectName":"synthetic-tests","morgan":false,"isTextTerminal":true,"socketId":"16zlq","report":true,"port":46237,"hosts":null,"baseUrl":null,"userAgent":null,"reporter":"spec","reporterOptions":null,"blacklistHosts":null,"clientRoute":"/__/","xhrRoute":"/xhrs/","socketIoRoute":"/__socket.io","socketIoCookie":"__socket.io","reporterRoute":"/__cypress/reporter","ignoreTestFiles":"*.hot-update.js","testFiles":"**/*.*","requestTimeout":5000,"responseTimeout":30000,"pageLoadTimeout":60000,"execTimeout":60000,"taskTimeout":60000,"video":true,"videoCompression":32,"videoUploadOnPasses":true,"modifyObstructiveCode":true,"chromeWebSecurity":true,"waitForAnimations":true,"animationDistanceThreshold":5,"numTestsKeptInMemory":0,"watchForFileChanges":false,"trashAssetsBeforeRuns":true,"autoOpen":false,"viewportWidth":1000,"viewportHeight":660,"fileServerFolder":"[MY_BASEPATH]/synthetic-tests","videosFolder":"[MY_BASEPATH]/synthetic-tests/cypress/videos","supportFile":"[MY_BASEPATH]/synthetic-tests/cypress/support/index.js","screenshotsFolder":"[MY_BASEPATH]/synthetic-tests/cypress/screenshots","namespace":"__cypress","javascripts":[],"env":{},"cypressEnv":"production","resolved":{"animationDistanceThreshold":{"value":5,"from":"default"},"fileServerFolder":{"value":"","from":"default"},"baseUrl":{"value":null,"from":"default"},"fixturesFolder":{"value":false,"from":"config"},"chromeWebSecurity":{"value":true,"from":"default"},"modifyObstructiveCode":{"value":true,"from":"default"},"integrationFolder":{"value":"cypress/tests","from":"config"},"env":{},"pluginsFile":{"value":false,"from":"config"},"hosts":{"value":null,"from":"default"},"screenshotsFolder":{"value":"cypress/screenshots","from":"default"},"numTestsKeptInMemory":{"value":0,"from":"config"},"supportFile":{"value":"cypress/support","from":"default"},"port":{"value":null,"from":"default"},"reporter":{"value":"spec","from":"default"},"videosFolder":{"value":"cypress/videos","from":"default"},"reporterOptions":{"value":null,"from":"default"},"testFiles":{"value":"**/*.*","from":"default"},"defaultCommandTimeout":{"value":15000,"from":"config"},"trashAssetsBeforeRuns":{"value":true,"from":"default"},"execTimeout":{"value":60000,"from":"default"},"blacklistHosts":{"value":null,"from":"default"},"pageLoadTimeout":{"value":60000,"from":"default"},"userAgent":{"value":null,"from":"default"},"requestTimeout":{"value":5000,"from":"default"},"viewportWidth":{"value":1000,"from":"default"},"responseTimeout":{"value":30000,"from":"default"},"viewportHeight":{"value":660,"from":"default"},"taskTimeout":{"value":60000,"from":"default"},"video":{"value":true,"from":"default"},"videoCompression":{"value":32,"from":"default"},"videoUploadOnPasses":{"value":true,"from":"default"},"watchForFileChanges":{"value":false,"from":"config"},"waitForAnimations":{"value":true,"from":"default"}},"parentTestsFolder":"[MY_BASEPATH]/synthetic-tests/cypress","parentTestsFolderDisplay":"synthetic-tests/cypress","supportFolder":"[MY_BASEPATH]/synthetic-tests/cypress/support","integrationExampleName":"examples","integrationExamplePath":"[MY_BASEPATH]/synthetic-tests/cypress/tests/examples","scaffoldedFiles":[{"name":"cypress","children":[{"name":"tests","children":[{"name":"examples","children":[{"name":"actions.spec.js"},{"name":"aliasing.spec.js"},{"name":"assertions.spec.js"},{"name":"connectors.spec.js"},{"name":"cookies.spec.js"},{"name":"cypress_api.spec.js"},{"name":"files.spec.js"},{"name":"local_storage.spec.js"},{"name":"location.spec.js"},{"name":"misc.spec.js"},{"name":"navigation.spec.js"},{"name":"network_requests.spec.js"},{"name":"querying.spec.js"},{"name":"spies_stubs_clocks.spec.js"},{"name":"traversal.spec.js"},{"name":"utilities.spec.js"},{"name":"viewport.spec.js"},{"name":"waiting.spec.js"},{"name":"window.spec.js"}]}]},{"name":"support","children":[{"name":"commands.js"},{"name":"index.js"}]}]}],"state":{},"proxyUrl":"http://localhost:46237","browserUrl":"http://localhost:46237/__/","reporterUrl":"http://localhost:46237/__cypress/reporter","xhrUrl":"__cypress/xhrs/"},"reporterStats":{"suites":2,"tests":1,"passes":0,"pending":0,"failures":1,"start":"2019-04-01T20:27:55.016Z","end":"2019-04-01T20:27:55.508Z","duration":492}},"headers":{"x-route-version":"2","x-os-name":"linux","x-cypress-version":"3.2.0"}}
Mon, 01 Apr 2019 20:27:56 GMT cypress:server:api response { videoUploadUrl: 'https://builds.cypress.io/e2b0bfd2-3667-4404-a5a8-a20ca106309b?AWSAccessKeyId=AKIAIGH7VO3KJJU4LBGQ&Expires=1554154076&Signature=tUgbswWhtNploVRDA5VXHXlKl7c%3D', screenshotUploadUrls: [ { screenshotId: 'o3ov5', uploadUrl: 'https://builds.cypress.io/a14cd155-2761-4e46-9677-d0eaeb51ba0b?AWSAccessKeyId=AKIAIGH7VO3KJJU4LBGQ&Expires=1554154076&Signature=0EV31u7t5RMEHLbilgWI2R2o6Ho%3D' }, { screenshotId: 'zohdm', uploadUrl: 'https://builds.cypress.io/a5cd9873-8467-4b66-b1ea-275f22d70168?AWSAccessKeyId=AKIAIGH7VO3KJJU4LBGQ&Expires=1554154076&Signature=A1K0517EXamsro0STfpYlORFvkE%3D' }, { screenshotId: 'if0t2', uploadUrl: 'https://builds.cypress.io/33d72290-cd58-4aab-b677-02183ea2586f?AWSAccessKeyId=AKIAIGH7VO3KJJU4LBGQ&Expires=1554154076&Signature=CIUQsMI524XNZRav1Pijw7H%2Fwtk%3D' }, { screenshotId: 'vioxl', uploadUrl: 'https://builds.cypress.io/46de20ae-28fc-4436-8394-ae840d9a6523?AWSAccessKeyId=AKIAIGH7VO3KJJU4LBGQ&Expires=1554154076&Signature=ru1ZtsEmaWEvMkqnUGuTWVS6Vs8%3D' } ] }
  - Done Uploading (1/5) [MY_BASEPATH]/synthetic-tests/cypress/videos/live-tests.spec.js.mp4
  - Done Uploading (2/5) [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (3).png
  - Done Uploading (3/5) [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (2).png
  - Done Uploading (4/5) [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed).png
  - Done Uploading (5/5) [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (1).png
Mon, 01 Apr 2019 20:27:57 GMT cypress:server:api request to url: PUT https://api.cypress.io/instances/e83f28c2-3494-42ac-b39a-e9891d0180c3/stdout with params: {"body":{"stdout":"We encountered an unexpected error talking to our servers.\n\nWe will retry 3 more times in 30 seconds...\n\nThe server's response was:\n\nRequestError: Error: socket hang up\n\n──────────────────────────────────────────────────────────────────────────────\n                                                                              \n  Running: live-tests.spec.js...                                     (1 of 1) \n  Estimated: 3 minutes, 3 seconds\n\n\n  Live site tests\n    Login and pair device\n\r      1) MERCHANT - Should log in as merchant\n\n  0 passing (492ms)\n  1 failing\n\n  1) Live site tests Login and pair device MERCHANT - Should log in as merchant:\n     CypressError: cy.visit() must be called with a URL or an options object containing a URL as its 1st argument\n      at Object.cypressErr (http://localhost:46237/__cypress/runner/cypress_runner.js:65727:11)\n      at Object.throwErr (http://localhost:46237/__cypress/runner/cypress_runner.js:65692:18)\n      at Object.throwErrByPath (http://localhost:46237/__cypress/runner/cypress_runner.js:65719:17)\n      at Context.visit (http://localhost:46237/__cypress/runner/cypress_runner.js:56064:16)\n      at http://localhost:46237/__cypress/runner/cypress_runner.js:61291:33\n      at tryCatcher (http://localhost:46237/__cypress/runner/cypress_runner.js:131273:23)\n      at Promise._settlePromiseFromHandler (http://localhost:46237/__cypress/runner/cypress_runner.js:129291:31)\n      at Promise._settlePromise (http://localhost:46237/__cypress/runner/cypress_runner.js:129348:18)\n      at Promise._settlePromiseCtx (http://localhost:46237/__cypress/runner/cypress_runner.js:129385:10)\n      at Async._drainQueue (http://localhost:46237/__cypress/runner/cypress_runner.js:126202:12)\n      at Async._drainQueues (http://localhost:46237/__cypress/runner/cypress_runner.js:126207:10)\n      at Async.drainQueues (http://localhost:46237/__cypress/runner/cypress_runner.js:126081:14)\n      at <anonymous>\n\n\n\n\n  (Results)\n\n  ┌────────────────────────────────────┐\n  │ Tests:        13                   │\n  │ Passing:      0                    │\n  │ Failing:      1                    │\n  │ Pending:      0                    │\n  │ Skipped:      12                   │\n  │ Screenshots:  4                    │\n  │ Video:        true                 │\n  │ Duration:     0 seconds            │\n  │ Estimated:    3 minutes, 3 seconds │\n  │ Spec Ran:     live-tests.spec.js   │\n  └────────────────────────────────────┘\n\n\n  (Screenshots)\n\n  - [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed).png (1280x720)\n  - [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (1).png (1280x720)\n  - [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (2).png (1280x720)\n  - [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (3).png (1280x720)\n\n\n  (Video)\n\n  - Started processing:   Compressing to 32 CRF\n  - Finished processing:  [MY_BASEPATH]/synthetic-tests/cypress/videos/live-tests.spec.js.mp4 (0 seconds)\n\n\n  (Uploading Results)\n\n  - Done Uploading (1/5) [MY_BASEPATH]/synthetic-tests/cypress/videos/live-tests.spec.js.mp4\n  - Done Uploading (2/5) [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (3).png\n  - Done Uploading (3/5) [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (2).png\n  - Done Uploading (4/5) [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed).png\n  - Done Uploading (5/5) [MY_BASEPATH]/synthetic-tests/cypress/screenshots/live-tests.spec.js/Live site tests -- Login and pair device -- MERCHANT - Should log in as merchant (failed) (1).png\n"},"headers":{"x-os-name":"linux","x-cypress-version":"3.2.0"}}
Mon, 01 Apr 2019 20:27:57 GMT cypress:server:api response 'OK'

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

  (Run Finished)

      Spec                                  Tests  Pass…  Fail…  Pend…  Skip…
  ┌──────────────────────────────────────────────────────────────────────────┐
  │ ✖ live-tests.spec.js            495ms     13      -      1      -     12 │
  └──────────────────────────────────────────────────────────────────────────┘
    1 of 1 failed (100%)            495ms     13      -      1      -     12

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

  Recorded Run: https://dashboard.cypress.io/#/projects/[MY_PROJECT_ID]/runs/526
jennifer-shehane commented 5 years ago

@itslenny Can you run this with the DEBUG logs as described here.

jennifer-shehane commented 5 years ago

Hey @itslenny, any update here?

maryhipp commented 5 years ago

We are also having this problem running our test suite against both Chrome 74 and Electron 59 (headless) on CI pipelines in Jenkins, using Cypress 3.2.0. Our test suite always ends up running and recording to the dashboard successfully, but takes anywhere from 1-3 tries with that same output before the first test will start.

We encountered an unexpected error talking to our servers.

We will retry 3 more times in 30 seconds...

The server's response was:

RequestError: Error: socket hang up

I can send debug logs but there are a LOT - should I focus on a certain section that would be helpful? This is the request that times out and then eventually succeeds, usually only for the first test.

Tue, 11 Jun 2019 21:27:28 GMT cypress:server:api request to url: POST https://api.cypress.io/runs/********/instances with params: {"body":{"spec":"dist/integration/api/companies/companies-find.spec.js","groupId":"linux-Chrome-74-ac57cc4057","machineId":"45400210-88a8-4b3b-b8b9-1ab9ae4d51c9","platform":{"osCpus":[{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3400,"times":{"user":827300,"nice":0,"sys":188600,"idle":5578100,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3385,"times":{"user":762000,"nice":0,"sys":155600,"idle":5724400,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3399,"times":{"user":788700,"nice":0,"sys":161700,"idle":6091800,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3391,"times":{"user":786600,"nice":0,"sys":176500,"idle":6102900,"irq":0}}],"osName":"linux","osMemory":{"free":4363681792,"total":7997227008},"osVersion":"Amazon Linux - 2018.03","browserName":"Chrome","browserVersion":"74.0.3729.157"}},"headers":{"x-route-version":"5","x-os-name":"linux","x-cypress-version":"3.2.0"}}
flotwig commented 5 years ago

@maryhipp Please go ahead and share the entire DEBUG log, it might have some useful context that will help debug the issue.

maryhipp commented 5 years ago

@flotwig redacted logs are here: https://gist.github.com/maryhipp/b1398a87effaf2a7d281ae7505e50423

LG21 commented 4 years ago

Any update on this? Having same issue.

ranbir-samsung commented 4 years ago

Same issue encountered here as well.

We encountered an unexpected error talking to our servers.

We will retry 3 more times in 30 seconds...

The server's response was:

RequestError: Error: Error establishing proxy connection. Response from server was: HTTP/1.1 400 Bad Request
Server: nginx
Date: Mon, 13 Jul 2020 16:49:36 GMT
Content-Type: text/html
Content-Length: 150
Connection: close

But all my tests pass but are not recorded. Please this issue needs urgent rectification as it's pretty useful.

boldtrn commented 4 years ago

For what it's worth, I encountered the same issue. In my case the url to visit contains a "special character", in this case the ü which is used in the German language. Removing the ü fixed the issue for our case.

jennifer-shehane commented 3 years ago

@boldtrn Could you provide this url by chance? You could also email it to support@cypress.io.

boldtrn commented 3 years ago

@jennifer-shehane, IIRC the URL was: http://localhost:8000/?point=Nürtingen&point=Metzingen&point=Reutlingen

javierfuentesm commented 2 years ago

hey im getting this error inside jenkins when i run the tests with the --record and the -key for the cypress dashboard

image
kevingorry commented 2 years ago

I'm also seeing this issue today

`[1] [test-runner] We encountered an unexpected error talking to our servers.
[1] [test-runner] 
[1] [test-runner] Because you passed the --parallel flag, this run cannot proceed because it requires a valid response from our servers.
[1] [test-runner] 
[1] [test-runner] The --ciBuildId flag you passed was: 2927625322-1
[1] [test-runner] 
[1] [test-runner] The server's response was:
[1] [test-runner] 
[1] [test-runner] StatusCodeError: 503 - "<!DOCTYPE html>\n\t<html>\n\t  <head>\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t\t<meta charset=\"utf-8\">\n\t\t<title>Application Error</title>\n\t\t<style media=\"screen\">\n\t\t  html,body,iframe {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t  }\n\t\t  html,body {\n\t\t\theight: 100%;\n\t\t\toverflow: hidden;\n\t\t  }\n\t\t  iframe {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tborder: 0;\n\t\t  }\n\t\t</style>\n\t  </head>\n\t  <body>\n\t\t<iframe src=\"//www.herokucdn.com/error-pages/application-error.html\"></iframe>\n\t  </body>\n\t</html>"
[1] [test-runner] yarn pr:testrunner exited with code 1`
sirdarthvader commented 1 year ago

Hey, Even I am getting this error while running the tests locally from my laptop and trying to record the test run to the cloud dashboard(Paid plan).

We encountered an unexpected error talking to our servers.

We will retry 3 more times in 30 seconds...

The server's response was:

RequestError: Error: read ECONNRESET
We encountered an unexpected error talking to our servers.

We will retry 2 more times in 1 minute...

The server's response was:

RequestError: Error: read ECONNRESET
We encountered an unexpected error talking to our servers.

We will retry 1 more time in 2 minutes...

The server's response was:

RequestError: Error: read ECONNRESET
We encountered an unexpected error talking to our servers.

We will retry 0 more times in ...

The server's response was:

RequestError: Error: read ECONNRESET
We encountered an unexpected error talking to our servers.

The server's response was:

RequestError: Error: read ECONNRESET
WilsonMedina commented 1 year ago

┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Cypress: 12.7.0 │ │ Browser: Electron 106 (headless) │ │ Node Version: v20.1.0 (/usr/local/bin/node) │ │ Specs: 1 found (GX-16717-Dropdown-Selectmenu.cy.js) │ │ Searched: */**/GX-16717-Dropdown-Selectmenu.cy.js │ │ Params: Tag: false, Group: false, Parallel: false │ │ Run URL: https://cloud.cypress.io/projects/2pw67q/runs/826 │ └────────────────────────────────────────────────────────────────────────────────────────────────┘

We encountered an unexpected error communicating with our servers.

RequestError: Error: ESOCKETTIMEDOUT

We will retry 3 more times in 30 seconds...

We encountered an unexpected error communicating with our servers.

RequestError: Error: ESOCKETTIMEDOUT

We will retry 2 more times in 1 minute...

Hello May 2023 and I am running my tests on ubuntu, unfortunately it does not run cypress, it does not load more than what is shown above, I have been trying to solve this for 2 days and I can't find anything that can help me, I would greatly appreciate anyone who can direct me with this error is only for ubuntu and what would be the process to avoid it

chrisbreiding commented 1 year ago

@WilsonMedina Do you have a reproducible example of this happening? Ideally it would be a minimal reproduction we can run to debug the issue.

zuo305 commented 1 year ago

Same issue on the windows, we used 10.8.0 before, that one is working well. after we upgrade to 12.13.0, this issue popup.

AtofStryker commented 1 year ago

@zuo305 are you able to provide a reproduction of the issue?

AtofStryker commented 1 year ago

Right now there doesn't seem to be enough information to reproduce the problem on our end. We'll have to close this issue until we can reproduce it. This does not mean that your issue is not happening - it just means that we do not have a path to move forward.

Please open a new issue with a reproducible example and link to this issue. Here are some tips for providing a Short, Self Contained, Correct, Example and our own Troubleshooting Cypress guide.

ArchanaDontula commented 1 year ago

The same issue still happening on my end. Windows 10, Cypress 12.12.0. Cypress uploads the each test suite results once the suite execution complete, but when this error occurs it stops executing the next test suite execution

nagash77 commented 1 year ago

@ArchanaDontula please open a new issue with a reproducible example and the Cypress team will be happy to investigate.

arafatmusha commented 1 year ago

I don't understand why this issue is closed. We need Cypress to fix it. If you agree with me, please give me sum up

AtofStryker commented 1 year ago

Hi @arafatmusha. The main reason this issue was closed was due to a lack of a reproducible example / reproduction. We can reopen this issue if you are able to provide a reproduction repository or a folder where we can run the code and reproduce the issue.

arafatmusha commented 1 year ago

After a couple of weeks of troubleshooting this issue in our org, this error is caused by some security tools that block the network connection with Cypress Cloud. The Cypress-issued CA cert is not verified as a trusted cert and is captured by the security tool as a risk malware. So, if you are experiencing this issue, please disable that cloud security platform tool on your laptop. Or, contact your company's security engineer to whitelist this Cypress CA cert. However, cypress provides very limited resources on its issued cert, and its customer service is not aware of anything related to this. Just FYI @AtofStryker