cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
47.01k stars 3.18k forks source link

Cypress 4.12.1 + cypress/included:4.12.1, fails to parse arguments #8211

Closed wdolek closed 4 years ago

wdolek commented 4 years ago

Current behavior:

Using:

  "devDependencies": {
    "@cypress/skip-test": "^2.5.0",
    "chrome-remote-interface": "^0.28.2",
    "cypress": "^4.12.1",
    "cypress-commands": "^1.1.0",
    "cypress-intellij-reporter": "0.0.4",
    "cypress-terminal-report": "^1.4.1",
    "typescript": "^3.9.2",
    ...
  },

with docker image:

running:

error output (with DEBUG):

  cypress:server:cypress could not parse CLI arguments: [ '/root/.cache/Cypress/4.12.1/Cypress/Cypress', '--no-sandbox', '--run-project', '/', '--config', 'if [ -x /usr/local/bin/bash ]; then\n' + '\texec /usr/local/bin/bash \n' + 'elif [ -x /usr/bin/bash ]; then\n' + '\texec /usr/bin/bash \n' + 'elif [ -x /bin/bash ]; then\n' + '\texec /bin/bash \n' + 'elif [ -x /usr/local/bin/sh ]; then\n' + '\texec /usr/local/bin/sh \n' + 'elif [ -x /usr/bin/sh ]; then\n' + '\texec /usr/bin/sh \n' + 'elif [ -x /bin/sh ]; then\n' + '\texec /bin/sh \n' + 'elif [ -x /busybox/sh ]; then\n' + '\texec /busybox/sh \n' + 'else\n' + '\techo shell not found\n' + '\texit 1\n' + 'fi\n' + '\n', '--cwd', '/' ] +16ms
  cypress:server:cypress exiting with err Error: Cypress encountered an error while parsing the argument config
You passed: if [ -x /usr/local/bin/bash ]; then
    exec /usr/local/bin/bash 
elif [ -x /usr/bin/bash ]; then
    exec /usr/bin/bash 
elif [ -x /bin/bash ]; then
    exec /bin/bash 
elif [ -x /usr/local/bin/sh ]; then
    exec /usr/local/bin/sh 
elif [ -x /usr/bin/sh ]; then
    exec /usr/bin/sh 
elif [ -x /bin/sh ]; then
    exec /bin/sh 
elif [ -x /busybox/sh ]; then
    exec /busybox/sh 
else
    echo shell not found
    exit 1
fi
The error was: Cannot read property 'split' of undefined
    at get (/root/.cache/Cypress/4.12.1/Cypress/resources/app/packages/server/lib/errors.js:946:15)
    at Object.throwErr [as throw] (/root/.cache/Cypress/4.12.1/Cypress/resources/app/packages/server/lib/errors.js:964:9)
    at sanitizeAndConvertNestedArgs (/root/.cache/Cypress/4.12.1/Cypress/resources/app/packages/server/lib/util/args.js:157:24)
    at Object.toObject (/root/.cache/Cypress/4.12.1/Cypress/resources/app/packages/server/lib/util/args.js:273:24)
    at Object.start (/root/.cache/Cypress/4.12.1/Cypress/resources/app/packages/server/lib/cypress.js:117:27)
    at launchOrFork (/root/.cache/Cypress/4.12.1/Cypress/resources/app/packages/server/index.js:49:45)
    at Object.<anonymous> (/root/.cache/Cypress/4.12.1/Cypress/resources/app/packages/server/index.js:52:1)
    at Module._compile (internal/modules/cjs/loader.js:968:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:986:10)
    at Module.load (internal/modules/cjs/loader.js:816:32)
    at Module._load (internal/modules/cjs/loader.js:728:14)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Module.require (internal/modules/cjs/loader.js:853:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/root/.cache/Cypress/4.12.1/Cypress/resources/app/index.js:2:1)
    at Module._compile (internal/modules/cjs/loader.js:968:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:986:10)
    at Module.load (internal/modules/cjs/loader.js:816:32)
    at Module._load (internal/modules/cjs/loader.js:728:14)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Object.<anonymous> (electron/js2c/browser_init.js:5842:12)
    at Object../lib/browser/init.ts (electron/js2c/browser_init.js:5849:30)
    at __webpack_require__ (electron/js2c/browser_init.js:20:30)
    at electron/js2c/browser_init.js:84:18
    at electron/js2c/browser_init.js:87:10
    at NativeModule.compile (internal/bootstrap/loaders.js:287:5)
    at NativeModule.compileForPublicLoader (internal/bootstrap/loaders.js:222:8)
    at loadNativeModule (internal/modules/cjs/helpers.js:23:9)
    at Module._load (internal/modules/cjs/loader.js:699:15)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1038:10)
    at internal/main/run_main_module.js:17:11 {
  isCypressErr: true,
  type: 'COULD_NOT_PARSE_ARGUMENTS',
  details: undefined
} +1ms

Desired behavior:

Cypress to start.

Versions

wdolek commented 4 years ago

Should have looked into GitLab examples - apparently I need to override entrypoint! Closing this issue.