Skip to content
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

Cannot connect to Firefox 91.9.1(x86) on Win 32 Jenkins Box #23186

Closed
Xiaogen-liu opened this issue Aug 8, 2022 · 12 comments
Closed

Cannot connect to Firefox 91.9.1(x86) on Win 32 Jenkins Box #23186

Xiaogen-liu opened this issue Aug 8, 2022 · 12 comments
Assignees
Labels
stage: awaiting response Potential fix was proposed; awaiting response

Comments

@Xiaogen-liu
Copy link

Xiaogen-liu commented Aug 8, 2022

Current behavior

Dear Supp,
Find there is an error while running the cypress command in jenkins. We encounter this issue when the firefox's version is 91.9.1(x86). But the version of 91.9.1(x64) works well in jenkins. We have no idea about it. We would like to take the the version of 91.9.1(x86) to have some test. Could you help ?

npx cypress run --spec "cypress/e2e/**/*.js" -b firefox

 {
13:40:59    isCypressErr: true,
13:40:59    type: 'FIREFOX_COULD_NOT_CONNECT',
13:40:59    details: 'Error: connect ECONNREFUSED 127.0.0.1:58681\n' +
13:40:59      '    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)\n',
13:40:59    messageMarkdown: 'Cypress failed to make a connection to Firefox.\n' +
13:40:59      '\n' +
13:40:59      'This usually indicates there was a problem opening the Firefox browser.',
13:40:59    originalError: OperationalError: connect ECONNREFUSED 127.0.0.1:58681
13:40:59        at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
13:40:59     {
13:40:59      cause: Error: connect ECONNREFUSED 127.0.0.1:58681
13:40:59          at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
13:40:59       {
13:40:59        errno: -4078,
13:40:59        code: 'ECONNREFUSED',
13:40:59        syscall: 'connect',
13:40:59        address: '127.0.0.1',
13:40:59        port: 58681
13:40:59      },
13:40:59      isOperational: true,
13:40:59      errno: -4078,
13:40:59      code: 'ECONNREFUSED',
13:40:59      syscall: 'connect',
13:40:59      address: '127.0.0.1',
13:40:59      port: 58681
13:40:59    },
13:40:59    stackWithoutMessage: '    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)\n'

Desired behavior

Ability to start cypress in jenkins and run the scripts in firefox.

Test code to reproduce

Test code is the example in cypress.
Jenkins version: 2.362
Firefox: 91.9..1(x86)
cypress: 10.4.0

Cypress Version

10.4.0

Other

13:57:24  2022-08-08T05:57:17.260Z cypress:server:run formatting Node version. { version: '14.16.1', path: 'C:\\Program Files\\nodejs\\node.exe' }
13:57:24    ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
13:57:24    │ Cypress:        10.4.0                                                                         │
13:57:24    │ Browser:        Firefox 91 (headless)                                                          │
13:57:24  2022-08-08T05:57:17.264Z cypress:lifecycle:EventRegistrar plugin event registered? { eventName: 'before:run', isRegistered: false }
13:57:24    │ Node Version:   v14.16.1 (C:\Program Files\nodejs\node.exe)                                    │
13:57:24  2022-08-08T05:57:17.266Z cypress:server:run about to run spec { spec: { fileExtension: '.js', baseName: 'todo.cy.js', fileName: 'todo', specFileExtension: '.cy.js', relativeToCommonRoot: 
13:57:24  '1-getting-started/todo.cy.js', specType: 'integration', name: 'cypress/e2e/1-getting-started/todo.cy.js', relative: 'cypress\\e2e\\1-getting-started\\todo.cy.js', absolute: 
13:57:24  'E:/test/Test/MIKEtest/cypress/e2e/1-getting-started/todo.cy.js' }, isHeadless: true, browser: { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', 
13:57:24  version: '91.9.1', path: 'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe', minSupportedVersion: 86, majorVersion: 91, isHeadless: true, isHeaded: false } }
13:57:24    │ Specs:          20 found (todo.cy.js, actions.cy.js, aliasing.cy.js, assertions.cy.js, connect │
13:57:24  2022-08-08T05:57:17.266Z cypress:lifecycle:EventRegistrar plugin event registered? { eventName: 'before:spec', isRegistered: false }
13:57:24    │                 ors.cy.js, cookies.cy.js, cypress_api.cy.js, files.cy.js, local_storage.cy.js, │
13:57:24  2022-08-08T05:57:17.266Z cypress:server:run video recording has been enabled. video: true
13:57:24    │                  location.cy.js, misc.cy.js, navigation.cy.js, network_requests.cy.js, queryin │
13:57:24    │                 g.cy.js, spies_stubs_cl...)                                                    │
13:57:24    │ Searched:       E:\test\Test\MIKEtest\cypress\e2e\**\*.js                              │
13:57:24    └────────────────────────────────────────────────────────────────────────────────────────────────┘
13:57:24  
13:57:24  
13:57:24  ────────────────────────────────────────────────────────────────────────────────────────────────────
13:57:24                                                                                                      
13:57:24    Running:  todo.cy.js                                                                     (1 of 20)
13:57:25  2022-08-08T05:57:21.009Z cypress:server:video capture started { command: "ffmpeg -f webm -r 18 -i pipe:0 -y -vcodec libx264 -filter:v crop='floor(in_w/2)*2:floor(in_h/2)*2' -preset ultrafast 
13:57:25  E:\\test\\Test\\MIKEtest\\cypress\\videos\\1-getting-started\\todo.cy.js.mp4" }
13:57:25  2022-08-08T05:57:21.010Z cypress:server:run waiting for socket to connect and browser to launch...
13:57:25  2022-08-08T05:57:21.010Z cypress:server:run waiting for socket connection... { id: 'o5xdf17wor' }
13:57:25  2022-08-08T05:57:21.010Z cypress:server:run setting Firefox properties
13:57:25  2022-08-08T05:57:21.010Z cypress:server:run browser launched
13:57:25  2022-08-08T05:57:21.011Z cypress:server:open_project resetting project state, preparing to launch browser firefox for spec { fileExtension: '.js', baseName: 'todo.cy.js', fileName: 'todo', 
13:57:25  specFileExtension: '.cy.js', relativeToCommonRoot: '1-getting-started/todo.cy.js', specType: 'integration', name: 'cypress/e2e/1-getting-started/todo.cy.js', relative: 
13:57:25  'cypress\\e2e\\1-getting-started\\todo.cy.js', absolute: 'E:/test/Test/MIKEtest/cypress/e2e/1-getting-started/todo.cy.js' } options { onScreencastFrame: true, automationMiddleware: { 
13:57:25  onBeforeRequest: [Function: onBeforeRequest], onAfterResponse: [Function: onAfterResponse] }, projectRoot: 'E:\\test\\Test\\MIKEtest', shouldLaunchNewTab: false, onWarning: [Function 
13:57:25  (anonymous)] }
13:57:25  2022-08-08T05:57:21.011Z cypress:server:project resetting project instance E:\test\Test\MIKEtest
13:57:25  2022-08-08T05:57:21.011Z cypress:proxy:http:util:buffers resetting buffers
13:57:25  2022-08-08T05:57:21.011Z cypress:network:cors Parsed URL { port: '80', tld: '', domain: '' }
13:57:25  2022-08-08T05:57:21.011Z cypress:network:cors Parsed URL { port: '59425', tld: 'localhost', domain: '' }
13:57:25  2022-08-08T05:57:21.011Z cypress:server:remote-states setting remote state { auth: undefined, origin: 'http://localhost:59425/', strategy: 'file', fileServer: 'http://localhost:59426/', 
13:57:25  domainName: 'localhost', props: null } for http://localhost:59425/
13:57:25  2022-08-08T05:57:21.011Z cypress:network:cors Parsed URL { port: '59425', tld: 'localhost', domain: '' }
13:57:25  2022-08-08T05:57:21.011Z cypress:server:remote-states getting remote state: { auth: undefined, origin: 'http://localhost:59425/', strategy: 'file', fileServer: 'http://localhost:59426/', 
13:57:25  domainName: 'localhost', props: null } for: http://localhost:59425/
13:57:25  2022-08-08T05:57:21.011Z cypress:server:project_utils returning spec url http://localhost:59425/__/#/specs/runner?file=cypress\e2e\1-getting-started\todo.cy.js
13:57:25  2022-08-08T05:57:21.011Z cypress:server:open_project open project url http://localhost:59425/__/#/specs/runner?file=cypress\e2e\1-getting-started\todo.cy.js
13:57:25  2022-08-08T05:57:21.012Z cypress:server:project project has config { setupNodeEvents: '[Function setupNodeEvents]', projectRoot: 'E:\\test\\Test\\MIKEtest', projectName: 'MIKEtest', 
13:57:25  rawJson: { e2e: { setupNodeEvents: '[Function setupNodeEvents]' }, setupNodeEvents: '[Function setupNodeEvents]', envFile: {}, projectRoot: 'E:\\test\\Test\\MIKEtest', projectName: 
13:57:25  'MIKEtest' }, configFile: 'cypress.config.js', morgan: false, isTextTerminal: true, socketId: 'o5xdf17wor', report: true, animationDistanceThreshold: 5, arch: 'x64', baseUrl: null, 
13:57:25  blockHosts: null, chromeWebSecurity: true, clientCertificates: [], defaultCommandTimeout: 4000, downloadsFolder: 'E:\\test\\Test\\MIKEtest\\cypress\\downloads', env: {}, execTimeout: 
13:57:25  60000, experimentalFetchPolyfill: false, experimentalInteractiveRunEvents: false, experimentalSessionAndOrigin: false, experimentalModifyObstructiveThirdPartyCode: false, 
13:57:25  experimentalSourceRewriting: false, fileServerFolder: 'E:\\test\\Test\\MIKEtest', fixturesFolder: 'E:\\test\\Test\\MIKEtest\\cypress\\fixtures', excludeSpecPattern: 
13:57:25  '*.hot-update.js', includeShadowDom: false, keystrokeDelay: 0, modifyObstructiveCode: true, numTestsKeptInMemory: 0, platform: 'win32', pageLoadTimeout: 60000, port: 59425, projectId: null, 
13:57:25  redirectionLimit: 20, reporter: 'spec', reporterOptions: null, requestTimeout: 5000, resolvedNodePath: 'C:\\Program Files\\nodejs\\node.exe', resolvedNodeVersion: '14.16.1', responseTimeout: 
13:57:25  30000, retries: { runMode: 0, openMode: 0 }, screenshotOnRunFailure: true, screenshotsFolder: 'E:\\test\\Test\\MIKEtest\\cypress\\screenshots', slowTestThreshold: 10000, 
13:57:25  scrollBehavior: 'top', supportFile: 'E:\\test\\Test\\MIKEtest\\cypress\\support\\e2e.js', supportFolder: 'E:\\test\\Test\\MIKEtest\\cypress\\support', taskTimeout: 60000, 
13:57:25  trashAssetsBeforeRuns: true, userAgent: null, video: true, videoCompression: 32, videosFolder: 'E:\\test\\Test\\MIKEtest\\cypress\\videos', videoUploadOnPasses: true, viewportHeight: 
13:57:25  660, viewportWidth: 1000, waitForAnimations: true, watchForFileChanges: false, additionalIgnorePattern: [], autoOpen: false, browsers: [ { name: 'chrome', family: 'chromium', channel: 
13:57:25  'stable', displayName: 'Chrome', version: '104.0.5112.79', path: 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe', minSupportedVersion: 64, majorVersion: 104 }, { name: 'firefox', 
13:57:25  family: 'firefox', channel: 'stable', displayName: 'Firefox', version: '91.9.1', path: 'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe', minSupportedVersion: 86, majorVersion: 91 }, { 
13:57:25  name: 'edge', family: 'chromium', channel: 'stable', displayName: 'Edge', version: '103.0.1264.49', path: 'C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe', 
13:57:25  minSupportedVersion: 79, majorVersion: 103 }, { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '102.0.5005.148', path: '', majorVersion: 102, info: 
13:57:25  'Electron is the default browser that comes with Cypress. This is the default browser that runs in headless mode. Selecting this browser is useful when debugging. The version number indicates 
13:57:25  the underlying Chromium version that Electron uses.' } ], clientRoute: '/__/', cypressBinaryRoot: 
13:57:25  'C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Local\\Cypress\\Cache\\10.4.0\\Cypress\\resources\\app', devServerPublicPathRoute: '/__cypress/src', hosts: null, isInteractive: true, 
13:57:25  namespace: '__cypress', reporterRoute: '/__cypress/reporter', socketIoCookie: '__socket', socketIoRoute: '/__socket', version: '10.4.0', xhrRoute: '/xhrs/', specPattern: 
13:57:25  'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}', cypressEnv: 'production', resolved: { animationDistanceThreshold: { value: 5, from: 'default' }, arch: { value: 'x64', from: 'default' }, baseUrl: { 
13:57:25  value: null, from: 'default' }, blockHosts: { value: null, from: 'default' }, chromeWebSecurity: { value: true, from: 'default' }, clientCertificates: { value: [], from: 'default' }, 
13:57:25  defaultCommandTimeout: { value: 4000, from: 'default' }, downloadsFolder: { value: 'cypress/downloads', from: 'default' }, env: {}, execTimeout: { value: 60000, from: 'default' }, 
13:57:25  experimentalFetchPolyfill: { value: false, from: 'default' }, experimentalInteractiveRunEvents: { value: false, from: 'default' }, experimentalSessionAndOrigin: { value: false, from: 
13:57:25  'default' }, experimentalModifyObstructiveThirdPartyCode: { value: false, from: 'default' }, experimentalSourceRewriting: { value: false, from: 'default' }, fileServerFolder: { value: '', 
13:57:25  from: 'default' }, fixturesFolder: { value: 'cypress/fixtures', from: 'default' }, excludeSpecPattern: { value: '*.hot-update.js', from: 'default' }, includeShadowDom: { value: false, from: 
13:57:25  'default' }, keystrokeDelay: { value: 0, from: 'default' }, modifyObstructiveCode: { value: true, from: 'default' }, numTestsKeptInMemory: { value: 0, from: 'config' }, platform: { value: 
13:57:25  'win32', from: 'default' }, pageLoadTimeout: { value: 60000, from: 'default' }, port: { value: null, from: 'default' }, projectId: { value: null, from: 'default' }, redirectionLimit: { value: 
13:57:25  20, from: 'default' }, reporter: { value: 'spec', from: 'default' }, reporterOptions: { value: null, from: 'default' }, requestTimeout: { value: 5000, from: 'default' }, resolvedNodePath: { 
13:57:25  value: null, from: 'default' }, resolvedNodeVersion: { value: null, from: 'default' }, responseTimeout: { value: 30000, from: 'default' }, retries: { value: [Object], from: 'default' }, 
13:57:25  screenshotOnRunFailure: { value: true, from: 'default' }, screenshotsFolder: { value: 'cypress/screenshots', from: 'default' }, slowTestThreshold: { value: 10000, from: 'default' }, 
13:57:25  scrollBehavior: { value: 'top', from: 'default' }, supportFile: { value: 'cypress/support/e2e.{js,jsx,ts,tsx}', from: 'default' }, supportFolder: { value: false, from: 'default' }, 
13:57:25  taskTimeout: { value: 60000, from: 'default' }, trashAssetsBeforeRuns: { value: true, from: 'default' }, userAgent: { value: null, from: 'default' }, video: { value: true, from: 'default' }, 
13:57:25  videoCompression: { value: 32, from: 'default' }, videosFolder: { value: 'cypress/videos', from: 'default' }, videoUploadOnPasses: { value: true, from: 'default' }, viewportHeight: { value: 
13:57:25  660, from: 'default' }, viewportWidth: { value: 1000, from: 'default' }, waitForAnimations: { value: true, from: 'default' }, watchForFileChanges: { value: false, from: 'config' }, 
13:57:25  specPattern: { value: 'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}', from: 'default' }, browsers: { value: [Array], from: 'runtime' }, hosts: { value: null, from: 'default' }, isInteractive: { value: 
13:57:25  true, from: 'default' } }, testingType: 'e2e', remote: {}, browser: null, specs: [], proxyUrl: 'http://localhost:59425/', browserUrl: 'http://localhost:59425/__/', reporterUrl: 
13:57:25  'http://localhost:59425/__cypress/reporter', xhrUrl: '__cypress/xhrs/', proxyServer: 'http://localhost:59425/', state: {} }
13:57:25  2022-08-08T05:57:21.012Z cypress:network:cors Parsed URL { port: '59425', tld: 'localhost', domain: '' }
13:57:25  2022-08-08T05:57:21.012Z cypress:server:remote-states getting remote state: { auth: undefined, origin: 'http://localhost:59425/', strategy: 'file', fileServer: 'http://localhost:59426/', 
13:57:25  domainName: 'localhost', props: null } for: http://localhost:59425/
13:57:26  2022-08-08T05:57:21.012Z cypress:server:open_project launching browser: { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', version: '91.9.1', path: 'C:\\Program 
13:57:26  Files (x86)\\Mozilla Firefox\\firefox.exe', minSupportedVersion: 86, majorVersion: 91, isHeadless: true, isHeaded: false }, spec: cypress\e2e\1-getting-started\todo.cy.js
13:57:26  2022-08-08T05:57:21.013Z cypress:server:browsers browsers.kill called with no active instance
13:57:26  2022-08-08T05:57:21.013Z cypress:server:browsers getBrowserLauncher { browser: { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', version: '91.9.1', path: 
13:57:26  'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe', minSupportedVersion: 86, majorVersion: 91, isHeadless: true, isHeaded: false } }
13:57:26  2022-08-08T05:57:21.212Z cypress:server:browsers opening browser { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', version: '91.9.1', path: 'C:\\Program Files 
13:57:26  (x86)\\Mozilla Firefox\\firefox.exe', minSupportedVersion: 86, majorVersion: 91, isHeadless: true, isHeaded: false }
13:57:26  2022-08-08T05:57:21.215Z cypress:server:browsers:firefox firefox open { onScreencastFrame: true, automationMiddleware: { onBeforeRequest: [Function: onBeforeRequest], onAfterResponse: 
13:57:26  [Function: onAfterResponse] }, projectRoot: 'E:\\test\\Test\\MIKEtest', shouldLaunchNewTab: false, onWarning: [Function (anonymous)], browsers: [ { name: 'chrome', family: 'chromium', 
13:57:26  channel: 'stable', displayName: 'Chrome', version: '104.0.5112.79', path: 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe', minSupportedVersion: 64, majorVersion: 104 }, { name: 
13:57:26  'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', version: '91.9.1', path: 'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe', minSupportedVersion: 86, 
13:57:26  majorVersion: 91 }, { name: 'edge', family: 'chromium', channel: 'stable', displayName: 'Edge', version: '103.0.1264.49', path: 'C:\\Program Files 
13:57:26  (x86)\\Microsoft\\Edge\\Application\\msedge.exe', minSupportedVersion: 79, majorVersion: 103 }, { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: 
13:57:26  '102.0.5005.148', path: '', majorVersion: 102, info: 'Electron is the default browser that comes with Cypress. This is the default browser that runs in headless mode. Selecting this browser 
13:57:26  is useful when debugging. The version number indicates the underlying Chromium version that Electron uses.' } ], userAgent: null, proxyUrl: 'http://localhost:59425/', proxyServer: 
13:57:26  'http://localhost:59425/', socketIoRoute: '/__socket', chromeWebSecurity: true, isTextTerminal: true, downloadsFolder: 'E:\\test\\Test\\MIKEtest\\cypress\\downloads', 
13:57:26  experimentalSessionAndOrigin: false, experimentalModifyObstructiveThirdPartyCode: false, browser: { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', version: 
13:57:26  '91.9.1', path: 'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe', minSupportedVersion: 86, majorVersion: 91, isHeadless: true, isHeaded: false }, url: 
13:57:26  'http://localhost:59425/__/#/specs/runner?file=cypress\\e2e\\1-getting-started\\todo.cy.js', onBrowserClose: [Function (anonymous)], onError: [Function (anonymous)], onBrowserOpen: [Function: 
13:57:26  onBrowserOpen] }
13:57:26  2022-08-08T05:57:21.218Z cypress:server:browsers:firefox available ports: { foxdriverPort: 59432, marionettePort: 59433 }
13:57:26  2022-08-08T05:57:21.218Z cypress:server:browsers:utils writing extension
13:57:26  2022-08-08T05:57:21.219Z cypress:lifecycle:EventRegistrar plugin event registered? { eventName: 'before:browser:launch', isRegistered: false }
13:57:26  2022-08-08T05:57:21.273Z cypress:server:browsers:utils copied extension
13:57:26  2022-08-08T05:57:21.283Z cypress:server:browsers:firefox firefox directories { path: 
13:57:26  'C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Roaming\\Cypress\\cy\\production\\browsers\\firefox-stable\\run-10264', cacheDir: 
13:57:26  'C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Roaming\\Cypress\\cy\\production\\browsers\\firefox-stable\\run-10264\\CypressCache', extensionDest: 
13:57:26  'C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Roaming\\Cypress\\cy\\production\\browsers\\firefox-stable\\run-10264\\CypressExtension' }
13:57:26  2022-08-08T05:57:21.291Z cypress:server:browsers:firefox launch in firefox {
13:57:26    url: 'http://localhost:59425/__/#/specs/runner?file=cypress\\e2e\\1-getting-started\\todo.cy.js',
13:57:26    args: [
13:57:26      '-marionette',
13:57:26      '-new-instance',
13:57:26      '-foreground',
13:57:26      '-start-debugger-server',
13:57:26      '-no-remote',
13:57:26      '--remote-debugging-port=59431',
13:57:27      '-headless',
13:57:27      '-profile',
13:57:27      'C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Roaming\\Cypress\\cy\\production\\browsers\\firefox-stable\\run-10264'
13:57:27    ]
13:57:27  }
13:57:27  2022-08-08T05:57:21.291Z cypress:launcher:browsers launching browser { browser: { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', version: '91.9.1', path: 
13:57:27  'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe', minSupportedVersion: 86, majorVersion: 91, isHeadless: true, isHeaded: false }, url: 'about:blank' }
13:57:27  2022-08-08T05:57:21.291Z cypress:launcher:browsers spawning browser with args { args: [ 'about:blank', '-marionette', '-new-instance', '-foreground', '-start-debugger-server', '-no-remote', 
13:57:27  '--remote-debugging-port=59431', '-headless', '-profile', 'C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Roaming\\Cypress\\cy\\production\\browsers\\firefox-stable\\run-10264' ] }
13:57:27  2022-08-08T05:57:21.304Z cypress:network:connect received error on connect, retrying { iteration: 0, delay: 100, err: Error: connect ECONNREFUSED 127.0.0.1:59432 at 
13:57:27  TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) { errno: -4078, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 59432 } }
13:57:27  2022-08-08T05:57:21.304Z cypress:network:connect received error on connect, retrying { iteration: 0, delay: 100, err: Error: connect ECONNREFUSED 127.0.0.1:59433 at 
13:57:27  TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) { errno: -4078, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 59433 } }
13:57:27  2022-08-08T05:57:21.305Z cypress:network:connect received error on connect, retrying { iteration: 0, delay: 100, err: Error: connect ECONNREFUSED 127.0.0.1:59431 at 
13:57:27  TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) { errno: -4078, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 59431 } }
13:57:27  2022-08-08T05:57:21.407Z cypress:network:connect received error on connect, retrying { iteration: 1, delay: 100, err: E

13:58:11  2022-08-08T05:58:11.408Z cypress:server:cypress exiting with err Error: connect ECONNREFUSED 127.0.0.1:59432
13:58:11      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
13:58:11   {
13:58:11    isCypressErr: true,
13:58:11    type: 'FIREFOX_COULD_NOT_CONNECT',
13:58:11    details: 'Error: connect ECONNREFUSED 127.0.0.1:59432\n' +
13:58:11      '    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)\n',
13:58:11    messageMarkdown: 'Cypress failed to make a connection to Firefox.\n' +
13:58:12      '\n' +
13:58:12      'This usually indicates there was a problem opening the Firefox browser.',
13:58:12    originalError: OperationalError: connect ECONNREFUSED 127.0.0.1:59432
13:58:12        at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
13:58:12     {
13:58:12      cause: Error: connect ECONNREFUSED 127.0.0.1:59432
13:58:12          at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
13:58:12       {
13:58:12        errno: -4078,
13:58:12        code: 'ECONNREFUSED',
13:58:12        syscall: 'connect',
13:58:12        address: '127.0.0.1',
13:58:12        port: 59432
13:58:12      },
13:58:12      isOperational: true,
13:58:12      errno: -4078,
13:58:12      code: 'ECONNREFUSED',
13:58:12      syscall: 'connect',
13:58:13      address: '127.0.0.1',
13:58:13      port: 59432
13:58:13    },
13:58:13    stackWithoutMessage: '    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)\n'
13:58:13  }
13:58:13  Cypress failed to make a connection to Firefox.
13:58:13  
13:58:13  This usually indicates there was a problem opening the Firefox browser.
13:58:13  
13:58:13  Error: connect ECONNREFUSED 127.0.0.1:59432
13:58:13      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
13:58:13  
@AtofStryker AtofStryker self-assigned this Aug 8, 2022
@cypress-bot cypress-bot bot added the stage: investigating Someone from Cypress is looking into this label Aug 8, 2022
@AtofStryker
Copy link
Contributor

Hi @Xiaogen-liu. Thank you for opening an issue. Would you be able to provide a reproduction or more details to understand how firefox is being installed? Also, have you tried upgrading to node 16.x and firefox 103? We support 91, but it is about 10 major versions behind. Likely unrelated, but good to rule out.

@Xiaogen-liu
Copy link
Author

HI @AtofStryker
Thanks you for your fast reply first. I installed the firefox using the below link which can download the x86 firefox.
Actually the node version is v14.16.1 on my local, meanwhile we rely on this version of the firefox browser. I will upgrade my node version and feedback here. Thanks for your checking.

https://ftp.mozilla.org/pub/firefox/releases/91.9.1esr/win32/en-US/

@Xiaogen-liu
Copy link
Author

HI @AtofStryker
Upgraded the nodejs, this issue happens again on my local jenkins. Could you help ?

image

Best Regards!

@AtofStryker
Copy link
Contributor

I will try! Is there an instance of the browser already running? Is the jenkins job executing with elevated permissions? is it possible to provide a small reproduction in a git repository someplace where we can run this locally and see the issue?

possibly related to #14272 #22231

@cypress-bot cypress-bot bot added stage: awaiting response Potential fix was proposed; awaiting response and removed stage: investigating Someone from Cypress is looking into this labels Aug 10, 2022
@Xiaogen-liu
Copy link
Author

HI @AtofStryker
Thanks for your fast feedback. According to your question, following is as below

  1. Is there an instance of the browser already running?
    Yes, do you have any suggestion or how to share you more information?

  2. Is the jenkins job executing with elevated permissions?
    Yes. i am not sure that it is related to permissions, since the same version of different digits of firefox can work well in jenkins.
    eg:
    firefox 91.9.1(x64) : it works well in jenkins
    firefox 91.9.1(x86): it works not good in jenkins.

  3. Is it possible to provide a small reproduction in a git repository someplace where we can run this locally and see the issue?
    May i know what your means is that you need some scripts of cypress ? Actually , using the example of cypress scripts can reproduce this issue.

Hope it helps in your investigation.
By the way, the following is the jenkins pipeline by my side.

`
pipeline{
agent any
stages{
stage('Test'){

        steps{
         script {

        bat " npx cypress run --spec \"cypress/e2e/**/*.js\" -b firefox"
             }
             
        }
    }


}

}
`

Best Regards!

@AtofStryker
Copy link
Contributor

  1. Is there an instance of the browser already running?
    Yes, do you have any suggestion or how to share you more information?

This could be the issue as the connect might actually already be in use. Have you tried killing the firefox instance and then running the test to see if the issue resolves? It would probably be good to describe how the instance is already running and why it is needed to be open. In other words, describe your workflow.

  1. Is the jenkins job executing with elevated permissions?
    Yes. i am not sure that it is related to permissions, since the same version of different digits of firefox can work well in jenkins.
    eg:
    firefox 91.9.1(x64) : it works well in jenkins
    firefox 91.9.1(x86): it works not good in jenkins.

Makes sense. I just want to rule out any type of permissions/access issues as sometimes running as privileged access can resolve a few of these things.

  1. Is it possible to provide a small reproduction in a git repository someplace where we can run this locally and see the issue?
    May i know what your means is that you need some scripts of cypress ? Actually , using the example of cypress scripts can reproduce this issue.

Sure. The goal of this is to provide a way to reproduce the issue consistently on our end. Right now we don't have a way to reproduce the problem. The goal here would be for you to spin up a side project in git and configure Jenkins/cypress similar to how you have it now to reproduce the firefox issue, and then share the repository with us. Would that be possible? It's been a good while since I have used Jenkins 😅 .

The pipeline information is as good start, but will definitely need more to reproduce the issue.

@Xiaogen-liu
Copy link
Author

HI @AtofStryker

This could be the issue as the connect might actually already be in use. Have you tried killing the firefox instance and then running the test to see if the issue resolves? It would probably be good to describe how the instance is already running and why it is needed to be open. In other words, describe your workflow.

i tried to trigger the job while there is no firefox instance in task manager, but the result is the same as before.

Sure. The goal of this is to provide a way to reproduce the issue consistently on our end. Right now we don't have a way to reproduce the problem. The goal here would be for you to spin up a side project in git and configure Jenkins/cypress similar to how you have it now to reproduce the firefox issue, and then share the repository with us. Would that be possible? It's been a good while since I have used Jenkins 😅 .

it is different to share the repository for you. But i can share more detail about this which can help you reproduce this issue on you local side.
Steps:

  1. install the firefox in a win10(x64) VM. (91.9.1esr win32)
    https://ftp.mozilla.org/pub/firefox/releases/91.9.1esr/win32/en-US/
  2. creating a new job in jenkins with pipeline type.
    `

pipeline{
agent any

stages{
    stage('Test'){
        steps {
            dir("D:/cypress"){
        bat " npx cypress run --spec \"cypress/e2e/**/*.js\" -b firefox"
        }
    }
    }
}
}

`
3. Then going to the cypress scripts and npm install
4. trigger the jenkins job.

@cypress-bot cypress-bot bot added stage: investigating Someone from Cypress is looking into this and removed stage: awaiting response Potential fix was proposed; awaiting response labels Aug 12, 2022
@AtofStryker
Copy link
Contributor

@Xiaogen-liu I do not have jenkins set up in CI or locally. Would you be able to set up a reproduction with a public jenkins job and reference a run here? It would likely save time as opposed to me just trying to give it a go on a reproduction 😅 .

@cypress-bot cypress-bot bot added stage: awaiting response Potential fix was proposed; awaiting response and removed stage: investigating Someone from Cypress is looking into this labels Aug 15, 2022
@Xiaogen-liu
Copy link
Author

HI @AtofStryker
may i know how can i set up a reproduction here ? is there any guideline about setting up a reproduction here ?

@cypress-bot cypress-bot bot added stage: investigating Someone from Cypress is looking into this and removed stage: awaiting response Potential fix was proposed; awaiting response labels Aug 17, 2022
@rachelruderman
Copy link
Contributor

Hi @Xiaogen-liu ! To set up a reproduction, you can send us a public Jenkins job that is running your own test code or, ideally, a minimally reproducible example using cypress-test-tiny. The advantage of creating a minimally reproducible example is that it narrows down the issue to the essentials so it's easier to track down what's going wrong 🙏

@cypress-bot cypress-bot bot added stage: awaiting response Potential fix was proposed; awaiting response and removed stage: investigating Someone from Cypress is looking into this labels Aug 19, 2022
@emilyrohrbough
Copy link
Member

@Xiaogen-liu I see you commented on #8067 (comment) and have not provided the full debug logs. Are you also seeing this error?

cypress:launcher firefox stderr: Running Firefox as root in a regular user's session is not supported.  ($HOME is /Users/tester which is owned by tester.)
cypress:launcher firefox exited: { code: 1, signal: null }

@emilyrohrbough emilyrohrbough changed the title Cypress failed to make a connection to Firefox while the command includes -b firefox Cannot connect to Firefox 91.9.1(x86) on Win 32 Jenkins Box Aug 31, 2022
@emilyrohrbough
Copy link
Member

Unfortunately we have to close this issue as there is not enough information to reproduce the problem. This does not mean that your issue is not happening - it just means that we do not have a path to move forward.

Please comment in this issue with a reproducible example and we will consider reopening the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: awaiting response Potential fix was proposed; awaiting response
Projects
None yet
Development

No branches or pull requests

4 participants