-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cypress v3.3.0 crashes with ENOSPC in AWS CodeBuild #4283
Comments
Same here, thought that disabling |
There was this change made in 3.3.0 related to file watching: #4038 Can you provide any information that is different from a standard kitchen-sink run? What's in your cypress.json? Any unique directory setup? Plugins setup? |
Also happens on Jenkins with an Ubuntu build environment. Standard setup, nothing out of the ordinary. Reverting to 3.2.0 fixed it. |
Hmm, |
We checked disk space and inodes, they were fine. I think |
From my trials, If you're getting this on your local (linux) machine, you could try increasing your max inodes |
Cypress.json is {
"viewportWidth": 1300,
"defaultCommandTimeout": 20000,
"blacklistHosts": [
"*.google-analytics.com",
"*.googletagmanager.com",
"*.hotjar.com"
],
"baseUrl": "http://127.0.0.1:3000",
"video": false,
"numTestsKeptInMemory": 0
} And plugins index.js is: const webpack = require('@cypress/webpack-preprocessor');
const getEnv = require('../../env/parse');
module.exports = (on, config) => {
const options = {
webpackOptions: {
resolve: {extensions: ['.ts', '.tsx', '.js']},
module: {rules: [{test: /\.tsx?$/, loader: 'babel-loader'}]},
watch: false,
},
watchOptions: {},
};
on('file:preprocessor', webpack(options));
on('before:browser:launch', (browser = {}, args) => {
if (browser.name === 'chrome') {
args.push('--proxy-bypass-list=<-loopback>');
return args;
}
});
const {CYPRESS_APP_ENV = 'local', CYPRESS_POST_DEPLOY} = process.env;
const env = getEnv(CYPRESS_APP_ENV);
if (CYPRESS_POST_DEPLOY) {
config.baseUrl = env.PORTAL_URL;
if (CYPRESS_APP_ENV === 'prod') {
config.testFiles = '{language,login}/**';
}
}
config.env = env;
return config;
}; |
This is happening because the max number of files being watched are bigger than I discovered something here though... we are using So I changed the It wasn't a matter of enough disk space. I think that using |
Yeah... the change #4038 made It would be nice to have a way to make it use polling by passing a param so we can circumvent this |
Okay, will this be fixed? Passing a param to disable watching files in CI would be enough I think. |
I'm glad I found this issue, thanks @luneo7. Having the same problem with Gitlab CI/CD and cypress 3.3.1. Thus, I'm gonna keep 3.2.0 for a little longer 😄 ! |
I think the best solution here is to not register the file watchers when using |
Does anyone in this thread use any Cypress plugins or have EDIT: I was able to repro the issue in the OP by doing I think this should fix it from Cypress's end, all file watching is disabled with this PR. Users might still run in to this issue if they have other programs like webpack watching files, or if they manually watch files in their plugins file, but there's not much we can do about that. |
The code for this is done in cypress-io/cypress#4458, but has yet to be released. |
FYI, in my case, I found this issue on GitLab CI/CD using |
Released in |
Fo those who are struggling with this issue on AWS Codebuild, enabling privileged mode on the build allows to modify sysctl parameters, including
|
I have met this issue on Ubuntu 18.04. This solved the issue: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p |
I'm facing this issue. I'm using version |
I'm also facing the issue on version |
Current behavior:
Desired behavior:
Cypress should run normally.
With version 3.2.0 same configuration this does not happens
Steps to reproduce: (app code and test code)
Use AWS Codebuild with NodeJS image, install Cypress 3.3.0 in it and try to run tests, it will fail
Versions
AWS Codebuild, Node 10.15.1, Yarn 1.13.0, Cypress 3.3.0
The text was updated successfully, but these errors were encountered: