Console output full of garbage characters when using Cypress

Summary

In jobs that use Cypress, the output contains strange characters and the raw CI log is full of Unicode 1B5B characters. This breaks the output rendering making it difficult/impossible to see the output properly.

Example job: https://gitlab.com/gitlab-silver/ci-test/-/jobs/268489392

.gitlab-ci.yml
stages:
  - test

cypress:
  stage: test
  image: cypress/base:8

  before_script:
    - npm install --no-package-lock cypress@^3.4.1

  script:
    - npx cypress run

  artifacts:
    when: on_failure
    paths:
      # Work around Go not supporting ** globbing.
      # See https://gitlab.com/gitlab-org/gitlab-runner/issues/2620
      - cypress/screenshots/*.png
      - cypress/screenshots/*/*.png
      - cypress/screenshots/*/*/*.png
      - cypress/screenshots/*/*/*/*.png
      - cypress/screenshots/*/*/*/*/*.png
      - cypress/videos/*.mp4
      - cypress/videos/*/*.mp4
      - cypress/videos/*/*/*.mp4
      - cypress/videos/*/*/*/*.mp4
      - cypress/videos/*/*/*/*/*.mp4
    expire_in: 5 days

Relevant logs and/or screenshots

job log
Running with gitlab-runner 12.1.0 (de7731dd)
  on docker-auto-scale 0277ea0f
section_start:1565265168:prepare_executor
Using Docker executor with image cypress/base:8 ...
Pulling docker image cypress/base:8 ...
Using docker image sha256:2ad7a04a3a1d41fac2585d88e2dbd19ed3df9c57df2b27276c30e4f317c2c8e3 for cypress/base:8 ...
section_end:1565265212:prepare_executor
section_start:1565265212:prepare_script
Running on runner-0277ea0f-project-13715578-concurrent-0 via runner-0277ea0f-srm-1565265125-c320d442...
section_end:1565265220:prepare_script
section_start:1565265220:get_sources
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/gitlab-silver/ci-test/.git/
Created fresh repository.
From https://gitlab.com/gitlab-silver/ci-test
 * [new branch]      master     -> origin/master
Checking out bc57bdc8 as master...

Skipping Git submodules setup
section_end:1565265226:get_sources
section_start:1565265226:restore_cache
section_end:1565265228:restore_cache
section_start:1565265228:download_artifacts
section_end:1565265229:download_artifacts
section_start:1565265229:build_script
$ npm install --no-package-lock cypress@^3.4.1

> cypress@3.4.1 postinstall /builds/gitlab-silver/ci-test/node_modules/cypress
> node index.js --exec install

Installing Cypress (version: 3.4.1)

[?25l[11:54:00]  Downloading Cypress     [started]
[11:54:02]  Downloading Cypress     [completed]
[11:54:02]  Unzipping Cypress       [started]
[11:54:34]  Unzipping Cypress       [completed]
[11:54:34]  Finishing Installation  [started]
[11:54:34]  Finishing Installation  [completed]
[?25h
You can now open Cypress by running: node_modules/.bin/cypress open

https://on.cypress.io/installing-cypress

[?25h+ cypress@3.4.1
added 188 packages from 125 contributors and audited 314 packages in 44.418s
found 0 vulnerabilities

$ npx cypress run
It looks like this is your first time using Cypress: 3.4.1

[?25l[11:54:36]  Verifying Cypress can run /root/.cache/Cypress/3.4.1/Cypress [started]
[11:54:38]  Verifying Cypress can run /root/.cache/Cypress/3.4.1/Cypress [completed]
[?25h
Opening Cypress...

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

  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:    3.4.1                                                                              │
  │ Browser:    Electron 61 (headless)                                                             │
  │ Specs:      19 found (examples/actions.spec.js, examples/aliasing.spec.js, examples/assertion… │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/actions.spec.js...                                                    (1 of 19) 


  Actions

    ✓ .type() - type into a DOM element (5115ms)

    ✓ .focus() - focus on a DOM element (872ms)

    ✓ .blur() - blur off a DOM element (1093ms)

    ✓ .clear() - clears an input or textarea element (1236ms)

    ✓ .submit() - submit a form (1117ms)

    ✓ .click() - click on a DOM element (2759ms)

    ✓ .dblclick() - double click on a DOM element (975ms)

    ✓ .check() - check a checkbox or radio element (1626ms)

    ✓ .uncheck() - uncheck a checkbox element (1651ms)

    ✓ .select() - select an option in a <select> element (1452ms)

    ✓ .scrollIntoView() - scroll an element into view (912ms)

    ✓ .trigger() - trigger an event on a DOM element (820ms)

    ✓ cy.scrollTo() - scroll the window or element to a position (2856ms)


  13 passing (23s)


  (Results)

  ┌────────────────────────────────────────┐
  │ Tests:        13                       │
  │ Passing:      13                       │
  │ Failing:      0                        │
  │ Pending:      0                        │
  │ Skipped:      0                        │
  │ Screenshots:  0                        │
  │ Video:        true                     │
  │ Duration:     22 seconds               │
  │ Spec Ran:     examples/actions.spec.js │
  └────────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Compression progress:  91%
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/actions.spec.js.mp4 (11 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/aliasing.spec.js...                                                   (2 of 19) 


  Aliasing

    ✓ .as() - alias a DOM element for later use (1135ms)

    ✓ .as() - alias a route for later use (1448ms)


  2 passing (3s)


  (Results)

  ┌─────────────────────────────────────────┐
  │ Tests:        2                         │
  │ Passing:      2                         │
  │ Failing:      0                         │
  │ Pending:      0                         │
  │ Skipped:      0                         │
  │ Screenshots:  0                         │
  │ Video:        true                      │
  │ Duration:     2 seconds                 │
  │ Spec Ran:     examples/aliasing.spec.js │
  └─────────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/aliasing.spec.js.mp4 (2 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/assertions.spec.js...                                                 (3 of 19) 


  Assertions
    Implicit Assertions

      ✓ .should() - make an assertion about the current subject (911ms)

      ✓ .and() - chain multiple assertions together (1039ms)
    Explicit Assertions

      ✓ expect - make an assertion about a specified subject (959ms)

      ✓ pass your own callback function to should() (994ms)

      ✓ finds element by class name regex (771ms)

      ✓ can throw any error (693ms)

      ✓ matches unknown text between two elements (906ms)

      ✓ assert - assert shape of an object (533ms)


  8 passing (7s)


  (Results)

  ┌───────────────────────────────────────────┐
  │ Tests:        8                           │
  │ Passing:      8                           │
  │ Failing:      0                           │
  │ Pending:      0                           │
  │ Skipped:      0                           │
  │ Screenshots:  0                           │
  │ Video:        true                        │
  │ Duration:     6 seconds                   │
  │ Spec Ran:     examples/assertions.spec.js │
  └───────────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/assertions.spec.js.mp4 (3 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/connectors.spec.js...                                                 (4 of 19) 


  Connectors

    ✓ .each() - iterate over an array of elements (815ms)

    ✓ .its() - get properties on the current subject (988ms)

    ✓ .invoke() - invoke a function on the current subject (688ms)

    ✓ .spread() - spread an array as individual args to callback function (992ms)
    .then()

      ✓ invokes a callback function with the current subject (776ms)

      ✓ yields the returned value to the next command (690ms)

      ✓ yields the original subject without return (645ms)


  7 passing (6s)


  (Results)

  ┌───────────────────────────────────────────┐
  │ Tests:        7                           │
  │ Passing:      7                           │
  │ Failing:      0                           │
  │ Pending:      0                           │
  │ Skipped:      0                           │
  │ Screenshots:  0                           │
  │ Video:        true                        │
  │ Duration:     5 seconds                   │
  │ Spec Ran:     examples/connectors.spec.js │
  └───────────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/connectors.spec.js.mp4 (3 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/cookies.spec.js...                                                    (5 of 19) 


  Cookies

    ✓ cy.getCookie() - get a browser cookie (1707ms)

    ✓ cy.getCookies() - get browser cookies (931ms)

    ✓ cy.setCookie() - set a browser cookie (1110ms)

    ✓ cy.clearCookie() - clear a browser cookie (956ms)

    ✓ cy.clearCookies() - clear browser cookies (1040ms)


  5 passing (6s)


  (Results)

  ┌────────────────────────────────────────┐
  │ Tests:        5                        │
  │ Passing:      5                        │
  │ Failing:      0                        │
  │ Pending:      0                        │
  │ Skipped:      0                        │
  │ Screenshots:  0                        │
  │ Video:        true                     │
  │ Duration:     5 seconds                │
  │ Spec Ran:     examples/cookies.spec.js │
  └────────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/cookies.spec.js.mp4 (3 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/cypress_api.spec.js...                                                (6 of 19) 


  Cypress.Commands

    ✓ .add() - create a custom command (785ms)

  Cypress.Cookies

    ✓ .debug() - enable or disable debugging (1334ms)

    ✓ .preserveOnce() - preserve cookies by key (1123ms)

    ✓ .defaults() - set defaults for all cookies (587ms)

  Cypress.Server

    ✓ .defaults() - change default config of server (532ms)

  Cypress.arch

    ✓ Get CPU architecture name of underlying OS (836ms)

  Cypress.config()

    1) Get and set configuration options

  Cypress.dom

    ✓ .isHidden() - determine if a DOM element is hidden (803ms)

  Cypress.env()

    ✓ Get environment variables (812ms)

  Cypress.log

    ✓ Control what is printed to the Command Log (698ms)

  Cypress.platform

    ✓ Get underlying OS name (1006ms)

  Cypress.version

    ✓ Get current version of Cypress being run (567ms)

  Cypress.spec

    ✓ Get current spec information (527ms)


  12 passing (11s)
  1 failing

  1) Cypress.config() Get and set configuration options:
     AssertionError: expected { Object (baseUrl, projectRoot, ...) } to have a property 'baseUrl' of null, but got 'https://example.cypress.io'
      at Context.runnable.fn (https://example.cypress.io/__cypress/runner/cypress_runner.js:80477:20)
      at callFn (https://example.cypress.io/__cypress/runner/cypress_runner.js:30713:21)
      at https://example.cypress.io/__cypress/runner/cypress_runner.js:84151:28
      at PassThroughHandlerContext.finallyHandler (https://example.cypress.io/__cypress/runner/cypress_runner.js:115517:23)
      at PassThroughHandlerContext.tryCatcher (https://example.cypress.io/__cypress/runner/cypress_runner.js:118962:23)
      at Promise._settlePromiseFromHandler (https://example.cypress.io/__cypress/runner/cypress_runner.js:116898:31)
      at Promise._settlePromise (https://example.cypress.io/__cypress/runner/cypress_runner.js:116955:18)
      at Promise._settlePromise0 (https://example.cypress.io/__cypress/runner/cypress_runner.js:117000:10)
      at Promise._settlePromises (https://example.cypress.io/__cypress/runner/cypress_runner.js:117079:18)
      at Async../node_modules/bluebird/js/release/async.js.Async._drainQueue (https://example.cypress.io/__cypress/runner/cypress_runner.js:113687:16)
      at Async../node_modules/bluebird/js/release/async.js.Async._drainQueues (https://example.cypress.io/__cypress/runner/cypress_runner.js:113697:10)
      at Async.drainQueues (https://example.cypress.io/__cypress/runner/cypress_runner.js:113571:14)
      at <anonymous>




  (Results)

  ┌────────────────────────────────────────────┐
  │ Tests:        13                           │
  │ Passing:      12                           │
  │ Failing:      1                            │
  │ Pending:      0                            │
  │ Skipped:      0                            │
  │ Screenshots:  1                            │
  │ Video:        true                         │
  │ Duration:     11 seconds                   │
  │ Spec Ran:     examples/cypress_api.spec.js │
  └────────────────────────────────────────────┘


  (Screenshots)

  - /builds/gitlab-silver/ci-test/cypress/screenshots/examples/cypress_api.spec.js/Cypress.config() -- Get and set configuration options (failed).png (1280x720)


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/cypress_api.spec.js.mp4 (5 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/files.spec.js...                                                      (7 of 19) 


  Files

    ✓ cy.fixture() - load a fixture (1602ms)

    ✓ cy.fixture() or require - load a fixture (858ms)

    ✓ cy.readFile() - read a files contents (918ms)

    ✓ cy.writeFile() - write to a file (1191ms)


  4 passing (5s)


  (Results)

  ┌──────────────────────────────────────┐
  │ Tests:        4                      │
  │ Passing:      4                      │
  │ Failing:      0                      │
  │ Pending:      0                      │
  │ Skipped:      0                      │
  │ Screenshots:  0                      │
  │ Video:        true                   │
  │ Duration:     4 seconds              │
  │ Spec Ran:     examples/files.spec.js │
  └──────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/files.spec.js.mp4 (3 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/local_storage.spec.js...                                              (8 of 19) 


  Local Storage

    ✓ cy.clearLocalStorage() - clear all data in local storage (1420ms)


  1 passing (2s)


  (Results)

  ┌──────────────────────────────────────────────┐
  │ Tests:        1                              │
  │ Passing:      1                              │
  │ Failing:      0                              │
  │ Pending:      0                              │
  │ Skipped:      0                              │
  │ Screenshots:  0                              │
  │ Video:        true                           │
  │ Duration:     1 second                       │
  │ Spec Ran:     examples/local_storage.spec.js │
  └──────────────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/local_storage.spec.js.mp4 (1 second)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/location.spec.js...                                                   (9 of 19) 


  Location

    ✓ cy.hash() - get the current URL hash (595ms)

    1) cy.location() - get window.location

    2) cy.url() - get the current URL


  1 passing (11s)
  2 failing

  1) Location cy.location() - get window.location:
     CypressError: Timed out retrying: expected 'https://example.cypress.io/commands/location' to equal 'http://localhost:8080/commands/location'
      at Object.cypressErr (https://example.cypress.io/__cypress/runner/cypress_runner.js:85348:11)
      at Object.throwErr (https://example.cypress.io/__cypress/runner/cypress_runner.js:85303:18)
      at Object.throwErrByPath (https://example.cypress.io/__cypress/runner/cypress_runner.js:85335:17)
      at retry (https://example.cypress.io/__cypress/runner/cypress_runner.js:77321:16)
      at onFailFn (https://example.cypress.io/__cypress/runner/cypress_runner.js:68422:16)
      at tryCatcher (https://example.cypress.io/__cypress/runner/cypress_runner.js:118962:23)
      at Promise._settlePromiseFromHandler (https://example.cypress.io/__cypress/runner/cypress_runner.js:116898:31)
      at Promise._settlePromise (https://example.cypress.io/__cypress/runner/cypress_runner.js:116955:18)
      at Promise._settlePromise0 (https://example.cypress.io/__cypress/runner/cypress_runner.js:117000:10)
      at Promise._settlePromises (https://example.cypress.io/__cypress/runner/cypress_runner.js:117075:18)
      at Async../node_modules/bluebird/js/release/async.js.Async._drainQueue (https://example.cypress.io/__cypress/runner/cypress_runner.js:113687:16)
      at Async../node_modules/bluebird/js/release/async.js.Async._drainQueues (https://example.cypress.io/__cypress/runner/cypress_runner.js:113697:10)
      at Async.drainQueues (https://example.cypress.io/__cypress/runner/cypress_runner.js:113571:14)
      at <anonymous>

  2) Location cy.url() - get the current URL:
     CypressError: Timed out retrying: expected 'https://example.cypress.io/commands/location' to equal 'http://localhost:8080/commands/location'
      at Object.cypressErr (https://example.cypress.io/__cypress/runner/cypress_runner.js:85348:11)
      at Object.throwErr (https://example.cypress.io/__cypress/runner/cypress_runner.js:85303:18)
      at Object.throwErrByPath (https://example.cypress.io/__cypress/runner/cypress_runner.js:85335:17)
      at retry (https://example.cypress.io/__cypress/runner/cypress_runner.js:77321:16)
      at onFailFn (https://example.cypress.io/__cypress/runner/cypress_runner.js:68422:16)
      at tryCatcher (https://example.cypress.io/__cypress/runner/cypress_runner.js:118962:23)
      at Promise._settlePromiseFromHandler (https://example.cypress.io/__cypress/runner/cypress_runner.js:116898:31)
      at Promise._settlePromise (https://example.cypress.io/__cypress/runner/cypress_runner.js:116955:18)
      at Promise._settlePromise0 (https://example.cypress.io/__cypress/runner/cypress_runner.js:117000:10)
      at Promise._settlePromises (https://example.cypress.io/__cypress/runner/cypress_runner.js:117075:18)
      at Async../node_modules/bluebird/js/release/async.js.Async._drainQueue (https://example.cypress.io/__cypress/runner/cypress_runner.js:113687:16)
      at Async../node_modules/bluebird/js/release/async.js.Async._drainQueues (https://example.cypress.io/__cypress/runner/cypress_runner.js:113697:10)
      at Async.drainQueues (https://example.cypress.io/__cypress/runner/cypress_runner.js:113571:14)
      at <anonymous>




  (Results)

  ┌─────────────────────────────────────────┐
  │ Tests:        3                         │
  │ Passing:      1                         │
  │ Failing:      2                         │
  │ Pending:      0                         │
  │ Skipped:      0                         │
  │ Screenshots:  2                         │
  │ Video:        true                      │
  │ Duration:     10 seconds                │
  │ Spec Ran:     examples/location.spec.js │
  └─────────────────────────────────────────┘


  (Screenshots)

  - /builds/gitlab-silver/ci-test/cypress/screenshots/examples/location.spec.js/Location -- cy.location() - get window.location (failed).png (1280x720)
  - /builds/gitlab-silver/ci-test/cypress/screenshots/examples/location.spec.js/Location -- cy.url() - get the current URL (failed).png (1280x720)


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/location.spec.js.mp4 (4 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/misc.spec.js...                                                      (10 of 19) 


  Misc

    ✓ .end() - end the command chain (1394ms)

    ✓ cy.exec() - execute a system command (2468ms)

    ✓ cy.focused() - get the DOM element that has focus (1002ms)

    ✓ cy.wrap() - wrap an object (909ms)
    Cypress.Screenshot

      ✓ cy.screenshot() - take a screenshot (3414ms)

      ✓ Cypress.Screenshot.defaults() - change default config of screenshots (481ms)


  6 passing (10s)


  (Results)

  ┌─────────────────────────────────────┐
  │ Tests:        6                     │
  │ Passing:      6                     │
  │ Failing:      0                     │
  │ Pending:      0                     │
  │ Skipped:      0                     │
  │ Screenshots:  1                     │
  │ Video:        true                  │
  │ Duration:     9 seconds             │
  │ Spec Ran:     examples/misc.spec.js │
  └─────────────────────────────────────┘


  (Screenshots)

  - /builds/gitlab-silver/ci-test/cypress/screenshots/examples/misc.spec.js/my-image.png (1000x1800)


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/misc.spec.js.mp4 (5 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/navigation.spec.js...                                                (11 of 19) 
(node:203) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exitEarlyWithErr listeners added. Use emitter.setMaxListeners() to increase limit


  Navigation

    ✓ cy.go() - go back or forward in the browser's history (4348ms)

    ✓ cy.reload() - reload the page (2113ms)

    ✓ cy.visit() - visit a remote url (1849ms)


  3 passing (8s)


  (Results)

  ┌───────────────────────────────────────────┐
  │ Tests:        3                           │
  │ Passing:      3                           │
  │ Failing:      0                           │
  │ Pending:      0                           │
  │ Skipped:      0                           │
  │ Screenshots:  0                           │
  │ Video:        true                        │
  │ Duration:     8 seconds                   │
  │ Spec Ran:     examples/navigation.spec.js │
  └───────────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/navigation.spec.js.mp4 (4 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/network_requests.spec.js...                                          (12 of 19) 


  Network Requests

    ✓ cy.server() - control behavior of network requests and responses (918ms)

    ✓ cy.request() - make an XHR request (2001ms)

    ✓ cy.request() - verify response using BDD syntax (1456ms)

    ✓ cy.request() with query parameters (1113ms)

    ✓ cy.request() - pass result to the second request (1133ms)

    ✓ cy.request() - save response in the shared test context (1401ms)

    ✓ cy.route() - route responses to matching requests (2044ms)


  7 passing (10s)


  (Results)

  ┌─────────────────────────────────────────────────┐
  │ Tests:        7                                 │
  │ Passing:      7                                 │
  │ Failing:      0                                 │
  │ Pending:      0                                 │
  │ Skipped:      0                                 │
  │ Screenshots:  0                                 │
  │ Video:        true                              │
  │ Duration:     10 seconds                        │
  │ Spec Ran:     examples/network_requests.spec.js │
  └─────────────────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/network_requests.spec.js.mp4 (5 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/querying.spec.js...                                                  (13 of 19) 


  Querying

    ✓ cy.get() - query DOM elements (740ms)

    ✓ cy.contains() - query DOM elements with matching content (949ms)

    ✓ .within() - query DOM elements within a specific element (933ms)

    ✓ cy.root() - query the root DOM element (595ms)

    1) best practices - selecting elements


  4 passing (9s)
  1 failing

  1) Querying best practices - selecting elements:
     CypressError: Timed out retrying: Expected to find element: '[data-cy=best-practices-selecting-elements]', but never found it.
      at Object.cypressErr (https://example.cypress.io/__cypress/runner/cypress_runner.js:85348:11)
      at Object.throwErr (https://example.cypress.io/__cypress/runner/cypress_runner.js:85303:18)
      at Object.throwErrByPath (https://example.cypress.io/__cypress/runner/cypress_runner.js:85335:17)
      at retry (https://example.cypress.io/__cypress/runner/cypress_runner.js:77321:16)
      at onFailFn (https://example.cypress.io/__cypress/runner/cypress_runner.js:68422:16)
      at tryCatcher (https://example.cypress.io/__cypress/runner/cypress_runner.js:118962:23)
      at Promise._settlePromiseFromHandler (https://example.cypress.io/__cypress/runner/cypress_runner.js:116898:31)
      at Promise._settlePromise (https://example.cypress.io/__cypress/runner/cypress_runner.js:116955:18)
      at Promise._settlePromise0 (https://example.cypress.io/__cypress/runner/cypress_runner.js:117000:10)
      at Promise._settlePromises (https://example.cypress.io/__cypress/runner/cypress_runner.js:117075:18)
      at Async../node_modules/bluebird/js/release/async.js.Async._drainQueue (https://example.cypress.io/__cypress/runner/cypress_runner.js:113687:16)
      at Async../node_modules/bluebird/js/release/async.js.Async._drainQueues (https://example.cypress.io/__cypress/runner/cypress_runner.js:113697:10)
      at Async.drainQueues (https://example.cypress.io/__cypress/runner/cypress_runner.js:113571:14)
      at <anonymous>




  (Results)

  ┌─────────────────────────────────────────┐
  │ Tests:        5                         │
  │ Passing:      4                         │
  │ Failing:      1                         │
  │ Pending:      0                         │
  │ Skipped:      0                         │
  │ Screenshots:  1                         │
  │ Video:        true                      │
  │ Duration:     8 seconds                 │
  │ Spec Ran:     examples/querying.spec.js │
  └─────────────────────────────────────────┘


  (Screenshots)

  - /builds/gitlab-silver/ci-test/cypress/screenshots/examples/querying.spec.js/Querying -- best practices - selecting elements (failed).png (1280x720)


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/querying.spec.js.mp4 (4 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/spies_stubs_clocks.spec.js...                                        (14 of 19) 


  Spies, Stubs, and Clock

    ✓ cy.spy() - wrap a method in a spy (877ms)

    ✓ cy.spy() retries until assertions pass (2903ms)

    ✓ cy.stub() - create a stub and/or replace a function with stub (764ms)

    ✓ cy.clock() - control time in the browser (702ms)

    ✓ cy.tick() - move time in the browser (944ms)


  5 passing (7s)


  (Results)

  ┌───────────────────────────────────────────────────┐
  │ Tests:        5                                   │
  │ Passing:      5                                   │
  │ Failing:      0                                   │
  │ Pending:      0                                   │
  │ Skipped:      0                                   │
  │ Screenshots:  0                                   │
  │ Video:        true                                │
  │ Duration:     6 seconds                           │
  │ Spec Ran:     examples/spies_stubs_clocks.spec.js │
  └───────────────────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/spies_stubs_clocks.spec.js.mp4 (3 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/traversal.spec.js...                                                 (15 of 19) 


  Traversal

    ✓ .children() - get child DOM elements (1750ms)

    ✓ .closest() - get closest ancestor DOM element (965ms)

    ✓ .eq() - get a DOM element at a specific index (963ms)

    ✓ .filter() - get DOM elements that match the selector (786ms)

    ✓ .find() - get descendant DOM elements of the selector (1217ms)

    ✓ .first() - get first DOM element (496ms)

    ✓ .last() - get last DOM element (734ms)

    ✓ .next() - get next sibling DOM element (608ms)

    ✓ .nextAll() - get all next sibling DOM elements (680ms)

    ✓ .nextUntil() - get next sibling DOM elements until next el (580ms)

    ✓ .not() - remove DOM elements from set of DOM elements (551ms)

    ✓ .parent() - get parent DOM element from DOM elements (580ms)

    ✓ .parents() - get parent DOM elements from DOM elements (815ms)

    ✓ .parentsUntil() - get parent DOM elements from DOM elements until el (915ms)

    ✓ .prev() - get previous sibling DOM element (723ms)

    ✓ .prevAll() - get all previous sibling DOM elements (928ms)

    ✓ .prevUntil() - get all previous sibling DOM elements until el (775ms)

    ✓ .siblings() - get all sibling DOM elements (736ms)


  18 passing (16s)


  (Results)

  ┌──────────────────────────────────────────┐
  │ Tests:        18                         │
  │ Passing:      18                         │
  │ Failing:      0                          │
  │ Pending:      0                          │
  │ Skipped:      0                          │
  │ Screenshots:  0                          │
  │ Video:        true                       │
  │ Duration:     15 seconds                 │
  │ Spec Ran:     examples/traversal.spec.js │
  └──────────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/traversal.spec.js.mp4 (7 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/utilities.spec.js...                                                 (16 of 19) 


  Utilities

    ✓ Cypress._ - call a lodash method (1504ms)

    ✓ Cypress.$ - call a jQuery method (565ms)

    ✓ Cypress.Blob - blob utilities and base64 string conversion (1294ms)

    ✓ Cypress.minimatch - test out glob patterns against strings (945ms)

    ✓ Cypress.moment() - format or parse dates using a moment method (629ms)

    ✓ Cypress.Promise - instantiate a bluebird promise (1904ms)


  6 passing (7s)


  (Results)

  ┌──────────────────────────────────────────┐
  │ Tests:        6                          │
  │ Passing:      6                          │
  │ Failing:      0                          │
  │ Pending:      0                          │
  │ Skipped:      0                          │
  │ Screenshots:  0                          │
  │ Video:        true                       │
  │ Duration:     7 seconds                  │
  │ Spec Ran:     examples/utilities.spec.js │
  └──────────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/utilities.spec.js.mp4 (3 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/viewport.spec.js...                                                  (17 of 19) 


  Viewport

    ✓ cy.viewport() - set the viewport size and dimension (4384ms)


  1 passing (5s)


  (Results)

  ┌─────────────────────────────────────────┐
  │ Tests:        1                         │
  │ Passing:      1                         │
  │ Failing:      0                         │
  │ Pending:      0                         │
  │ Skipped:      0                         │
  │ Screenshots:  0                         │
  │ Video:        true                      │
  │ Duration:     4 seconds                 │
  │ Spec Ran:     examples/viewport.spec.js │
  └─────────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/viewport.spec.js.mp4 (2 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/waiting.spec.js...                                                   (18 of 19) 


  Waiting

    ✓ cy.wait() - wait for a specific amount of time (5556ms)

    ✓ cy.wait() - wait for a specific route (1421ms)


  2 passing (7s)


  (Results)

  ┌────────────────────────────────────────┐
  │ Tests:        2                        │
  │ Passing:      2                        │
  │ Failing:      0                        │
  │ Pending:      0                        │
  │ Skipped:      0                        │
  │ Screenshots:  0                        │
  │ Video:        true                     │
  │ Duration:     7 seconds                │
  │ Spec Ran:     examples/waiting.spec.js │
  └────────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/waiting.spec.js.mp4 (3 seconds)


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running: examples/window.spec.js...                                                    (19 of 19) 


  Window

    ✓ cy.window() - get the global window object (1114ms)

    ✓ cy.document() - get the document object (550ms)

    ✓ cy.title() - get the title (923ms)


  3 passing (3s)


  (Results)

  ┌───────────────────────────────────────┐
  │ Tests:        3                       │
  │ Passing:      3                       │
  │ Failing:      0                       │
  │ Pending:      0                       │
  │ Skipped:      0                       │
  │ Screenshots:  0                       │
  │ Video:        true                    │
  │ Duration:     2 seconds               │
  │ Spec Ran:     examples/window.spec.js │
  └───────────────────────────────────────┘


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/gitlab-silver/ci-test/cypress/videos/examples/window.spec.js.mp4 (2 seconds)


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

  (Run Finished)


      Spec                                                Tests  Passing  Failing  Pending  Skipped 
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✔ examples/actions.spec.js                  00:22       13       13        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/aliasing.spec.js                 00:02        2        2        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/assertions.spec.js               00:06        8        8        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/connectors.spec.js               00:05        7        7        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/cookies.spec.js                  00:05        5        5        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✖ examples/cypress_api.spec.js              00:11       13       12        1        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/files.spec.js                    00:04        4        4        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/local_storage.spec.js            00:01        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✖ examples/location.spec.js                 00:10        3        1        2        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/misc.spec.js                     00:09        6        6        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/navigation.spec.js               00:08        3        3        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/network_requests.spec.js         00:10        7        7        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✖ examples/querying.spec.js                 00:08        5        4        1        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/spies_stubs_clocks.spec.js       00:06        5        5        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/traversal.spec.js                00:15       18       18        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/utilities.spec.js                00:07        6        6        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/viewport.spec.js                 00:04        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/waiting.spec.js                  00:07        2        2        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ examples/window.spec.js                   00:02        3        3        -        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    3 of 19 failed (16%)                        02:31      112      108        4        -        -  

[?25hsection_end:1565265587:build_script
section_start:1565265587:after_script
section_end:1565265588:after_script
section_start:1565265588:upload_artifacts_on_failure
Uploading artifacts...
WARNING: cypress/screenshots/*.png: no matching files 
WARNING: cypress/screenshots/*/*.png: no matching files 
cypress/screenshots/*/*/*.png: found 5 matching files 
WARNING: cypress/screenshots/*/*/*/*.png: no matching files 
WARNING: cypress/screenshots/*/*/*/*/*.png: no matching files 
WARNING: cypress/videos/*.mp4: no matching files   
cypress/videos/*/*.mp4: found 19 matching files    
WARNING: cypress/videos/*/*/*.mp4: no matching files 
WARNING: cypress/videos/*/*/*/*.mp4: no matching files 
WARNING: cypress/videos/*/*/*/*/*.mp4: no matching files 
Uploading artifacts to coordinator... ok            id=268489392 responseStatus=201 Created token=923syvHg
section_end:1565265593:upload_artifacts_on_failure
ERROR: Job failed: exit code 1


Environment description

This happens using shared runners on GitLab.com running latest runner, and private runners on gitlab-runner 11.8.0.

Edited by DeAndre Harris