cypress icon indicating copy to clipboard operation
cypress copied to clipboard

Cypress cant find Browser

Open zokkis opened this issue 2 years ago • 6 comments

Current behavior

I tried to use Cypress in a Jenkins-pipeline

Currently there is a Agent running in an dedecated Win-PC with the user for the Jenkins-job

If I run Cypress over remote-desktop there is no problem, but if I try to run the same command with a jenkins-pipeline then Cypress cant find any browser.

Cypress info from jenkins-pipeline:

C:\...\path>npx cypress info 


Proxy Settings: none detected
Environment Variables: none detected

Application Data: C:\Users\sebuild\AppData\Roaming\cypress\cy\development
Browser Profiles: C:\Users\sebuild\AppData\Roaming\cypress\cy\development\browsers
Binary Caches: C:\Users\sebuild\AppData\Local\Cypress\Cache

Cypress Version: 12.8.1 (stable)
System Platform: win32 (10.0.19043)
System Memory: 34.1 GB free 26.6 GB

Cypress info from remote-cmd:

C:\...\path>npx cypress info 

Displaying Cypress info...

Detected 3 browsers installed:

1. Chrome
  - Name: chrome
  - Channel: stable
  - Version: 114.0.5735.90
  - Executable: C:\Program Files\Google\Chrome\Application\chrome.exe

2. Edge
  - Name: edge
  - Channel: stable
  - Version: 114.0.1823.37
  - Executable: C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe

3. Firefox
  - Name: firefox
  - Channel: stable
  - Version: 113.0.2
  - Executable: C:\Program Files\Mozilla Firefox\firefox.exe
  - Profile: C:\Users\sebuild\AppData\Roaming\Cypress\cy\production\browsers\firefox-stable

Note: to run these browsers, pass <name>:<channel> to the '--browser' field

Examples:
- cypress run --browser edge
- cypress run --browser firefox

Learn More: https://on.cypress.io/launching-browsers

Proxy Settings: none detected
Environment Variables: none detected

Application Data: C:\Users\sebuild\AppData\Roaming\cypress\cy\development
Browser Profiles: C:\Users\sebuild\AppData\Roaming\cypress\cy\development\browsers
Binary Caches: C:\Users\sebuild\AppData\Local\Cypress\Cache

Cypress Version: 12.8.1 (stable)
System Platform: win32 (10.0.19043)
System Memory: 34.1 GB free 26.8 GB

Desired behavior

No response

Test code to reproduce

Cypress is not starting, so no code is required?

Cypress Version

12.8.1 Also testet on v12.13.0, and same result

Node version

16.18.0

Operating System

Windows 10.0.19044.2965

Debug Logs

There are no logs when I try to run cypress with this command: 
"C:\...\path>npx cypress run --browser firefox --spec ./path/to/test.spec.ts --env="IMPORTANT_ENVS=set""

Other

Also tested with default cypress.config.ts, same result

zokkis avatar Jun 05 '23 13:06 zokkis

Hi @gitZokki , sorry to hear you're having trouble. From the logging I suspect there's an error (perhaps permissions-related) that's not getting logged correctly. If Cypress fails to detect any browsers it should print a line like Detected no known browsers installed, but that doesn't seem to be happening. Can you enable Debug Logs which should give us more insight into what (if any) error is occurring on Jenkins?

mike-plummer avatar Jun 22 '23 18:06 mike-plummer

Unfortunately we have to close this issue due to inactivity. Please comment if there is new information to provide concerning the original issue and we can reopen.

mike-plummer avatar Jun 29 '23 14:06 mike-plummer

Sorry, but I didnt had time to answer Hopefully its possible to reopen this issue

The Output is this:

powershell.exe : 2023-07-11T09:28:02.854Z cypress:cli:cli cli starts with arguments ["C:\\Program Files\\nodejs\\node.exe","C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e 
tests\\node_modules\\cypress\\bin\\cypress","info"]
In C:\home\sebuild\jenkins\workspace\cypress e2e tests@tmp\durable-d48f64da\powershellWrapper.ps1:3 Zeichen:1
+ & powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Comm ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (2023-07-11T09:2...ypress","info"]:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
2023-07-11T09:28:02.855Z cypress:cli NODE_OPTIONS is not set
2023-07-11T09:28:02.855Z cypress:cli:cli program parsing arguments
2023-07-11T09:28:03.051Z cypress:cli needs to start own Xvfb? false
2023-07-11T09:28:03.051Z cypress:cli spawning, should retry on display problem? false
2023-07-11T09:28:03.060Z cypress:cli spawn args [ '--', '--mode=info', '--cwd', 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', '--userNodePath', 'C:\\Program 
Files\\nodejs\\node.exe', '--userNodeVersion', '16.18.0' ] { detached: false, stdio: 'pipe', windowsHide: false }
2023-07-11T09:28:03.060Z cypress:cli spawning Cypress with executable: C:\Users\sebuild\AppData\Local\Cypress\Cache\12.8.1\Cypress\Cypress.exe
2023-07-11T09:28:03.086Z cypress:cli piping process STDIN into child STDIN
2023-07-11T09:28:03.087Z cypress:cli piping child STDOUT to process STDOUT
2023-07-11T09:28:03.087Z cypress:cli piping child STDERR to process STDERR

2023-07-11T09:28:03.377Z cypress:snapshot:info Caching 3497, defining 4415 modules! Using cache
2023-07-11T09:28:03.379Z cypress:snapshot:debug initializing packherd require
2023-07-11T09:28:03.688Z cypress:server:appdata path: C:\Users\sebuild\AppData\Roaming\Cypress\cy\production\browsers
2023-07-11T09:28:03.693Z cypress:server:cypress starting cypress with argv [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe', '--', '--mode=info', '--cwd', 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', '--userNodePath', 'C:\\Program Files\\nodejs\\node.exe', '--userNodeVersion', '16.18.0' ]
2023-07-11T09:28:03.693Z cypress:server:args argv array: [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe', '--mode=info', '--cwd', 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', '--userNodePath', 'C:\\Program Files\\nodejs\\node.exe', '--userNodeVersion', '16.18.0' ]
2023-07-11T09:28:03.695Z cypress:server:args parsed argv options { options: { _: [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe' ], mode: 'info', cwd: 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: '16.18.0' } }
2023-07-11T09:28:03.699Z cypress:server:args argv parsed: { _: [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe' ], mode: 'info', cwd: 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: '16.18.0', invokedFromCli: true }
2023-07-11T09:28:03.699Z cypress:server:util:proxy found proxy environment variables { npm_config_noproxy: '' }
2023-07-11T09:28:03.707Z cypress:server:util:proxy HTTP_PROXY is falsy, disabling HTTP_PROXY
2023-07-11T09:28:03.707Z cypress:server:util:proxy setting default NO_PROXY of ``
2023-07-11T09:28:03.707Z cypress:server:util:proxy <-loopback> not found, adding localhost to NO_PROXY
2023-07-11T09:28:03.707Z cypress:server:util:proxy normalized proxy environment variables { NO_PROXY: '127.0.0.1,::1,localhost' }
2023-07-11T09:28:03.709Z cypress:server:args options { _: [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe' ], mode: 'info', cwd: 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: '16.18.0', invokedFromCli: true, config: {} }
2023-07-11T09:28:03.710Z cypress:server:args argv options: { _: [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe' ], mode: 'info', cwd: 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: '16.18.0', invokedFromCli: true, config: {} }
2023-07-11T09:28:03.710Z cypress:server:cypress from argv [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe', '--mode=info', '--cwd', 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', '--userNodePath', 'C:\\Program Files\\nodejs\\node.exe', '--userNodeVersion', '16.18.0' ] got options { _: [ 
'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe' ], mode: 'info', cwd: 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', userNodePath: 'C:\\Program 
Files\\nodejs\\node.exe', userNodeVersion: '16.18.0', invokedFromCli: true, config: {} }
2023-07-11T09:28:03.751Z cypress:cli child event fired { event: 'exit', code: 2147483651, signal: null }
2023-07-11T09:28:03.751Z cypress:cli child event fired { event: 'close', code: 2147483651, signal: null }

Proxy Settings: none detected
Environment Variables: none detected

Application Data: C:\Users\sebuild\AppData\Roaming\cypress\cy\development
Browser Profiles: C:\Users\sebuild\AppData\Roaming\cypress\cy\development\browsers
Binary Caches: C:\Users\sebuild\AppData\Local\Cypress\Cache

Cypress Version: 12.8.1 (stable)
System Platform: win32 (10.0.19043)
System Memory: 34.1 GB free 15.8 GB

zokkis avatar Jul 11 '23 09:07 zokkis

I get this when I do yarn cypress info:

$ yarn cypress info                                             (git)-[master]-
yarn run v1.22.19
$ /Users/lachlanmiller/code/dump/cypress-test-tiny/node_modules/.bin/cypress info
Displaying Cypress info...

Detected 2 browsers installed:

1. Chrome
  - Name: chrome
  - Channel: stable
  - Version: 114.0.5735.198
  - Executable: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
  - Profile: /Users/lachlanmiller/Library/Application Support/Cypress/cy/production/browsers/chrome-stable

2. Firefox
  - Name: firefox
  - Channel: stable
  - Version: 109.0.1
  - Executable: /Applications/Firefox.app/Contents/MacOS/firefox
  - Profile: /Users/lachlanmiller/Library/Application Support/Cypress/cy/production/browsers/firefox-stable

Note: to run these browsers, pass <name>:<channel> to the '--browser' field

Examples:
- cypress run --browser firefox
- cypress run --browser chrome

Learn More: https://on.cypress.io/launching-browsers

Proxy Settings: none detected
Environment Variables: none detected

Application Data: /Users/lachlanmiller/Library/Application Support/cypress/cy/development
Browser Profiles: /Users/lachlanmiller/Library/Application Support/cypress/cy/development/browsers
Binary Caches: /Users/lachlanmiller/Library/Caches/Cypress

Cypress Version: 12.8.0 (stable)
System Platform: darwin (22.2.0)
System Memory: 17.2 GB free 2.67 GB
✨  Done in 1.08s.
$

I do not see Detected 2 browsers installed in your output. Where are the browsers installed? Here is where we look on windows: https://github.com/cypress-io/cypress/blob/develop/packages/launcher/lib/windows/index.ts.

lmiller1990 avatar Jul 12 '23 00:07 lmiller1990

@lmiller1990 I suspect there's a silent error getting thrown and swallowed here during browser detection/output (somewhere in packages/server/lib/modes/info.js) - if no browsers are found we should print "Detected no known browsers installed" but that isn't showing up in the logging output. However, we proceed on and output proxy & env data which tells me we have a missing .catch somewhere. I started trying to chase this down last week but got turned around with the interaction between info mode in packages/server and /cli. There's some error-handling in place at the top-level which should catch pretty much everything but there must be a loophole somewhere

mike-plummer avatar Jul 12 '23 17:07 mike-plummer

Could be a permissions issue. @gitZokki What if you do npx cypress run --browser /path/to/the/browser - does it work? I can do npx cypress run --browser /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome on my machine. If it's a permissions error, this might give us some info.

lmiller1990 avatar Jul 12 '23 23:07 lmiller1990

@lmiller1990

powershell.exe : 2023-07-17T08:54:25.845Z cypress:cli:cli cli starts with arguments ["C:\\Program Files\\nodejs\\node.exe","C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e 
tests\\node_modules\\cypress\\bin\\cypress","run","--browser","C:\\Program Files\\Mozilla 
Firefox\\firefox.exe","--spec","./cypress/e2e/bsd/alarmType/tests.spec.ts","--env=CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false"]
In C:\home\sebuild\jenkins\workspace\cypress e2e tests@tmp\durable-ff2285bf\powershellWrapper.ps1:3 Zeichen:1
+ & powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Comm ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (2023-07-17T08:5...,COLORS=false"]:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
2023-07-17T08:54:25.846Z cypress:cli NODE_OPTIONS is not set
2023-07-17T08:54:25.846Z cypress:cli:cli program parsing arguments
2023-07-17T08:54:25.850Z cypress:cli:cli running Cypress with args [ Command { _events: [Object: null prototype] { 'option:auto-cancel-after-failures': [Function (anonymous)], 
'option:browser': [Function (anonymous)], 'option:ci-build-id': [Function (anonymous)], 'option:component': [Function (anonymous)], 'option:config': [Function (anonymous)], 
'option:config-file': [Function (anonymous)], 'option:e2e': [Function (anonymous)], 'option:env': [Function (anonymous)], 'option:group': [Function (anonymous)], 'option:key': [Function 
(anonymous)], 'option:headed': [Function (anonymous)], 'option:headless': [Function (anonymous)], 'option:no-exit': [Function (anonymous)], 'option:parallel': [Function (anonymous)], 
'option:port': [Function (anonymous)], 'option:project': [Function (anonymous)], 'option:quiet': [Function (anonymous)], 'option:record': [Function (anonymous)], 'option:reporter': [Function 
(anonymous)], 'option:reporter-options': [Function (anonymous)], 'option:spec': [Function (anonymous)], 'option:tag': [Function (anonymous)], 'option:dev': [Function (anonymous)] }, 
_eventsCount: 23, _maxListeners: undefined, commands: [], options: [ [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], 
[Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option] ], parent: Command { _events: [Object: null prototype], _eventsCount: 1, 
_maxListeners: undefined, commands: [Array], options: [Array], parent: null, _allowUnknownOption: false, _args: [], rawArgs: [Array], _scriptPath: 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests\\node_modules\\cypress\\bin\\cypress', _name: 'cypress', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: 
true, _actionResults: [], _actionHandler: null, _executableHandler: false, _executableFile: null, _defaultCommandName: null, _exitCallback: null, _aliases: [], _hidden: false, _helpFlags: 
'-h, --help', _helpDescription: 'display help for command', _helpShortFlag: '-h', _helpLongFlag: '--help', _hasImplicitHelpCommand: undefined, _helpCommandName: 'help', 
_helpCommandnameAndArgs: 'help [command]', _helpCommandDescription: 'display help for command', _usage: '<command> [options]', args: [Array], [Symbol(kCapture)]: false }, _allowUnknownOption: 
false, _args: [], rawArgs: null, _scriptPath: null, _name: 'run', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _actionHandler: 
[Function: listener], _executableHandler: false, _executableFile: null, _defaultCommandName: null, _exitCallback: null, _aliases: [], _hidden: false, _helpFlags: '-h, --help', 
_helpDescription: 'display help for command', _helpShortFlag: '-h', _helpLongFlag: '--help', _hasImplicitHelpCommand: 0, _helpCommandName: 'help', _helpCommandnameAndArgs: 'help [command]', 
_helpCommandDescription: 'display help for command', _usage: '[options]', _description: 'Runs Cypress tests from the CLI without the GUI', _argsDescription: undefined, exit: true, browser: 
'C:\\Program Files\\Mozilla Firefox\\firefox.exe', spec: './cypress/e2e/bsd/alarmType/tests.spec.ts', env: 'CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false', args: [], [Symbol(kCapture)]: 
false } ]
2023-07-17T08:54:26.074Z cypress:cli:cli variable-length opts parsed { args: [ 'C:\\Program Files\\nodejs\\node.exe', 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e 
tests\\node_modules\\cypress\\bin\\cypress', 'run', '--browser', 'C:\\Program Files\\Mozilla Firefox\\firefox.exe', '--spec', './cypress/e2e/bsd/alarmType/tests.spec.ts', 
'--env=CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false' ], opts: Command { _events: [Object: null prototype] { 'option:auto-cancel-after-failures': [Function (anonymous)], 
'option:browser': [Function (anonymous)], 'option:ci-build-id': [Function (anonymous)], 'option:component': [Function (anonymous)], 'option:config': [Function (anonymous)], 
'option:config-file': [Function (anonymous)], 'option:e2e': [Function (anonymous)], 'option:env': [Function (anonymous)], 'option:group': [Function (anonymous)], 'option:key': [Function 
(anonymous)], 'option:headed': [Function (anonymous)], 'option:headless': [Function (anonymous)], 'option:no-exit': [Function (anonymous)], 'option:parallel': [Function (anonymous)], 
'option:port': [Function (anonymous)], 'option:project': [Function (anonymous)], 'option:quiet': [Function (anonymous)], 'option:record': [Function (anonymous)], 'option:reporter': [Function 
(anonymous)], 'option:reporter-options': [Function (anonymous)], 'option:spec': [Function (anonymous)], 'option:tag': [Function (anonymous)], 'option:dev': [Function (anonymous)] }, 
_eventsCount: 23, _maxListeners: undefined, commands: [], options: [ [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], 
[Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option] ], parent: Command { _events: [Object: null prototype], _eventsCount: 1, 
_maxListeners: undefined, commands: [Array], options: [Array], parent: null, _allowUnknownOption: false, _args: [], rawArgs: [Array], _scriptPath: 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests\\node_modules\\cypress\\bin\\cypress', _name: 'cypress', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: 
true, _actionResults: [], _actionHandler: null, _executableHandler: false, _executableFile: null, _defaultCommandName: null, _exitCallback: null, _aliases: [], _hidden: false, _helpFlags: 
'-h, --help', _helpDescription: 'display help for command', _helpShortFlag: '-h', _helpLongFlag: '--help', _hasImplicitHelpCommand: undefined, _helpCommandName: 'help', 
_helpCommandnameAndArgs: 'help [command]', _helpCommandDescription: 'display help for command', _usage: '<command> [options]', args: [Array], [Symbol(kCapture)]: false }, _allowUnknownOption: 
false, _args: [], rawArgs: null, _scriptPath: null, _name: 'run', _optionValues: {}, _storeOptionsAsProperties: true, _passCommandToAction: true, _actionResults: [], _actionHandler: 
[Function: listener], _executableHandler: false, _executableFile: null, _defaultCommandName: null, _exitCallback: null, _aliases: [], _hidden: false, _helpFlags: '-h, --help', 
_helpDescription: 'display help for command', _helpShortFlag: '-h', _helpLongFlag: '--help', _hasImplicitHelpCommand: 0, _helpCommandName: 'help', _helpCommandnameAndArgs: 'help [command]', 
_helpCommandDescription: 'display help for command', _usage: '[options]', _description: 'Runs Cypress tests from the CLI without the GUI', _argsDescription: undefined, exit: true, browser: 
'C:\\Program Files\\Mozilla Firefox\\firefox.exe', spec: './cypress/e2e/bsd/alarmType/tests.spec.ts', env: 'CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false', args: [], [Symbol(kCapture)]: 
false } }
2023-07-17T08:54:26.076Z cypress:cli parsed cli options { browser: 'C:\\Program Files\\Mozilla Firefox\\firefox.exe', env: 'CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false', spec: 
'./cypress/e2e/bsd/alarmType/tests.spec.ts' }
2023-07-17T08:54:26.076Z cypress:cli verifying Cypress app
2023-07-17T08:54:26.077Z cypress:cli checking environment variables
2023-07-17T08:54:26.078Z cypress:cli checking if executable exists C:\Users\sebuild\AppData\Local\Cypress\Cache\12.8.1\Cypress\Cypress.exe
2023-07-17T08:54:26.080Z cypress:cli Binary is executable? : true
2023-07-17T08:54:26.081Z cypress:cli binaryDir is  C:\Users\sebuild\AppData\Local\Cypress\Cache\12.8.1\Cypress
2023-07-17T08:54:26.081Z cypress:cli Reading binary package.json from: C:\Users\sebuild\AppData\Local\Cypress\Cache\12.8.1\Cypress\resources\app\package.json
2023-07-17T08:54:26.085Z cypress:cli Found binary version 12.8.1 installed in: C:\Users\sebuild\AppData\Local\Cypress\Cache\12.8.1\Cypress
2023-07-17T08:54:26.086Z cypress:cli { verified: true }
2023-07-17T08:54:26.086Z cypress:cli is Verified ? true
2023-07-17T08:54:26.086Z cypress:cli:run processing run options { browser: 'C:\\Program Files\\Mozilla Firefox\\firefox.exe', env: 'CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false', spec: 
'./cypress/e2e/bsd/alarmType/tests.spec.ts', key: null, reporter: null, reporterOptions: null, project: 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests' }
2023-07-17T08:54:26.087Z cypress:cli:run --key is not set, looking up environment variable CYPRESS_RECORD_KEY
2023-07-17T08:54:26.087Z cypress:cli:run run to spawn.start args ["--run-project","C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests","--browser","C:\\Program Files\\Mozilla 
Firefox\\firefox.exe","--env","CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false","--spec","./cypress/e2e/bsd/alarmType/tests.spec.ts"]
2023-07-17T08:54:26.087Z cypress:cli needs to start own Xvfb? false
2023-07-17T08:54:26.087Z cypress:cli spawning, should retry on display problem? false
2023-07-17T08:54:26.093Z cypress:cli spawn args [ '--', '--run-project', 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', '--browser', 'C:\\Program Files\\Mozilla 
Firefox\\firefox.exe', '--env', 'CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false', '--spec', './cypress/e2e/bsd/alarmType/tests.spec.ts', '--cwd', 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', '--userNodePath', 'C:\\Program Files\\nodejs\\node.exe', '--userNodeVersion', '16.18.0' ] { detached: false, stdio: 'pipe', 
windowsHide: false }
2023-07-17T08:54:26.093Z cypress:cli spawning Cypress with executable: C:\Users\sebuild\AppData\Local\Cypress\Cache\12.8.1\Cypress\Cypress.exe
2023-07-17T08:54:26.110Z cypress:cli piping process STDIN into child STDIN
2023-07-17T08:54:26.111Z cypress:cli piping child STDOUT to process STDOUT
2023-07-17T08:54:26.111Z cypress:cli piping child STDERR to process STDERR

2023-07-17T08:54:26.408Z cypress:snapshot:info Caching 3497, defining 4415 modules! Using cache
2023-07-17T08:54:26.412Z cypress:snapshot:debug initializing packherd require
2023-07-17T08:54:26.749Z cypress:server:appdata path: C:\Users\sebuild\AppData\Roaming\Cypress\cy\production\browsers
2023-07-17T08:54:26.754Z cypress:server:cypress starting cypress with argv [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe', '--', '--run-project', 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', '--browser', 'C:\\Program Files\\Mozilla Firefox\\firefox.exe', '--env', 'CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false', 
'--spec', './cypress/e2e/bsd/alarmType/tests.spec.ts', '--cwd', 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', '--userNodePath', 'C:\\Program Files\\nodejs\\node.exe', 
'--userNodeVersion', '16.18.0' ]
2023-07-17T08:54:26.754Z cypress:server:args argv array: [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe', '--run-project', 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', '--browser', 'C:\\Program Files\\Mozilla Firefox\\firefox.exe', '--env', 'CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false', 
'--spec', './cypress/e2e/bsd/alarmType/tests.spec.ts', '--cwd', 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', '--userNodePath', 'C:\\Program Files\\nodejs\\node.exe', 
'--userNodeVersion', '16.18.0' ]
2023-07-17T08:54:26.755Z cypress:server:args parsed argv options { options: { _: [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe' ], 'run-project': 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', runProject: 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', browser: 'C:\\Program Files\\Mozilla Firefox\\firefox.exe', 
env: 'CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false', spec: './cypress/e2e/bsd/alarmType/tests.spec.ts', cwd: 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', userNodePath: 
'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: '16.18.0' } }
2023-07-17T08:54:26.760Z cypress:server:args argv parsed: { _: [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe' ], runProject: 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', browser: 'C:\\Program Files\\Mozilla Firefox\\firefox.exe', env: 'CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false', spec: 
'./cypress/e2e/bsd/alarmType/tests.spec.ts', cwd: 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: '16.18.0', 
invokedFromCli: true }
2023-07-17T08:54:26.761Z cypress:server:util:proxy found proxy environment variables { npm_config_noproxy: '' }
2023-07-17T08:54:26.767Z cypress:server:util:proxy HTTP_PROXY is falsy, disabling HTTP_PROXY
2023-07-17T08:54:26.767Z cypress:server:util:proxy setting default NO_PROXY of ``
2023-07-17T08:54:26.767Z cypress:server:util:proxy <-loopback> not found, adding localhost to NO_PROXY
2023-07-17T08:54:26.767Z cypress:server:util:proxy normalized proxy environment variables { NO_PROXY: '127.0.0.1,::1,localhost' }
2023-07-17T08:54:26.772Z cypress:server:args options { _: [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe' ], runProject: 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', browser: 'C:\\Program Files\\Mozilla Firefox\\firefox.exe', spec: [ 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e 
tests\\cypress\\e2e\\bsd\\alarmType\\tests.spec.ts' ], cwd: 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: 
'16.18.0', invokedFromCli: true, config: { env: { CUSTOMER: 'as3_35sel_as3sel', COMPACT: true, COLORS: false } } }
2023-07-17T08:54:26.772Z cypress:server:args argv options: { _: [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe' ], runProject: 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', browser: 'C:\\Program Files\\Mozilla Firefox\\firefox.exe', spec: [ 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e 
tests\\cypress\\e2e\\bsd\\alarmType\\tests.spec.ts' ], cwd: 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: 
'16.18.0', invokedFromCli: true, config: { env: { CUSTOMER: 'as3_35sel_as3sel', COMPACT: true, COLORS: false } }, projectRoot: 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests' }
2023-07-17T08:54:26.772Z cypress:server:cypress from argv [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe', '--run-project', 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', '--browser', 'C:\\Program Files\\Mozilla Firefox\\firefox.exe', '--env', 'CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false', 
'--spec', './cypress/e2e/bsd/alarmType/tests.spec.ts', '--cwd', 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', '--userNodePath', 'C:\\Program Files\\nodejs\\node.exe', 
'--userNodeVersion', '16.18.0' ] got options { _: [ 'C:\\Users\\sebuild\\AppData\\Local\\Cypress\\Cache\\12.8.1\\Cypress\\Cypress.exe' ], runProject: 
'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', browser: 'C:\\Program Files\\Mozilla Firefox\\firefox.exe', spec: [ 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e 
tests\\cypress\\e2e\\bsd\\alarmType\\tests.spec.ts' ], cwd: 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests', userNodePath: 'C:\\Program Files\\nodejs\\node.exe', userNodeVersion: 
'16.18.0', invokedFromCli: true, config: { env: { CUSTOMER: 'as3_35sel_as3sel', COMPACT: true, COLORS: false } }, projectRoot: 'C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e tests' }
2023-07-17T08:54:26.772Z cypress:server:cypress scaling electron app in headless mode
2023-07-17T08:54:26.811Z cypress:cli child event fired { event: 'exit', code: 2147483651, signal: null }
2023-07-17T08:54:26.812Z cypress:cli child event fired { event: 'close', code: 2147483651, signal: null }
npx cypress run --browser 'C:\\Program Files\\Mozilla Firefox\\firefox.exe' --env="CUSTOMER=${DEPLOYMENT},COMPACT=true,COLORS=false"

I tried it to start powershell with admin-permissions or without, but nothing is working. I think maybe its related to this?

powershell.exe : 2023-07-17T08:54:25.845Z cypress:cli:cli cli starts with arguments ["C:\\Program Files\\nodejs\\node.exe","C:\\home\\sebuild\\jenkins\\workspace\\cypress e2e 
tests\\node_modules\\cypress\\bin\\cypress","run","--browser","C:\\Program Files\\Mozilla 
Firefox\\firefox.exe","--spec","./cypress/e2e/bsd/alarmType/tests.spec.ts","--env=CUSTOMER=as3_35sel_as3sel,COMPACT=true,COLORS=false"]
In C:\home\sebuild\jenkins\workspace\cypress e2e tests@tmp\durable-ff2285bf\powershellWrapper.ps1:3 Zeichen:1
+ & powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Comm ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (2023-07-17T08:5...,COLORS=false"]:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

zokkis avatar Jul 17 '23 08:07 zokkis

I googled around a bit for that error, I guess you did too?

Have you tried using a different shell like git bash or putty or (other shell)? I don't think this is a bug in Cypress per-se, but some kind of conflict with external programs (eg Cypress) and how your powershell / Windows is configured.

I'm sorry I can't be of more help, happy to help and keep making suggestions - I'm not really sure there's anything we can do in this repo to fix this specific issue (if there is, we can do it - but it's not clear if this is the case).

lmiller1990 avatar Jul 18 '23 01:07 lmiller1990

Yes I googled the error and tried everything, like enable remote command execution, but I also found a bug in Jenkins, so maybe its a Jenkins-bug

Thank you for help, but I think I should ask for help in Jenkins-Repo

zokkis avatar Jul 18 '23 08:07 zokkis