-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dest.end error crash during run exit on GitLab CI / Windows #2181
Comments
Not working in v3.0.3 either |
I have exactly the same issue! I really would like a fix and start using this in my CI nightly build. |
Same issue here with buddy.works and my local machine (Mac). |
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. |
I have the same issue.
|
We have the same issue too.
this is blocking for us. anyone managed to workaround this issue? |
any news or eta on this issue? |
We have an example of the If someone can give a reproducible example - or isolate exactly what is different from their run and example - that will help us track down where the exit status is coming from. Also, you can get more in depth run logs by setting DEBUG in the command line. |
I have upgraded both my gitlab to version v11.4.2 and the cypress to version v3.1.2 and I am still getting the error. The project is quite simple:
describe('Home Page Quick Lookup', function () {
before(function() {
cy.visit('')
})
beforeEach(function () {
// Cypress normally clears out cookies between each test. This line keeps dnn's anti-forgery
// validation token so that calls to the api still work between tests
Cypress.Cookies.preserveOnce('__RequestVerificationToken')
})
it('Checks the elements are on the page', function () {
cy.get('[data-test=quick-lookup-base]').should('exist')
})
})
I have attached the log file (~1030 lines). cypress-gitlab-ci--v312.log. However, I have replaced some of the content (urls, username, external apis) due to some contract limitations/liabilities. However, the lines 66 and 1017 from the debug are the same: |
Hello there. Any update on this issue? |
Same thing here for 3.1.4. Behavior is reproduced on windows 10, but not mac. |
The failure is being thrown from the Our 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 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 should note that this issue happens on my local machine. We are using TFS and not GitLab for our CI, but it's windows either way. Messing around my setup some more, it turns out that we were using a grunt-exec task to execute our integration tests. When running cypress directly, we do not see this behavior. Switching this task out with grunt-shell is a successful workaround for us. |
i have same trouble. |
Same here |
Same with me. Been waiting for this to be fixed. |
Same problem here... Fix please! |
Hello Jeniffer, I need you |
Any update on this issue? I have the same issue too! |
This issue seems to be related: #3863
Can y'all confirm if you are using precommit hooks? This also explains some possible fixes: typicode/husky#459 (comment) |
I don't use |
@jennifer-shehane I tried what you suggested above, but with no result. Even using Node 8.16, the error happens. |
@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. |
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.
|
Might be related to d154739 |
Hi, any update/fix on this issue? "husky": {
"version": "2.7.0",
}
"cypress": {
"version": "3.4.1",
}
Facing the same exact issue. |
There is a pull request that fixes this issue but it hasn't been merged and released yet. You can also apply a patch yourself following https://docs.cypress.io/guides/guides/debugging.html#Patch-Cypress |
Awesome. Thank you so much! 😃 |
was this fixed yet in an official release? |
Any update on this issue? I have the same issue too! |
@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. |
Wow this is a great catch, that’s why I love beta testing fixes before releases, nothing like noticing thing like this
…Sent from my iPhone
On Sep 17, 2019, at 07:55, jelsav ***@***.***> wrote:
@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 Job below:
Is there a way to avoid duplicate log entries?
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yup, I have used the patch and I can confirm this side-effect. @nweiser1 @AliceShi789654 Try using the patch. It's not hard to do 🙂 |
@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 diff --git a/node_modules/cypress/lib/exec/spawn.js b/node_modules/cypress/lib/exec/spawn.js
index ed13727..7748f19 100644
--- a/node_modules/cypress/lib/exec/spawn.js
+++ b/node_modules/cypress/lib/exec/spawn.js
@@ -138,8 +138,15 @@ module.exports = {
child.on('close', resolve);
child.on('error', reject);
- child.stdin && child.stdin.pipe(process.stdin);
- child.stdout && child.stdout.pipe(process.stdout);
+ if (child.stdin) {
+ debug('piping process STDIN into child STDIN')
+ process.stdin.pipe(child.stdin)
+ }
+
+ if (child.stdout) {
+ debug('piping child STDOUT to process STDOUT')
+ child.stdout.pipe(process.stdout)
+ }
// if this is defined then we are manually piping for linux
// to filter out the garbage |
The code for this is done in cypress-io/cypress#5045, but has yet to be released. |
A few days ago, we applied a patch that we downloaded from here: https://github.com/CodingGardenCommunity/app-frontend/blob/08dbf63b59631faef0a9945cf8b20b40b138f2fc/patches/cypress%2B3.4.1.patch It fixed dest.end error but we found a new issue with duplicated log entries. Today, we applied a patch file you provided in your last comment. We no longer have problems with dest.end error or duplicated log entries. Cypress version: 3.4.1 Thank you very much! |
Released in |
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:
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
[path-to-root-of-solution]/cypress/integration/HomePage/Home_Page_Quick_Lookup.js
[path-to-root-of-solution]/gitlab-ci.yml
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
The text was updated successfully, but these errors were encountered: