cypress: dest.end error crash during run exit on GitLab CI / Windows
Cypress >=v3.0.0 on GitLabCI
Current behavior:
Any version >= v3.0.0 of the Cypress is failing to run on the GitLab’s CI. The following error is being thrown exactly before cypress is exiting:
====================================================================================================
(Run Finished)
Spec Tests Passing Failing Pending Skipped
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ✔ HomePage\Home_Page_Quick_Lookup.js 00:05 1 1 - - - │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
All specs passed! 00:05 1 1 - - -
cypress:server:cypress about to exit with code 0 +159ms
_stream_readable.js:595
dest.end();
^
TypeError: dest.end is not a function
at Socket.onend (_stream_readable.js:595:10)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1055:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
ERROR: Job failed: exit status 1
Desired behavior:
We expect the cypress to return the (All Done) message as Cypress v2.1.0 does with no error.
Steps to reproduce:
I have an issue with running cypress on the GitLab’s CI provider. I want to confirm whether this is a configuration issue, an incompatibility issue or a cypress bug.
I have installed cypress using the yarn command yarn add cypress. This will install me the latest version of cypress, namely v3.0.2.
[path-to-root-of-solution]/cypress.json
{
"projectId": "……",
"baseUrl": "…. "
}
[path-to-root-of-solution]/cypress/integration/HomePage/Home_Page_Quick_Lookup.js
describe('Home Page Test - Find Button', function () {
before(function() {
// navigate to home page (baseUrl)
cy.visit('')
})
it('Check the button is on the page', function () {
cy.get('[data-test=button-test-base]').should('exist')
})
})
[path-to-root-of-solution]/gitlab-ci.yml
# … set path…
stages:
- test
run_test_suite:
stage: test
script:
- call yarn add cypress
- npx cypress run
# .. end of file …
When I start the cypress using the command npx cypress run
Versions
• Windows Server 2012 R2 • Node: 8.9.4 • npm: 5.6.0 • Gitlab CI Runner: 9.5.0
Comments
I have searched to see if there are other who experienced this issue, but it seems that no one have. (or at least they didn’t bother in reporting the issue and/or sharing their solution).
The https://github.com/cypress-io/cypress/issues/1841 is the only issue that is a bit relevant to this problem in the sense that the pipeline fails when cypress is about to exit.
We have tried to use other versions of cypress:
► v3.0.2, v3.0.1, v3.0.0 – the above error is being generated
► v2.1.0 – no error is being generated
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 7
- Comments: 38 (10 by maintainers)
Hello Jeniffer, I need you
i have same trouble.
I don’t use
Same here
Same with me. Been waiting for this to be fixed.
@jennifer-shehane I tried what you suggested above, but with no result. Even using Node 8.16, the error happens.
This issue seems to be related: https://github.com/cypress-io/cypress/issues/3863
Can y’all confirm if you are using precommit hooks?
This also explains some possible fixes: https://github.com/typicode/husky/issues/459#issuecomment-485568858
I found a workaround to the problem, using “git bash” as the default “shell” for Git Lab Runner.
1. Change windows registry “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\gitlab-runner” so it looks like this:
2. Set the “builds_dir” path in the runner configuration file, config.toml, using default bash syntax. Example:
3. Also in the config.toml file, set bash (git bash) as the default shell.
any news or eta on this issue?
Any update on this issue? I have the same issue too!
Same problem here… Fix please!
The failure is being thrown from the
readable-streampackage on this line of code. This is included in core Node asstreamOur Node version:
Your original comment seems to indicate this was introduced in version 3.0.0 of Cypress which was released on May 29, 2018.
This file had commits made to it May 21, 2018 - it is one of 3 files that require Node
stream.I suspect that this error was introduced in the commit above and only happens on Windows in GitLab.
I’ve seen some open issues concerning TTY in GitLab? That’s a wild guess that it’s related though.
I have the same problem, runs fine from terminal on my laptop running Ubuntu but exits with that error while running from command prompt on a Windows Server 2016 Jenkins node.
Same issue here with buddy.works and my local machine (Mac).
@jelsav did you apply the patch correctly - you need to remove existing pipe lines. I have tried the patch in https://circleci.com/gh/cypress-io/cypress-test-tiny/4442 and everything looks ok
here is my patch file
patches/cypress+3.4.1.patch@bahmutov Thanks for the patch! After applying it, we didn’t encounter dest.end error while running Cypress E2E tests on GitLab’s CI / Windows.
From the other side, after applying a patch, we faced with a new problem with duplicate log entries on test execution. Please see the screenshot of a Job below:
Is there a way to avoid duplicate log entries?
Thanks.
@PCStefan Did you find any solution to the problem? I’ve tried other versions of Node ^ 8.0.0 and Cypress ^ 3.0.0, but it does not work, only Cypress version 2.1.0 works correctly with git runner in Windows.
Hello there. Any update on this issue?
We have the same issue too.
this is blocking for us. anyone managed to workaround this issue?
I have the same issue.
I have exactly the same issue! I really would like a fix and start using this in my CI nightly build.
Not working in v3.0.3 either