currents-dev / cypress-cloud

Debug, troubleshoot and record Cypress CI tests in Cloud
https://currents.dev
Other
47 stars 17 forks source link

Using CJS syntax in EMS setup fails #142

Closed samixchoumi closed 1 year ago

samixchoumi commented 1 year ago

Before opening, please confirm:

Environment information

``` System: OS: macOS 13.4 CPU: (8) arm64 Apple M1 Pro Memory: 623.56 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.12.1 - /usr/local/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 9.6.4 - /usr/local/bin/npm Browsers: Chrome: 114.0.5735.106 Firefox: 113.0.2 Safari: 16.5 npmPackages: @badeball/cypress-cucumber-preprocessor: ^17.2.0 => 17.2.0 @bahmutov/cypress-esbuild-preprocessor: ^2.2.0 => 2.2.0 @cypress/angular: 0.0.0-development @cypress/mount-utils: 0.0.0-development @cypress/react: 0.0.0-development @cypress/react18: 0.0.0-development @cypress/svelte: 0.0.0-development @cypress/vue: 0.0.0-development @cypress/vue2: 0.0.0-development @shelex/cypress-allure-plugin: ^2.39.1 => 2.39.1 @typescript-eslint/eslint-plugin: ^5.59.7 => 5.59.8 @typescript-eslint/parser: ^5.59.7 => 5.59.8 allure-js-commons: ^2.3.0 => 2.4.0 cy2: ^4.0.6 => 4.0.6 (3.4.3) cypress: ^12.13.0 => 12.13.0 cypress-cloud: ^1.7.4 => 1.7.4 cypress-multi-reporters: ^1.6.3 => 1.6.3 cypress-real-events: ^1.8.1 => 1.8.1 cypress-recurse: ^1.35.1 => 1.35.2 cypress-slack-reporter: ^1.5.3 => 1.5.3 cypress-slow-down: ^1.2.1 => 1.2.1 cypress-time-marks: ^1.4.0 => 1.4.0 esbuild: ^0.17.19 => 0.17.19 (0.14.54) eslint: ^8.41.0 => 8.41.0 eslint-plugin-cypress: ^2.13.3 => 2.13.3 fs-extra: ^11.1.1 => 11.1.1 (9.1.0, 7.0.1, 10.1.0) mocha: ^10.2.0 => 10.2.0 mochawesome: ^7.1.3 => 7.1.3 mochawesome-merge: ^4.3.0 => 4.3.0 mochawesome-report-generator: ^6.2.0 => 6.2.0 moment: ^2.29.4 => 2.29.4 typescript: ^5.0.4 => 5.0.4 uid: ^2.0.2 => 2.0.2 npmGlobalPackages: corepack: 0.14.2 npm: 9.6.4 ```

Describe the bug

When launching CURRENTS_PROJECT_ID=xxx CURRENTS_RECORD_KEY=yyy npx cypress-cloud run --record --key XXX --parallel --ci-build-id $CI_PIPELINE_ID --env allure=true,configFile=dev --browser chrome, I got that error :

 WARNING  Record key is invalid. Please visit https://app.currents.dev to see the valid record keys.
 ERROR  Request failed with status code 422

Expected behavior

No error, tests working fine. If you use cy2 run command instead of cypress-cloud run command, it works fine.

Command and Setup

Command : CURRENTS_PROJECT_ID=xxx CURRENTS_RECORD_KEY=yyy npx cypress-cloud run --record --key XXX --parallel --ci-build-id $CI_PIPELINE_ID --env allure=true,configFile=dev --browser chrome

Setup - currents.config.js :


// currents.config.js
module.exports = {
  projectId: "yyy",
  recordKey: "xxx",
  // Sorry Cypress users - set the director service URL
  cloudServiceUrl: "http://localhost:1234/",
};

Setup - cypress.config.ts :


import { defineConfig } from 'cypress';
import cloudPlugin from 'cypress-cloud/plugin';
import createBundler from '@bahmutov/cypress-esbuild-preprocessor';
import preprocessor from '@badeball/cypress-cucumber-preprocessor';
import { createEsbuildPlugin } from '@badeball/cypress-cucumber-preprocessor/esbuild';
import allureWriter from '@shelex/cypress-allure-plugin/writer';

async function setupNodeEvents(
  on: Cypress.PluginEvents,
  config: Cypress.PluginConfigOptions
): Promise<Cypress.PluginConfigOptions> {
  // This is required for the preprocessor to be able to generate JSON reports after each run, and more,
  await cloudPlugin(on, config);
  await preprocessor.addCucumberPreprocessorPlugin(on, config);
  on(
    'file:preprocessor',
    createBundler({
      plugins: [createEsbuildPlugin(config)]
    })
  );
  allureWriter(on, config);
  // Make sure to return the config object as it might have been modified by the plugin.
  return config;
}

export default defineConfig({
  //Cypress run parameters
  chromeWebSecurity: false,
  includeShadowDom: true,
  video: false,
  reporter: 'cypress-multi-reporters',
  experimentalMemoryManagement: true,
  numTestsKeptInMemory: 0,
  reporterOptions: {
    configFile: 'reporterOpts.json'
  },
  e2e: {
    specPattern: ['./cypress/integration/**/*.feature'],
    excludeSpecPattern: './cypress/integration/Not implemented yet',
    defaultCommandTimeout: 20000,
    requestTimeout: 20000,
    setupNodeEvents,
    baseUrl: 'https://localhost.com',
    env: {
      jsonEnabled: true,
      jsonOutput: './cypress/cucumber-json/cucumber-json.json',
      allureReuseAfterSpec: true,
      allureOmitPreviousAttemptScreenshots: false,
      environment: 'dev',
    }
  },
  retries: {
    runMode: 0,
    openMode: 0
  }
});

Setup - package.json :


{
  "name": "projectName",
  "version": "1.0.0",
  "description": "Project to make automation test",
  "main": "index.js",
  "type": "module",
  "scripts": {
    "test": "CURRENTS_PROJECT_ID=xxx CURRENTS_RECORD_KEY=yyy npx cypress-cloud run --record --key XXX --parallel --ci-build-id $CI_PIPELINE_ID --env allure=true,configFile=dev --browser chrome",
    "test:debug": "CURRENTS_PROJECT_ID=xxx CURRENTS_RECORD_KEY=yyy DEBUG=currents:*,cypress:* npx cypress-cloud run --record --key XXX --parallel --ci-build-id $CI_PIPELINE_ID --env allure=true,configFile=dev --browser chrome",
  },
  "devDependencies": {
    "@badeball/cypress-cucumber-preprocessor": "^17.2.0",
    "@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",
    "@shelex/cypress-allure-plugin": "^2.39.1",
    "@typescript-eslint/eslint-plugin": "^5.59.7",
    "@typescript-eslint/parser": "^5.59.7",
    "allure-js-commons": "^2.3.0",
    "cy2": "^4.0.6",
    "cypress": "^12.13.0",
    "cypress-cloud": "^1.7.4",
    "cypress-multi-reporters": "^1.6.3",
    "cypress-real-events": "^1.8.1",
    "cypress-recurse": "^1.35.1",
    "cypress-slack-reporter": "^1.5.3",
    "cypress-slow-down": "^1.2.1",
    "cypress-time-marks": "^1.4.0",
    "esbuild": "^0.17.19",
    "eslint": "^8.41.0",
    "eslint-plugin-cypress": "^2.13.3",
    "fs-extra": "^11.1.1",
    "mocha": "^10.2.0",
    "mochawesome": "^7.1.3",
    "mochawesome-merge": "^4.3.0",
    "mochawesome-report-generator": "^6.2.0",
    "moment": "^2.29.4",
    "typescript": "^5.0.4"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "uid": "^2.0.2"
  }
}

Full log and debug output

``` Discovered 21 spec files Tags: false; Group: false; Parallel: true; Batch Size: 3 Connecting to cloud orchestration service... currents:ci detected CI provider: null +0ms currents:ci detected CI params: {} +0ms currents:ci git commit existing info +30ms currents:ci { currents:ci branch: 'feature/update_sorry_cypress_to_cypress-cloud', currents:ci remoteOrigin: 'git@gitlab.com:project/qat/projectName.git', currents:ci authorEmail: 'samixchoumi@mail.com', currents:ci authorName: 'samixchoumi', currents:ci message: 'Update cypress-cloud config\n', currents:ci sha: 'e6d94b714ed18612b238d46252eca75a75161ed1' currents:ci } +1ms currents:ci commit info from provider environment variables: {} +0ms currents:ci combined git and environment variables from provider +0ms currents:ci { currents:ci branch: 'feature/update_sorry_cypress_to_cypress-cloud', currents:ci remoteOrigin: 'git@gitlab.com:project/qat/projectName.git', currents:ci authorEmail: 'samixchoumi@mail.com', currents:ci authorName: 'samixchoumi', currents:ci message: 'Update cypress-cloud config\n', currents:ci sha: 'e6d94b714ed18612b238d46252eca75a75161ed1' currents:ci } +0ms currents:api network request: { method: 'post', url: '/runs', headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json', 'x-cypress-request-attempt': 0, 'x-cypress-version': '12.13.0', 'x-ccy-version': '1.7.4' }, data: { ci: { params: {}, provider: null }, specs: [ 'cypress/integration/Advertiser/AdvertiserScenario.feature', 'cypress/integration/DataMarketplace/DataCostHighPrice.feature', 'cypress/integration/CreativeBannerSize/CreativeBannerSizeScenario.feature', 'cypress/integration/Deal/CopyDeal.feature', 'cypress/integration/Deal/CreateDeal.feature', 'cypress/integration/Deal/DeactivateDeal.feature', 'cypress/integration/Deal/DealInfo.feature', 'cypress/integration/Deal/DeleteDeal.feature', 'cypress/integration/Deal/SearchDeal.feature', 'cypress/integration/Deal/UpdateDeal.feature', 'cypress/integration/ImportExport/ImportExportDomainList.feature', 'cypress/integration/ImportExport/ImportPostalCode.feature', 'cypress/integration/InstantReportBuilder/InstantReportBuilderScenario.feature', 'cypress/integration/InstantInsights/InstantInsightsDataScenario.feature', 'cypress/integration/InstantInsights/InstantInsightsDisplayMetricsDimension.feature', 'cypress/integration/Report/GenerateCSVReport.feature', 'cypress/integration/Targeting/TargetingChartInventoryScenario.feature', 'cypress/integration/Targeting/TargetingChartPublisherScenario.feature', 'cypress/integration/Targeting/TargetingChartScenario.feature', 'cypress/integration/TempTest/DisplaymentScenario.feature', 'cypress/integration/User/TermAndConditionScenario.feature' ], commit: { branch: 'feature/update_sorry_cypress_to_cypress-cloud', remoteOrigin: 'git@gitlab.com:project/qat/projectName.git', authorEmail: 'samixchoumi@mail.com', authorName: 'samixchoumi', message: 'Update cypress-cloud config\n', sha: 'e6d94b714ed18612b238d46252eca75a75161ed1' }, group: undefined, platform: { osName: 'darwin', osVersion: '22.5.0', osCpus: [Array], osMemory: [Object], browserName: 'Chrome', browserVersion: '114.0.5735.106' }, parallel: true, ciBuildId: '--env', projectId: 'xxx', recordKey: 'XXX', specPattern: [ './cypress/integration/**/*.feature' ], tags: [], testingType: 'e2e', batchSize: 3, autoCancelAfterFailures: undefined } } +0ms WARNING Record key is invalid. Please visit https://app.currents.dev to see the valid record keys. ERROR Request failed with status code 422 ```
agoldis commented 1 year ago

@samixchoumi here's an example output from 1.8.0-beta.5

DEBUG=currents:* CURRENTS_API_URL=http://localhost:1234/ yarn cypress-cloud run --parallel --record --key Fgt2j7QCjNedC2zG --ci-build-id xxx

Please try rerunning with the new version

  currents:capture capturing stdout +0ms
  currents:cli parsed CLI flags { component: false, e2e: true, parallel: true, record: true, headed: false, key: 'Fgt2j7QCjNedC2zG', ciBuildId: '1686734062' } +0ms
  currents:cli parsed run params: { parallel: true, record: true, headed: false, key: 'Fgt2j7QCjNedC2zG', ciBuildId: '1686734062', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'Fgt2j7QCjNedC2zG' } +1ms
  currents:run run params { parallel: true, record: true, headed: false, key: 'Fgt2j7QCjNedC2zG', ciBuildId: '1686734062', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'Fgt2j7QCjNedC2zG' } +0ms
  currents:run params after preprocess { parallel: true, record: true, headed: false, key: 'Fgt2j7QCjNedC2zG', ciBuildId: '1686734062', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'Fgt2j7QCjNedC2zG', spec: undefined } +0ms
  currents:config loading currents config file from '/Users/agoldis/cypress-cloud/e2e/config-noesm-js/currents.config.js' +0ms
  currents:config loaded currents config from '/Users/agoldis/cypress-cloud/e2e/config-noesm-js/currents.config.js'
  currents:config {
  currents:config   e2e: { batchSize: 3 },
  currents:config   component: { batchSize: 5 },
  currents:config   projectId: 'l4zuz8'
  currents:config } +9ms
  currents:validateParams resolving currents params: { parallel: true, record: true, headed: false, key: 'Fgt2j7QCjNedC2zG', ciBuildId: '1686734062', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'Fgt2j7QCjNedC2zG', spec: undefined } +0ms
  currents:validateParams resolving currents config file: { e2e: { batchSize: 3 }, component: { batchSize: 5 }, projectId: 'l4zuz8' } +0ms
  currents:validateParams validating currents params: { parallel: true, record: true, headed: false, key: 'Fgt2j7QCjNedC2zG', ciBuildId: '1686734062', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'Fgt2j7QCjNedC2zG', spec: undefined, cloudServiceUrl: 'http://localhost:1234/', projectId: 'l4zuz8', batchSize: 3 } +0ms
  currents:validateParams validated currents params: { parallel: true, record: true, headed: false, key: 'Fgt2j7QCjNedC2zG', ciBuildId: '1686734062', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'Fgt2j7QCjNedC2zG', spec: undefined, cloudServiceUrl: 'http://localhost:1234/', projectId: 'l4zuz8', batchSize: 3, tag: [], autoCancelAfterFailures: undefined } +0ms
  currents:config resolving cypress config +0ms
  currents:boot booting cypress... +0ms
samixchoumi commented 1 year ago

Thanks @agoldis for your answer. I updated the version to the beta and added CURRENTS_API_URL to my command (because it seem that the currents.config.js file doesn't work for me as you can see below. My command looks like that now : CURRENTS_PROJECT_ID=xxx CURRENTS_RECORD_KEY=yyy CURRENTS_API_URL=https://localhost:1234/ DEBUG=currents:*,cypress:* npx cypress-cloud run --record --key yyy --parallel --ci-build-id $CI_PIPELINE_ID --env allure=true,configFile=dev --browser chrome

What I got now by adding the currents api url on the CLI is that :

currents:capture capturing stdout +0ms
  cypress:cli exporting Cypress module interface +0ms
  currents:cli parsed CLI flags { component: false, e2e: true, parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome' } +0ms
  currents:cli parsed run params: { parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'yyy' } +1ms
  currents:run run params { parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'yyy' } +0ms
  currents:run params after preprocess { parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'yyy', spec: undefined } +0ms
  currents:config loading currents config file from '/Users/samixchoumi/IdeaProjects/projectName/currents.config.js' +0ms
  currents:config failed loading config file from: ReferenceError: module is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/Users/samixchoumi/IdeaProjects/projectName/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
    at file:///Users/samixchoumi/IdeaProjects/projectName/currents.config.js:2:1
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at ESMLoader.import (node:internal/modules/esm/loader:530:24)
    at importModuleDynamicallyWrapper (node:internal/vm/module:438:15)
    at loadConfigFile (/Users/samixchoumi/IdeaProjects/projectName/node_modules/lib/config/config.ts:69:22)
    at getCurrentsConfig (/Users/samixchoumi/IdeaProjects/projectName/node_modules/lib/config/config.ts:46:26)
    at resolveCurrentsParams (/Users/samixchoumi/IdeaProjects/projectName/node_modules/lib/config/params.ts:16:26)
    at validateParams (/Users/samixchoumi/IdeaProjects/projectName/node_modules/lib/config/params.ts:76:18)
    at run (/Users/samixchoumi/IdeaProjects/projectName/node_modules/lib/run.ts:47:27) +4ms
  currents:config loading currents config file from '/Users/samixchoumi/IdeaProjects/projectName/currents.config.cjs' +19ms
  currents:config failed loading config file from: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/samixchoumi/IdeaProjects/projectName/currents.config.cjs' imported from /Users/samixchoumi/IdeaProjects/projectName/node_modules/cypress-cloud/bin/cli.js +0ms
  currents:config loading currents config file from '/Users/samixchoumi/IdeaProjects/projectName/currents.config.mjs' +0ms
  currents:config failed loading config file from: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/samixchoumi/IdeaProjects/projectName/currents.config.mjs' imported from /Users/samixchoumi/IdeaProjects/projectName/node_modules/cypress-cloud/bin/cli.js +1ms
 WARNING  Failed to load config file, falling back to the default config. Attempted locations: [
  '/Users/samixchoumi/IdeaProjects/projectName/currents.config.js',
  '/Users/samixchoumi/IdeaProjects/projectName/currents.config.cjs',
  '/Users/samixchoumi/IdeaProjects/projectName/currents.config.mjs'
]
  currents:validateParams resolving currents params: { parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'yyy', spec: undefined } +0ms
  currents:validateParams resolving currents config file: { e2e: { batchSize: 3 }, component: { batchSize: 5 }, cloudServiceUrl: 'https://cy.currents.dev' } +0ms
  currents:validateParams validating currents params: { parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'yyy', spec: undefined, cloudServiceUrl: 'https://localhost:1234/', projectId: 'xxx', batchSize: 3 } +0ms
  currents:validateParams validated currents params: { parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'yyy', spec: undefined, cloudServiceUrl: 'https://localhost:1234/', projectId: 'xxx', batchSize: 3, tag: [], autoCancelAfterFailures: undefined } +1ms
  currents:config resolving cypress config +2ms
  currents:boot booting cypress... +0ms
...
[lot of line]
...
Discovered 1 spec files
Tags: false; Group: false; Parallel: true; Batch Size: 3
Connecting to cloud orchestration service...
  currents:ci detected CI provider: null +0ms
  currents:ci detected CI params: {} +0ms
  currents:ci git commit existing info +30ms
  currents:ci {
  currents:ci   branch: 'feature/update_sorry_cypress_to_cypress-cloud',
  currents:ci   remoteOrigin: 'git@gitlab.com:project/qat/projectName.git',
  currents:ci   authorEmail: 'samixchoumi@mail.com',
  currents:ci   authorName: 'samixchoumi',
  currents:ci   message: 'Update cypress-cloud config\n',
  currents:ci   sha: '73ca7974b08a93953bd176668f49e7bb303c30da'
  currents:ci } +0ms
  currents:ci commit info from provider environment variables: {} +0ms
  currents:ci combined git and environment variables from provider +0ms
  currents:ci {
  currents:ci   branch: 'feature/update_sorry_cypress_to_cypress-cloud',
  currents:ci   remoteOrigin: 'git@gitlab.com:project/qat/projectName.git',
  currents:ci   authorEmail: 'samixchoumi@mail.com',
  currents:ci   authorName: 'samixchoumi',
  currents:ci   message: 'Update cypress-cloud config\n',
  currents:ci   sha: '73ca7974b08a93953bd176668f49e7bb303c30da'
  currents:ci } +0ms
  currents:api network request: { method: 'post', url: '/runs', headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json', 'x-cypress-request-attempt': 0, 'x-cypress-version': '12.13.0', 'x-ccy-version': '1.8.0-beta.5' }, data: { ci: { params: {}, provider: null }, specs: [ 'cypress/integration/Spec/AScenario.feature' ], commit: { branch: 'feature/update_sorry_cypress_to_cypress-cloud', remoteOrigin: 'git@gitlab.com:project/qat/projectName.git', authorEmail: 'samixchoumi@mail.com', authorName: 'samixchoumi', message: 'Update cypress-cloud config\n', sha: '73ca7974b08a93953bd176668f49e7bb303c30da' }, group: undefined, platform: { osName: 'darwin', osVersion: '22.5.0', osCpus: [Array], osMemory: [Object], browserName: 'Chrome', browserVersion: '114.0.5735.106' }, parallel: true, ciBuildId: '--env', projectId: 'xxx', recordKey: 'yyy', specPattern: [ './cypress/integration/**/*.feature' ], tags: [], testingType: 'e2e', batchSize: 3, autoCancelAfterFailures: undefined } } +0ms
 ERROR  write EPROTO 009E35EB01000000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:
agoldis commented 1 year ago

@samixchoumi You're using ESM, but the syntax of currents.config.js is CJS-like - e.g. the use of module keyword.

currents:config failed loading config file from: ReferenceError: **module** is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/Users/samixchoumi/IdeaProjects/projectName/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
   ....

cypress-cloud will search for a configuration file at the project's root location (defined with -P --project CLI option) in the following order:

Please make sure that the file is formatted according to ESM syntax.

samixchoumi commented 1 year ago

Hello @agoldis, hope you're fine. So I updated it like that :

export const projectId = 'yyy';
export const recordKey = 'xxx';
// Sorry Cypress users - set the director service URL
export const cloudServiceUrl = 'https://localhost:1234/';

(Maybe add this example for ESM syntax cases on the README ?) I launch the command like that : DEBUG=currents:*,cypress:* npx cypress-cloud run --record --key yyy --parallel --ci-build-id $CI_PIPELINE_ID --env allure=true,configFile=dev --browser chrome It seem to work better but their is an error when booting :

currents:capture capturing stdout +0ms
  cypress:cli exporting Cypress module interface +0ms
  currents:cli parsed CLI flags { component: false, e2e: true, parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome' } +0ms
  currents:cli parsed run params: { parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'yyy' } +1ms
  currents:run run params { parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'yyy' } +0ms
  currents:run params after preprocess { parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'yyy', spec: undefined } +0ms
  currents:config loading currents config file from '/Users/samixchoumi/IdeaProjects/projectName/currents.config.js' +0ms
  currents:config loaded currents config from '/Users/samixchoumi/IdeaProjects/projectName/currents.config.js'
  currents:config {
  currents:config   e2e: { batchSize: 3 },
  currents:config   component: { batchSize: 5 },
  currents:config   cloudServiceUrl: 'https://localhost:1234/',
  currents:config   projectId: 'yyy',
  currents:config   recordKey: 'xxx'
  currents:config } +3ms
  currents:validateParams resolving currents params: { parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'yyy', spec: undefined } +0ms
  currents:validateParams resolving currents config file: { e2e: { batchSize: 3 }, component: { batchSize: 5 }, cloudServiceUrl: 'https://localhost:1234/', projectId: 'yyy', recordKey: 'xxx' } +0ms
  currents:validateParams validating currents params: { parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'yyy', spec: undefined, cloudServiceUrl: 'https://localhost:1234/', projectId: 'yyy', batchSize: 3 } +0ms
  currents:validateParams validated currents params: { parallel: true, record: true, headed: false, key: 'yyy', ciBuildId: '--env', browser: 'chrome', config: undefined, env: undefined, reporterOptions: undefined, testingType: 'e2e', recordKey: 'yyy', spec: undefined, cloudServiceUrl: 'https://localhost:1234/', projectId: 'yyy', batchSize: 3, tag: [], autoCancelAfterFailures: undefined } +0ms
  currents:config resolving cypress config +1ms
  currents:boot booting cypress... +0ms
  currents:boot cypress executable location: /Users/samixchoumi/IdeaProjects/projectName/node_modules/cypress/bin/cypress +1ms
  currents:boot cypress bootstrap params: { browser: 'chrome', record: false, env: { currents_temp_file: '/var/folders/jx/0hb5g7z5519027xtjtdd7r2w0000gp/T/tmp-20114-7qhYYdbHtPQF', currents_debug_enabled: true } } +0ms
  currents:boot cypress bootstrap serialized params: [ '--browser', 'chrome', '--record', false, '--env', '{"currents_temp_file":"/var/folders/jx/0hb5g7z5519027xtjtdd7r2w0000gp/T/tmp-20114-7qhYYdbHtPQF","currents_debug_enabled":true}' ] +0ms
  currents:boot booting cypress with args: [ '--browser', 'chrome', '--record', false, '--env', '{"currents_temp_file":"/var/folders/jx/0hb5g7z5519027xtjtdd7r2w0000gp/T/tmp-20114-7qhYYdbHtPQF","currents_debug_enabled":true}', '--spec', 'iossipxjlm', '--e2e' ] +1ms
  currents:boot exec cypress failed (certain failures are expected): Error: Command failed with exit code 1: /Users/samixchoumi/IdeaProjects/projectName/node_modules/cypress/bin/cypress run --browser chrome --record false --env {"currents_temp_file":"/var/folders/jx/0hb5g7z5519027xtjtdd7r2w0000gp/T/tmp-20114-7qhYYdbHtPQF","currents_debug_enabled":true} --spec iossipxjlm --e2e 2023-06-15T09:12:55.878Z cypress:cli:cli cli starts with arguments
...
[some line]

And looking at the end of the line, i have that :

cypress:server:cypress exiting with err Error: Can't run because no spec files were found.  We searched for specs matching this glob pattern:  > /Users/samixchoumi/IdeaProjects/projectName/iossipxjlm at H (<embedded>:4696:527392) at process.processTicksAndRejections (node:internal/process/task_queues:96:5) { isCypressErr: true, type: 'NO_SPECS_FOUND', details: undefined, messageMarkdown: "Can't run because `no spec files` were found.\n" + '\n' + 'We searched for specs matching this glob pattern:\n' + '\n' + '  > /Users/samixchoumi/IdeaProjects/projectName/iossipxjlm', originalError: undefined, stackWithoutMessage: '    at H (<embedded>:4696:527392)\n' + '    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)' } 2023-06-15T09:12:57.638Z cypress:server:cypress calling exit 1 2023-06-15T09:12:57.638Z cypress:server:cypress about to exit with code 1 2023-06-15T09:12:57.639Z cypress:server:browsers browsers.kill called with no active instance 2023-06-15T09:12:57.639Z cypress:proxy:http:util:prerequests metrics: { browserPreRequestsReceived: 0, proxyRequestsReceived: 0, immediatelyMatchedRequests: 0, unmatchedRequests: 0, unmatchedPreRequests: 0 } 2023-06-15T09:12:57.654Z cypress:cli child event fired { event: 'exit', code: 1, signal: null } [currents:plugin] currents plugin loaded [currents:plugin] dumping config to '/var/folders/jx/0hb5g7z5519027xtjtdd7r2w0000gp/T/tmp-20114-7qhYYdbHtPQF' [currents:plugin] config is availabe at '/var/folders/jx/0hb5g7z5519027xtjtdd7r2w0000gp/T/tmp-20114-7qhYYdbHtPQF' Can't run because no spec files were found.  We searched for specs matching this glob pattern:  > /Users/samixchoumi/IdeaProjects/projectName/iossipxjlm at makeError (/Users/samixchoumi/IdeaProjects/projectName/node_modules/cypress-cloud/node_modules/execa/lib/error.js:60:11) at handlePromise (/Users/samixchoumi/IdeaProjects/projectName/node_modules/cypress-cloud/node_modules/execa/index.js:118:26)     at processTicksAndRejections (node:internal/process/task_queues:95:5) at execCypress (/Users/samixchoumi/IdeaProjects/projectName/node_modules/lib/bootstrap/bootstrap.ts:54:5) at bootCypress (/Users/samixchoumi/IdeaProjects/projectName/node_modules/lib/bootstrap/bootstrap.ts:24:30) at getMergedConfig (/Users/samixchoumi/IdeaProjects/projectName/node_modules/lib/config/config.ts:94:19) at run (/Users/samixchoumi/IdeaProjects/projectName/node_modules/lib/run.ts:62:18)

I don't understand where iossipxjlm come from.

And finally, at the end of the command, I got this again :

  currents:api network request: { method: 'post', url: '/runs', headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json', 'x-cypress-request-attempt': 0, 'x-cypress-version': '12.13.0', 'x-ccy-version': '1.8.0-beta.5' }, data: { ci: { params: {}, provider: null }, specs: [ 'cypress/integration/Spec/AScenario.feature', ], commit: { branch: 'feature/update_sorry_cypress_to_cypress-cloud', remoteOrigin: 'git@gitlab.com:project/qat/projectName.git', authorEmail: 'samixchoumi@mail.com', authorName: 'samixchoumi', message: "Merge branch 'master' into feature/update_sorry_cypress_to_cypress-cloud\n", sha: '49eae51fb0ceb3d369bbe8f450df1e87c7c006fb' }, group: undefined, platform: { osName: 'darwin', osVersion: '22.5.0', osCpus: [Array], osMemory: [Object], browserName: 'Chrome', browserVersion: '114.0.5735.106' }, parallel: true, ciBuildId: '--env', projectId: 'yyy', recordKey: 'yyy', specPattern: [ './cypress/integration/**/*.feature' ], tags: [], testingType: 'e2e', batchSize: 3, autoCancelAfterFailures: undefined } } +0ms

 ERROR  write EPROTO 001E4CFB01000000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:
samixchoumi commented 1 year ago

Found the error, changed the export const cloudServiceUrl = 'https://localhost:1234/'; to export const cloudServiceUrl = 'http://localhost:1234/'; It seem to work properly in local.

I will test using with GitLabCI

UPDATE : It works very fine (and the reporting is way better) ! Thanks.