Cypress: Cypress is stopped and json error is displayed on console

Created on 22 May 2018  路  21Comments  路  Source: cypress-io/cypress

Test execution is stopped.

Current behavior:

Below error is displayed on command prompt.

{ Error: unexpected end of file
    at Gunzip.zlibOnError (zlib.js:152:15)
 errno: -5, code: 'Z_BUF_ERROR' }
Error: unexpected end of file
    at Gunzip.zlibOnError (zlib.js:152:15)

cypress log:
image

Desired behavior:

Test should work.

Steps to reproduce:

Testing internal application

Versions

Latest

pkhttps-proxy bug

Most helpful comment

I have discovered the root underlying cause of this and am working on a fix.

All 21 comments

Please provide more information, i.e.

  • What OS are you on?
  • What browser are you using and/or how are you running Cypress?
  • Where are you running Cypress? i.e. locally, CI, etc.
  • At what point in your test run does Cypress stop? Is it the same always?
  • Is this behavior consistent across Electron/Chrome browsers?

Please answer _at least_ these questions but understand to investigate this, a reproducible example is almost always necessary.

This looks like a zlib error, but we have no way of accessing if this is related to Cypress.

@ValerieThoma

What OS are you on?
Windows 7
What browser are you using and/or how are you running Cypress?
Chrome latest
Where are you running Cypress? i.e. locally, CI, etc.
Locally
At what point in your test run does Cypress stop? Is it the same always?
Random
Is this behavior consistent across Electron/Chrome browsers?
Yes

Try below steps:

cy.visit('http://front-t-u3.sandbox.local/df')
      cy.get('input.search-input').first()
      .type('hotels')
      cy.get('span.si.si-search').first()
      .click()
      cy.get('a.thematic__wrapper-link').first()
      .click()
      cy.get('span.add-to-cart__content').first()
      .click()
      cy.get('a.button.primary.no-margin-bottom')
      .click()
      cy.get('span.basket-count').should('contain','1')
      cy.get('span.si.si-cart').last()
      .click()
      cy.get('input#checkout-email-address')
      .type('[email protected]')
      cy.get('input#shipping_lastname')
      .type('lname')
      cy.get('input#shipping_firstname')
      .type('fname')
      cy.get('input#shipping_street_1')
      .type('stret1')
      cy.get('input#shipping_street_2')
      .type('stret2')
      cy.get('input#shipping_postcode')
      .type('12345')
      cy.get('input#shipping_city')
      .type('paris')
      cy.get('input#shipping_telephone')
      .type('1234567890')
      cy.get('button#to-payment.button.primary.large-5.medium-5.small-12.no-margin')
      .click()

Thank you for sharing a few more details.
I cannot reproduce because I cannot make this cy.visit(), but are you offering that this is the test that gives you the above error?

@ValerieThoma try with cy.visit('http://www.smartbox.com/fr/'). Run above test twice in same window,

Okay, I ran this test (4 times) in Chrome 66 before Cypress stopped.
The first three times resulted in Cypress timing out with this message:
screen shot 2018-05-22 at 12 04 39 pm

I ran this test in Electron, and Cypress timed out waiting for the same element.
This time with a console error too:

screen shot 2018-05-22 at 12 36 09 pm

This is configurable here


It's likely your