cypress-io / cypress

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

Allow disabling DOM snapshots for network request #25466

Open shwarcu opened 1 year ago

shwarcu commented 1 year ago

What would you like?

I would like to be able to disable DOM snapshots for network requests. Or even disable DOM snapshots for specific network requests by specifying domain or pathname. In the case I am working with I have a lot of network requests that cause Cypress to take enormous amount of snapshots, each snapshot taking takes ~56 milliseconds and causing performance problems. Significant part of taking snapshot is execution of function replaceIframes - 45.36 ms in my case.

Big picture - almost all "purple" blocks are event emitter calls that later down trigger snapshots image

Closer view at some of such calls Screenshot from 2023-01-14 12-51-19

replaceIframes image

It would be great to have available option in Cypress config that would allow setting following behaviours for snapshots

snapshotsOnRequest: 'always' | 'never' | 'onFailure'

Why is this needed?

I would like to improve performance when running cypress open. Also I would like to prevent browser tab from constantly crashing when there are too many snapshots.

Other

I know that option numTestsKeptInMemory exists but it don't want to disable snapshots completely or hold last 10 snapshots - they will be quickly overwritten by requests that are fired by application. I would like to keep DOM snapshots but skip making them for network requests.

shwarcu commented 1 year ago

I'm trying to improve replaceIframes with memoization so that placeholder is not created multiple times for the same iframe. https://github.com/shwarcu/cypress/commit/c01ea25d65f3bc647036cb14ddd0cc4d2f64f382 but running Cypress from source on a windows machine seems to be nearly impossible, this stops me from actually testing my changes 😭 iframe dimensions probably could be memoized too?

lmiller1990 commented 1 year ago

I am able to run Cypress from source on a windows machine. It's very slow to develop on windows, not sure if it's just my setup or something else.

In run mode (what you use on CI, like npx cypress run I don't think we take snapshots (since it's not really useful there). Taking a look at that code path might be of interest to you.

There is some work going on to improve perf specifically in Chrome around memory usage, so if it's just a memory issue, it's possible this will be addressed soon (during Q1).

If there is some low-hanging optimizations using memoization, that'd be great! What issue are you running into when running Cypress locally? You should be able to do

  1. yarn install
  2. yarn dev

And that should be it - ready to go.


If you are happy to just hack something in without modifying Cypress from source, it might be possible to do so. I had a look around, I noticed a few things in packages/driver:

All queries have a snapshot flag:

  // presses a key or clicks in the UI to continue
  Commands.addQuery('pause', function pause (options: Partial<Cypress.Loggable> = {}) {
    if (!config('isInteractive') && (!config('browser').isHeaded || config('exit'))) {
      return _.identity
    }

    const log = options.log !== false && Cypress.log({
      snapshot: true, // <========= here
      autoEnd: false,
      timeout: 0,
    })
   // ...
})

I wonder if there is some way to override this using a custom command, that does the same thing without a snapshot. Or, can you override Cypress.log and change how that works? Cypress is available globally.

I also saw

https://github.com/cypress-io/cypress/blob/0d4819913224537e04300a3d644fb02c7ca31e86/packages/driver/src/cy/snapshots.ts#L230-L231

I wonder if there is a way to override Cypress.action('cy:snapshot', name) somehow.

Alternatively, I wonder if you can intercept the cy:snapshot event: https://github.com/cypress-io/cypress/blob/develop/packages/driver/src/cypress.ts#L643-L644

All of these are more or less hacks, but would let you do what you want without forking/requiring a patch to Cypress (which can be a longer process, since adding a feature requires more maintenance, docs, etc).

shwarcu commented 1 year ago

Thanks a lot for the message. I will tinker around in my spare time and will try to see if any memoization or disabling snapshots is going to improve performance 🤓

I managed to run Cypress locally on a MBP with M1. But on windows 10 I keep getting errors from postinstall script.

I have node v18.13.0 and yarn 1.22.19 so in theory I meet requirements

  "engines": {
    "node": ">=16.16.0",
    "yarn": ">=1.17.3"
  },
Warning, long log :) ```log $ yarn install yarn install v1.22.19 [1/5] Validating package.json... [2/5] Resolving packages... warning Resolution field "pretty-format@26.4.0" is incompatible with requested version "pretty-format@^24.9.0" warning Resolution field "pretty-format@26.4.0" is incompatible with requested version "pretty-format@^24.9.0" warning Resolution field "pretty-format@26.4.0" is incompatible with requested version "pretty-format@^24.9.0" warning Resolution field "pretty-format@26.4.0" is incompatible with requested version "pretty-format@^24.9.0" warning Resolution field "pretty-format@26.4.0" is incompatible with requested version "pretty-format@^24.9.0" warning Resolution field "pretty-format@26.4.0" is incompatible with requested version "pretty-format@^24.9.0" warning Resolution field "pretty-format@26.4.0" is incompatible with requested version "pretty-format@^24.9.0" warning Resolution field "pretty-format@26.4.0" is incompatible with requested version "pretty-format@^24.9.0" warning Resolution field "@typescript-eslint/eslint-plugin@4.18.0" is incompatible with requested version "@typescript-eslint/eslint-plugin@^2.2.0" warning Resolution field "pretty-format@26.4.0" is incompatible with requested version "pretty-format@^27.0.2" [3/5] Fetching packages... warning Pattern ["@definitelytyped/typescript-versions@latest"] is trying to unpack in the same destination "C:\\Users\\macie\\AppData\\Local\\Yarn\\Cache\\v6\\npm-@definitelytyped-typescript-versions-0.0.71-08c791e3bf3c2861611edee8f28c72d2db0fb02e-integrity\\node_modules\\@definitelytyped\\typescript-versions" as pattern ["@definitelytyped/typescript-versions@^0.0.71","@definitelytyped/typescript-versions@^0.0.71","@definitelytyped/typescript-versions@^0.0.71"]. This could result in non-deterministic behavior, skipping. [4/5] Linking dependencies... warning "@cypress/request-promise > request-promise-core@1.1.3" has unmet peer dependency "request@^2.34". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/helper-compilation-targets@7.20.0" has unmet peer dependency "@babel/core@^7.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-syntax-class-properties@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-syntax-object-rest-spread@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-arrow-functions@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-block-scoped-functions@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-block-scoping@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-classes@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-computed-properties@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-destructuring@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-for-of@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-function-name@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-literals@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-member-expression-literals@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-modules-commonjs@7.16.8" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-object-super@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-parameters@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-property-literals@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-shorthand-properties@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-spread@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-template-literals@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning " > @graphql-codegen/typescript-urql-graphcache@2.2.3" has unmet peer dependency "@urql/exchange-graphcache@^4.1.1". warning " > @graphql-codegen/typescript-urql-graphcache@2.2.3" has unmet peer dependency "graphql-tag@^2.0.0". warning " > @semantic-release/changelog@5.0.1" has incorrect peer dependency "semantic-release@>=15.8.0 <18.0.0". warning " > @semantic-release/git@9.0.0" has incorrect peer dependency "semantic-release@>=16.0.0 <18.0.0". warning " > enzyme-adapter-react-16@1.12.1" has unmet peer dependency "enzyme@^3.0.0". warning " > enzyme-adapter-react-16@1.12.1" has unmet peer dependency "react@^16.0.0-0". warning " > enzyme-adapter-react-16@1.12.1" has unmet peer dependency "react-dom@^16.0.0-0". warning "enzyme-adapter-react-16 > enzyme-adapter-utils@1.14.0" has unmet peer dependency "react@0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0". warning "enzyme-adapter-react-16 > react-test-renderer@16.14.0" has unmet peer dependency "react@^16.14.0". warning "enzyme-adapter-react-16 > enzyme-adapter-utils > airbnb-prop-types@2.16.0" has unmet peer dependency "react@^0.14 || ^15.0.0 || ^16.0.0-alpha". warning " > listr2@3.8.3" has unmet peer dependency "enquirer@>= 2.3.0 < 3". warning " > @cypress/angular@0.0.0-development" has unmet peer dependency "@angular/common@>=13". warning " > @cypress/angular@0.0.0-development" has unmet peer dependency "@angular/core@>=13". warning " > @cypress/angular@0.0.0-development" has unmet peer dependency "@angular/platform-browser-dynamic@>=13". warning " > @cypress/angular@0.0.0-development" has unmet peer dependency "zone.js@>=0.11.0". warning " > @cypress/schematic@0.0.0-development" has unmet peer dependency "@angular/cli@>=12". warning " > @cypress/schematic@0.0.0-development" has unmet peer dependency "@angular/core@>=12". warning " > @cypress/eslint-plugin-dev@0.0.0-development" has incorrect peer dependency "babel-eslint@^7.2.3". warning " > @cypress/eslint-plugin-dev@0.0.0-development" has incorrect peer dependency "eslint-plugin-mocha@^4.11.0". warning " > @cypress/grep@0.0.0-development" has incorrect peer dependency "cypress@>=10". warning " > @cypress/react@0.0.0-development" has unmet peer dependency "react@^=16.x || ^=17.x". warning " > @cypress/react@0.0.0-development" has unmet peer dependency "react-dom@^=16.x || ^=17.x". warning " > @cypress/react18@0.0.0-development" has incorrect peer dependency "@types/react-dom@^18". warning " > @cypress/react18@0.0.0-development" has unmet peer dependency "react@^18". warning " > @cypress/react18@0.0.0-development" has unmet peer dependency "react-dom@^18". warning " > @cypress/svelte@0.0.0-development" has incorrect peer dependency "cypress@>=10.6.0". warning " > @cypress/svelte@0.0.0-development" has unmet peer dependency "svelte@>=3.0.0". warning " > @cypress/vue@0.0.0-development" has incorrect peer dependency "cypress@>=7.0.0". warning " > @cypress/vue@0.0.0-development" has unmet peer dependency "vue@>=3.0.0". warning " > @cypress/vue2@0.0.0-development" has incorrect peer dependency "cypress@>=4.5.0". warning " > @cypress/vue2@0.0.0-development" has unmet peer dependency "vue@^2.0.0". warning " > @cypress/webpack-batteries-included-preprocessor@0.0.0-development" has incorrect peer dependency "@cypress/webpack-preprocessor@^5.4.4". warning " > @cypress/webpack-preprocessor@0.0.0-development" has unmet peer dependency "@babel/core@^7.0.1". warning " > @cypress/webpack-preprocessor@0.0.0-development" has unmet peer dependency "@babel/preset-env@^7.0.0". warning " > @cypress/webpack-preprocessor@0.0.0-development" has unmet peer dependency "babel-loader@^8.0.2". warning " > @cypress/webpack-preprocessor@0.0.0-development" has unmet peer dependency "webpack@^4 || ^5". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/cli@7.13.0" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env@7.13.5" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/app > @intlify/vite-plugin-vue-i18n@2.4.0" has incorrect peer dependency "vite@^2.3.6". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/app > @percy/cypress@3.1.1" has incorrect peer dependency "cypress@>=3". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/launchpad > @testing-library/cypress@0.0.0-semantically-released" has incorrect peer dependency "cypress@^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/app > @vitejs/plugin-legacy@2.1.0" has unmet peer dependency "terser@^5.4.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/app > @vitejs/plugin-legacy@2.1.0" has incorrect peer dependency "vite@^3.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/app > @vitejs/plugin-vue@2.2.4" has incorrect peer dependency "vite@^2.5.10". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/app > cypress-real-events@1.6.0" has incorrect peer dependency "cypress@^4.x || ^5.x || ^6.x || ^7.x || ^8.x || ^9.x". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/app > vite-plugin-components@0.11.3" has incorrect peer dependency "vite@^2.0.0-beta.69". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/app > vite-plugin-vue-layouts@0.6.0" has incorrect peer dependency "vite@^2.5.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/driver > react-dom-15.6.1@15.6.1" has unmet peer dependency "react@^15.6.1". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/driver > react-dom-16.0.0@16.0.0" has unmet peer dependency "react@^16.0.0-beta.5". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/frontend-shared > cypress-axe@0.14.0" has incorrect peer dependency "cypress@^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/frontend-shared > graphql-relay@0.9.0" has incorrect peer dependency "graphql@^15.5.3". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/launchpad > vite-plugin-optimize-persist@0.0.5" has incorrect peer dependency "vite@^2.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/launchpad > vite-plugin-package-config@0.0.3" has incorrect peer dependency "vite@^2.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/runner > babel-plugin-prismjs@1.0.2" has unmet peer dependency "prismjs@^1.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/server > bundle-require@3.0.4" has unmet peer dependency "esbuild@>=0.13". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @cypress/angular > @angular/common@14.2.0" has unmet peer dependency "rxjs@^6.5.3 || ^7.4.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @cypress/angular > @angular/core@14.2.0" has unmet peer dependency "rxjs@^6.5.3 || ^7.4.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @cypress/angular > @angular/platform-browser-dynamic@14.2.0" has unmet peer dependency "@angular/compiler@14.2.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @cypress/angular > @angular/platform-browser-dynamic@14.2.0" has unmet peer dependency "@angular/platform-browser@14.2.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @cypress/grep > cypress-expect@2.5.3" has incorrect peer dependency "cypress@>=5.3.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @cypress/mount-utils > @rollup/plugin-commonjs@17.1.0" has incorrect peer dependency "rollup@^2.30.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @cypress/mount-utils > @rollup/plugin-node-resolve@11.2.1" has incorrect peer dependency "rollup@^1.20.0||^2.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @cypress/vite-dev-server > vite-plugin-inspect@0.4.3" has incorrect peer dependency "vite@^2.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @cypress/vue > @vitejs/plugin-vue@2.3.1" has incorrect peer dependency "vite@^2.5.10". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @cypress/vue2 > @rollup/plugin-json@4.1.0" has unmet peer dependency "rollup@^1.20.0 || ^2.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @cypress/vue2 > @rollup/plugin-replace@2.4.2" has unmet peer dependency "rollup@^1.20.0 || ^2.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-proposal-async-generator-functions@7.16.8" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-proposal-dynamic-import@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-proposal-export-namespace-from@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-proposal-json-strings@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-proposal-logical-assignment-operators@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-proposal-nullish-coalescing-operator@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-proposal-numeric-separator@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-proposal-optional-catch-binding@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-proposal-optional-chaining@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-proposal-private-methods@7.16.11" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-proposal-unicode-property-regex@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-syntax-async-generators@7.8.4" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-syntax-dynamic-import@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-syntax-export-namespace-from@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-syntax-json-strings@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-syntax-logical-assignment-operators@7.10.4" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-syntax-nullish-coalescing-operator@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-syntax-numeric-separator@7.10.4" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-syntax-optional-catch-binding@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-syntax-optional-chaining@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-syntax-top-level-await@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-async-to-generator@7.16.8" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-dotall-regex@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-duplicate-keys@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-exponentiation-operator@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-modules-amd@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-modules-systemjs@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-modules-umd@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-named-capturing-groups-regex@7.16.8" has unmet peer dependency "@babel/core@^7.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-new-target@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-regenerator@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-reserved-words@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-sticky-regex@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-typeof-symbol@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-unicode-escapes@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-transform-unicode-regex@7.16.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/preset-modules@0.1.5" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > babel-plugin-polyfill-corejs2@0.1.10" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > babel-plugin-polyfill-corejs3@0.1.7" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > babel-plugin-polyfill-regenerator@0.1.6" has unmet peer dependency "@babel/core@^7.0.0-0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/app > rollup-plugin-polyfill-node > @rollup/plugin-inject@4.0.2" has unmet peer dependency "rollup@^1.20.0 || ^2.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @packages/frontend-shared > @cypress-design/css > vite-plugin-windicss@1.8.4" has incorrect peer dependency "vite@^2.0.1". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @cypress/mount-utils > @rollup/plugin-commonjs > @rollup/pluginutils@3.1.0" has incorrect peer dependency "rollup@^1.20.0||^2.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > @cypress/webpack-preprocessor > react-scripts > eslint-config-react-app@5.2.1" has incorrect peer dependency "@typescript-eslint/eslint-plugin@2.x". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > @babel/plugin-proposal-unicode-property-regex > @babel/helper-create-regexp-features-plugin@7.17.0" has unmet peer dependency "@babel/core@^7.0.0". warning "workspace-aggregator-d159c00a-74a2-4e76-8a0d-da9464682f00 > cypress > @babel/preset-env > babel-plugin-polyfill-corejs2 > @babel/helper-define-polyfill-provider@0.1.5" has unmet peer dependency "@babel/core@^7.4.0-0". warning Workspaces can only be enabled in private projects. [5/5] Building fresh packages... [-/34] ⡀ waiting... [-/34] ⡀ waiting... [6/34] ⡀ postinstall-postinstall [-/34] ⢀ waiting... error C:\Users\macie\workspace\cypress\node_modules\postinstall-postinstall: Command failed. Exit code: 1 Command: node ./run.js Arguments: Directory: C:\Users\macie\workspace\cypress\node_modules\postinstall-postinstall Output: lerna notice cli v3.22.1 lerna info Executing command in 23 packages: "yarn run clean" @packages/data-context: warning package.json: No license field @packages/errors: warning package.json: No license field @packages/scaffold-config: warning package.json: No license field lerna success run Ran npm script 'clean' in 23 packages in 4.1s: lerna success - cypress lerna success - @cypress/webpack-dev-server lerna success - @packages/app lerna success - @packages/config lerna success - @packages/data-context lerna success - @packages/errors lerna success - @packages/extension lerna success - @packages/frontend-shared lerna success - @packages/graphql lerna success - @packages/launcher lerna success - @packages/launchpad lerna success - @packages/network lerna success - @packages/packherd-require lerna success - @packages/proxy lerna success - @packages/resolve-dist lerna success - @packages/rewriter lerna success - @packages/scaffold-config lerna success - @packages/socket lerna success - @packages/types lerna success - @packages/v8-snapshot-require lerna success - @tooling/electron-mksnapshot lerna success - @tooling/packherd lerna success - @tooling/v8-snapshot Error: Command failed: taskkill /pid 2016 /T /F ERROR: The process "2016" not found. at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:513:28) at ChildProcess.emit (node:domain:552:15) at maybeClose (node:internal/child_process:1091:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { code: 128, killed: false, signal: null, cmd: 'taskkill /pid 2016 /T /F' } Error: Command failed: taskkill /pid 18012 /T /F ERROR: The process "18012" not found. at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:513:28) at ChildProcess.emit (node:domain:552:15) at maybeClose (node:internal/child_process:1091:16) at Socket. (node:internal/child_process:449:11) at Socket.emit (node:events:513:28) at Socket.emit (node:domain:552:15) at Pipe. (node:net:320:12) at Pipe.callbackTrampoline (node:internal/async_hooks:130:17) { code: 128, killed: false, signal: null, cmd: 'taskkill /pid 18012 /T /F' } Error: Command failed: taskkill /pid 5488 /T /F ERROR: The process "5488" not found. at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:513:28) at ChildProcess.emit (node:domain:552:15) at maybeClose (node:internal/child_process:1091:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { code: 128, killed: false, signal: null, cmd: 'taskkill /pid 5488 /T /F' } Error: Command failed: taskkill /pid 14780 /T /F ERROR: The process "14780" not found. at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:513:28) at ChildProcess.emit (node:domain:552:15) at maybeClose (node:internal/child_process:1091:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { code: 128, killed: false, signal: null, cmd: 'taskkill /pid 14780 /T /F' } Error: Command failed: taskkill /pid 11356 /T /F ERROR: The process "11356" not found. at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:513:28) at ChildProcess.emit (node:domain:552:15) at maybeClose (node:internal/child_process:1091:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { code: 128, killed: false, signal: null, cmd: 'taskkill /pid 11356 /T /F' } [vite:build-app:12876]: Use of eval in "../../node_modules/bluebird/js/browser/bluebird.js" is strongly discouraged as it poses security risks and may cause issues with minification. [vite:build-app:12876]: [BABEL] Note: The code generator has deoptimised the styling of undefined as it exceeds the max of 500KB. Error: Command failed: taskkill /pid 12876 /T /F ERROR: The process "12876" not found. at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:513:28) at ChildProcess.emit (node:domain:552:15) at maybeClose (node:internal/child_process:1091:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { code: 128, killed: false, signal: null, cmd: 'taskkill /pid 12876 /T /F' } lerna notice cli v3.22.1 lerna notice filter including ["cypress","@cypress/mount-utils"] lerna info filter [ 'cypress', '@cypress/mount-utils' ] lerna info Executing command in 2 packages: "yarn run build" lerna info run Ran npm script 'build' in '@cypress/mount-utils' in 1.2s: lerna info run Ran npm script 'build' in 'cypress' in 4.3s: lerna success run Ran npm script 'build' in 2 packages in 4.3s: lerna success - cypress lerna success - @cypress/mount-utils lerna notice cli v3.22.1 lerna notice filter including "@cypress/{angular,react,react18,vue,vue2,svelte}" lerna info filter [ '@cypress/{angular,react,react18,vue,vue2,svelte}' ] lerna info Executing command in 6 packages: "yarn run build" lerna info run Ran npm script 'build' in '@cypress/svelte' in 3.4s: lerna info run Ran npm script 'build' in '@cypress/angular' in 3.8s: lerna info run Ran npm script 'build' in '@cypress/react' in 4.4s: lerna info run Ran npm script 'build' in '@cypress/vue' in 5.2s: lerna info run Ran npm script 'build' in '@cypress/vue2' in 5.4s: lerna info run Ran npm script 'build' in '@cypress/react18' in 3.5s: lerna success run Ran npm script 'build' in 6 packages in 7.9s: lerna success - @cypress/angular lerna success - @cypress/react18 lerna success - @cypress/react lerna success - @cypress/svelte lerna success - @cypress/vue2 lerna success - @cypress/vue lerna notice cli v3.22.1 lerna notice filter excluding ["create-cypress-tests","cypress","@packages/{runner}","@cypress/{angular,react,react18,vue,vue2,mount-utils,svelte}"] lerna info filter [ lerna info filter '!create-cypress-tests', lerna info filter '!cypress', lerna info filter '!@packages/{runner}', lerna info filter '!@cypress/{angular,react,react18,vue,vue2,mount-utils,svelte}' lerna info filter ] lerna info Executing command in 15 packages: "yarn run build" @packages/errors: warning package.json: No license field @packages/errors: '..' is not recognized as an internal or external command, @packages/errors: operable program or batch file. @packages/electron: Packaging app for platform win32 x64 using electron v21.0.0 @packages/runner: node:child_process:960 @packages/runner: throw err; @packages/runner: ^ @packages/runner: Error: Command failed: node "C:\Users\macie\workspace\cypress\node_modules\webpack-cli\bin\cli.js" @packages/runner: at checkExecSyncError (node:child_process:885:11) @packages/runner: at Object.execSync (node:child_process:957:15) @packages/runner: at Object. (C:\Users\macie\workspace\cypress\scripts\run-webpack.js:32:4) @packages/runner: at Module._compile (node:internal/modules/cjs/loader:1218:14) @packages/runner: at Module._extensions..js (node:internal/modules/cjs/loader:1272:10) @packages/runner: at Module.load (node:internal/modules/cjs/loader:1081:32) @packages/runner: at Module._load (node:internal/modules/cjs/loader:922:12) @packages/runner: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) @packages/runner: at node:internal/main/run_main_module:23:47 { @packages/runner: status: 2, @packages/runner: signal: null, @packages/runner: output: [ null, null, null ], @packages/runner: pid: 7664, @packages/runner: stdout: null, @packages/runner: stderr: null @packages/runner: } @packages/runner: Node.js v18.13.0 @packages/runner: error Command failed with exit code 1. lerna ERR! Received non-zero exit code 1 during execution lerna success run Ran npm script 'build' in 15 packages in 14.5s: lerna success - @cypress/schematic lerna success - @cypress/vite-dev-server lerna success - @cypress/webpack-dev-server lerna success - @cypress/webpack-preprocessor lerna success - @packages/electron lerna success - @packages/errors lerna success - @packages/example lerna success - @packages/extension lerna success - @packages/icons lerna success - @packages/packherd-require lerna success - @packages/runner lerna success - @packages/v8-snapshot-require lerna success - @tooling/electron-mksnapshot lerna success - @tooling/packherd lerna success - @tooling/v8-snapshot error Command failed with exit code 1. node:child_process:960 throw err; ^ Error: Command failed: patch-package && yarn-deduplicate --strategy=highest && yarn clean && gulp postinstall && yarn build && yarn build-v8-snapshot-dev at checkExecSyncError (node:child_process:885:11) at execSync (node:child_process:957:15) at Object. (C:\Users\macie\workspace\cypress\scripts\run-postInstall.js:10:1) at Module._compile (node:internal/modules/cjs/loader:1218:14) at Module._extensions..js (node:internal/modules/cjs/loader:1272:10) at Module.load (node:internal/modules/cjs/loader:1081:32) at Module._load (node:internal/modules/cjs/loader:922:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 { status: 1, signal: null, output: [ null, null, null ], pid: 6824, stdout: null, stderr: null } Node.js v18.13.0 error Command failed with exit code 1. node:child_process:960 throw err; ^ Error: Command failed: yarn run postinstall lerna notice cli v3.22.1 lerna info Executing command in 23 packages: "yarn run clean" @packages/data-context: warning package.json: No license field @packages/errors: warning package.json: No license field @packages/scaffold-config: warning package.json: No license field lerna success run Ran npm script 'clean' in 23 packages in 4.1s: lerna success - cypress lerna success - @cypress/webpack-dev-server lerna success - @packages/app lerna success - @packages/config lerna success - @packages/data-context lerna success - @packages/errors lerna success - @packages/extension lerna success - @packages/frontend-shared lerna success - @packages/graphql lerna success - @packages/launcher lerna success - @packages/launchpad lerna success - @packages/network lerna success - @packages/packherd-require lerna success - @packages/proxy lerna success - @packages/resolve-dist lerna success - @packages/rewriter lerna success - @packages/scaffold-config lerna success - @packages/socket lerna success - @packages/types lerna success - @packages/v8-snapshot-require lerna success - @tooling/electron-mksnapshot lerna success - @tooling/packherd lerna success - @tooling/v8-snapshot Error: Command failed: taskkill /pid 2016 /T /F ERROR: The process "2016" not found. at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:513:28) at ChildProcess.emit (node:domain:552:15) at maybeClose (node:internal/child_process:1091:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { code: 128, killed: false, signal: null, cmd: 'taskkill /pid 2016 /T /F' } Error: Command failed: taskkill /pid 18012 /T /F ERROR: The process "18012" not found. at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:513:28) at ChildProcess.emit (node:domain:552:15) at maybeClose (node:internal/child_process:1091:16) at Socket. (node:internal/child_process:449:11) at Socket.emit (node:events:513:28) at Socket.emit (node:domain:552:15) at Pipe. (node:net:320:12) at Pipe.callbackTrampoline (node:internal/async_hooks:130:17) { code: 128, killed: false, signal: null, cmd: 'taskkill /pid 18012 /T /F' } Error: Command failed: taskkill /pid 5488 /T /F ERROR: The process "5488" not found. at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:513:28) at ChildProcess.emit (node:domain:552:15) at maybeClose (node:internal/child_process:1091:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { code: 128, killed: false, signal: null, cmd: 'taskkill /pid 5488 /T /F' } Error: Command failed: taskkill /pid 14780 /T /F ERROR: The process "14780" not found. at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:513:28) at ChildProcess.emit (node:domain:552:15) at maybeClose (node:internal/child_process:1091:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { code: 128, killed: false, signal: null, cmd: 'taskkill /pid 14780 /T /F' } Error: Command failed: taskkill /pid 11356 /T /F ERROR: The process "11356" not found. at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:513:28) at ChildProcess.emit (node:domain:552:15) at maybeClose (node:internal/child_process:1091:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { code: 128, killed: false, signal: null, cmd: 'taskkill /pid 11356 /T /F' } [vite:build-app:12876]: Use of eval in "../../node_modules/bluebird/js/browser/bluebird.js" is strongly discouraged as it poses security risks and may cause issues with minification. [vite:build-app:12876]: [BABEL] Note: The code generator has deoptimised the styling of undefined as it exceeds the max of 500KB. Error: Command failed: taskkill /pid 12876 /T /F ERROR: The process "12876" not found. at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:513:28) at ChildProcess.emit (node:domain:552:15) at maybeClose (node:internal/child_process:1091:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { code: 128, killed: false, signal: null, cmd: 'taskkill /pid 12876 /T /F' } lerna notice cli v3.22.1 lerna notice filter including ["cypress","@cypress/mount-utils"] lerna info filter [ 'cypress', '@cypress/mount-utils' ] lerna info Executing command in 2 packages: "yarn run build" lerna info run Ran npm script 'build' in '@cypress/mount-utils' in 1.2s: lerna info run Ran npm script 'build' in 'cypress' in 4.3s: lerna success run Ran npm script 'build' in 2 packages in 4.3s: lerna success - cypress lerna success - @cypress/mount-utils lerna notice cli v3.22.1 lerna notice filter including "@cypress/{angular,react,react18,vue,vue2,svelte}" lerna info filter [ '@cypress/{angular,react,react18,vue,vue2,svelte}' ] lerna info Executing command in 6 packages: "yarn run build" lerna info run Ran npm script 'build' in '@cypress/svelte' in 3.4s: lerna info run Ran npm script 'build' in '@cypress/angular' in 3.8s: lerna info run Ran npm script 'build' in '@cypress/react' in 4.4s: lerna info run Ran npm script 'build' in '@cypress/vue' in 5.2s: lerna info run Ran npm script 'build' in '@cypress/vue2' in 5.4s: lerna info run Ran npm script 'build' in '@cypress/react18' in 3.5s: lerna success run Ran npm script 'build' in 6 packages in 7.9s: lerna success - @cypress/angular lerna success - @cypress/react18 lerna success - @cypress/react lerna success - @cypress/svelte lerna success - @cypress/vue2 lerna success - @cypress/vue lerna notice cli v3.22.1 lerna notice filter excluding ["create-cypress-tests","cypress","@packages/{runner}","@cypress/{angular,react,react18,vue,vue2,mount-utils,svelte}"] lerna info filter [ lerna info filter '!create-cypress-tests', lerna info filter '!cypress', lerna info filter '!@packages/{runner}', lerna info filter '!@cypress/{angular,react,react18,vue,vue2,mount-utils,svelte}' lerna info filter ] lerna info Executing command in 15 packages: "yarn run build" @packages/errors: warning package.json: No license field @packages/errors: '..' is not recognized as an internal or external command, @packages/errors: operable program or batch file. @packages/electron: Packaging app for platform win32 x64 using electron v21.0.0 @packages/runner: node:child_process:960 @packages/runner: throw err; @packages/runner: ^ @packages/runner: Error: Command failed: node "C:\Users\macie\workspace\cypress\node_modules\webpack-cli\bin\cli.js" @packages/runner: at checkExecSyncError (node:child_process:885:11) @packages/runner: at Object.execSync (node:child_process:957:15) @packages/runner: at Object. (C:\Users\macie\workspace\cypress\scripts\run-webpack.js:32:4) @packages/runner: at Module._compile (node:internal/modules/cjs/loader:1218:14) @packages/runner: at Module._extensions..js (node:internal/modules/cjs/loader:1272:10) @packages/runner: at Module.load (node:internal/modules/cjs/loader:1081:32) @packages/runner: at Module._load (node:internal/modules/cjs/loader:922:12) @packages/runner: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) @packages/runner: at node:internal/main/run_main_module:23:47 { @packages/runner: status: 2, @packages/runner: signal: null, @packages/runner: output: [ null, null, null ], @packages/runner: pid: 7664, @packages/runner: stdout: null, @packages/runner: stderr: null @packages/runner: } @packages/runner: Node.js v18.13.0 @packages/runner: error Command failed with exit code 1. lerna ERR! Received non-zero exit code 1 during execution lerna success run Ran npm script 'build' in 15 packages in 14.5s: lerna success - @cypress/schematic lerna success - @cypress/vite-dev-server lerna success - @cypress/webpack-dev-server lerna success - @cypress/webpack-preprocessor lerna success - @packages/electron lerna success - @packages/errors lerna success - @packages/example lerna success - @packages/extension lerna success - @packages/icons lerna success - @packages/packherd-require lerna success - @packages/runner lerna success - @packages/v8-snapshot-require lerna success - @tooling/electron-mksnapshot lerna success - @tooling/packherd lerna success - @tooling/v8-snapshot error Command failed with exit code 1. node:child_process:960 throw err; ^ Error: Command failed: patch-package && yarn-deduplicate --strategy=highest && yarn clean && gulp postinstall && yarn build && yarn build-v8-snapshot-dev at checkExecSyncError (node:child_process:885:11) at execSync (node:child_process:957:15) at Object. (C:\Users\macie\workspace\cypress\scripts\run-postInstall.js:10:1) at Module._compile (node:internal/modules/cjs/loader:1218:14) at Module._extensions..js (node:internal/modules/cjs/loader:1272:10) at Module.load (node:internal/modules/cjs/loader:1081:32) at Module._load (node:internal/modules/cjs/loader:922:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 { status: 1, signal: null, output: [ null, null, null ], pid: 6824, stdout: null, stderr: null } Node.js v18.13.0 error Command failed with exit code 1. at checkExecSyncError (node:child_process:885:11) at execSync (node:child_process:957:15) at Object. (C:\Users\macie\workspace\cypress\node_modules\postinstall-postinstall\run.js:14:5) at Module._compile (node:internal/modules/cjs/loader:1218:14) at Module._extensions..js (node:internal/modules/cjs/loader:1272:10) at Module.load (node:internal/modules/cjs/loader:1081:32) at Module._load (node:internal/modules/cjs/loader:922:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 { status: 1, signal: null, output: [ null, Buffer(54595) [Uint8Array] [ 121, 97, 114, 110, 32, 114, 117, 110, 32, 118, 49, 46, 50, 50, 46, 49, 57, 10, 36, 32, 110, 111, 100, 101, 32, 46, 47, 115, 99, 114, 105, 112, 116, 115, 47, 114, 117, 110, 45, 112, 111, 115, 116, 73, 110, 115, 116, 97, 108, 108, 46, 106, 115, 10, 112, 97, 116, 99, 104, 45, 112, 97, 99, 107, 97, 103, 101, 32, 54, 46, 52, 46, 55, 10, 65, 112, 112, 108, 121, 105, 110, 103, 32, 112, 97, 116, 99, 104, 101, 115, 46, 46, 46, 10, 64, 116, 121, 112, 101, 115, ... 54495 more items ], Buffer(9887) [Uint8Array] [ 108, 101, 114, 110, 97, 32, 110, 111, 116, 105, 99, 101, 32, 99, 108, 105, 32, 118, 51, 46, 50, 50, 46, 49, 10, 108, 101, 114, 110, 97, 32, 105, 110, 102, 111, 32, 69, 120, 101, 99, 117, 116, 105, 110, 103, 32, 99, 111, 109, 109, 97, 110, 100, 32, 105, 110, 32, 50, 51, 32, 112, 97, 99, 107, 97, 103, 101, 115, 58, 32, 34, 121, 97, 114, 110, 32, 114, 117, 110, 32, 99, 108, 101, 97, 110, 34, 10, 64, 112, 97, 99, 107, 97, 103, 101, 115, 47, 100, 97, 116, ... 9787 more items ] ], pid: 14516, stdout: Buffer(54595) [Uint8Array] [ 121, 97, 114, 110, 32, 114, 117, 110, 32, 118, 49, 46, 50, 50, 46, 49, 57, 10, 36, 32, 110, 111, 100, 101, 32, 46, 47, 115, 99, 114, 105, 112, 116, 115, 47, 114, 117, 110, 45, 112, 111, 115, 116, 73, 110, 115, 116, 97, 108, 108, 46, 106, 115, 10, 112, 97, 116, 99, 104, 45, 112, 97, 99, 107, 97, 103, 101, 32, 54, 46, 52, 46, 55, 10, 65, 112, 112, 108, 121, 105, 110, 103, 32, 112, 97, 116, 99, 104, 101, 115, 46, 46, 46, 10, 64, 116, 121, 112, 101, 115, ... 54495 more items ], stderr: Buffer(9887) [Uint8Array] [ 108, 101, 114, 110, 97, 32, 110, 111, 116, 105, 99, 101, 32, 99, 108, 105, 32, 118, 51, 46, 50, 50, 46, 49, 10, 108, 101, 114, 110, 97, 32, 105, 110, 102, 111, 32, 69, 120, 101, 99, 117, 116, 105, 110, 103, 32, 99, 111, 109, 109, 97, 110, 100, 32, 105, 110, 32, 50, 51, 32, 112, 97, 99, 107, 97, 103, 101, 115, 58, 32, 34, 121, 97, 114, 110, 32, 114, 117, 110, 32, 99, 108, 101, 97, 110, 34, 10, 64, 112, 97, 99, 107, 97, 103, 101, 115, 47, 100, 97, 116, ... 9787 more items ] ```
lmiller1990 commented 1 year ago

@packages/errors: '..' is not recognized as an internal or external command,

Weird, no idea - I'm not sure I can debug the windows development environment right now, though.

PRs that improve performance are always welcome -- I don't think we can commit to a specific "no snapshots for network requests" config option, Cypress already has so many ways to be configured. Any configuration changes need to be carefully considered, so it's more work than just writing the code.

Run mode doesn't capture snapshots (at all), you might be able to follow the code path and see if you can replicate that for open mode, if that's something you still want to pursue as a personal challenge. I'd be interested in how significant the perf gains are!

shwarcu commented 1 year ago

@lmiller1990 Instead of looking for ways to disable snapshots I kept lurking around this function replaceIframes and it bothers me that it will continuously create new iframe placeholder for the same iframe over and over when there are requests being made in the background by application under test. I have made a silly attempt to cache iframe placeholder https://github.com/shwarcu/cypress/pull/5/files but creating a snapshot works only for the first time, then no snapshots are created and run time of replaceIframes is not even measured after first two calls. In the PR I have attached video showing how it looks like on my example app. Do you have any idea what I might have missed that broke snapshots?

lmiller1990 commented 1 year ago

continuously create new iframe placeholder

Just to clarify, are you saying it's creating a new snapshot for every request? I think we've talked about this in other issues before, one proposal that's been floated was to use a MutationObserver (or something similar) to compare the snapshots, and skip creating a new snapshot if nothing changes in the DOM.

I don't see the problem in your code immediately, this part of the app is pretty complex, so I'd need to dig into it a little more. I left a comment, take a look at that.

The way I normally debug this is just putting lots of debugger statements and stepping through, building a mental model of what's actually going on.

It's also very easy to introduce a memory leak in this part of the app, I'm pretty sure we already have one, so keep that in mind if you are experimenting here. I cannot guarantee we have the bandwidth to accept a PR here, but any exploration and useful information is always good to have - maybe there is some low hanging optimizations to be made (this sure would be nice).

shwarcu commented 1 year ago

@lmiller1990 I didn't mean 'crating a new snapshot for every request' this time, I was talking about inner part of this process. Let me explain 🧠 Creating a snapshot for every request is one (let's say) issue. Another thing is that when we have an iframe on the page then during snapshot creation Cypress is creating a placeholder for that iframe and sets some basic styling to it. The problem (I think) that exists within this mechanism is that we don't verify if there is any change in the iframe properties that would justify creating another placeholder for an iframe.

In a scenario where there are many requests performed, and page contains some juicy iframe/iframes, then creating iframe placeholders every second or x milliseconds becomes a noticeable performance issue.

In my understanding, if we have the same iframe and when it doesn't change size or some other css properties, we could skip creating another iframe placeholder and just use previously created one. That's the optimisation I was trying to implement. The idea was to take some properties of an iframe (id, styles and so on), create some sort of 'hash' out of it and store it in a map with corresponding iframe placeholder. So that next time when we create a snapshot, and there is an iframe with the same properties we could re-use previously created iframe placeholder.

It's difficult to have more insightful understanding of that code just by reading it because in a lot of places it's not using types. Whenever I take a look at some const or function argument it turns out to be any and I have to walk around and find out about that object by looking at places where it's used. It's quite frustrating because I really wanted to find ways for optimisation and contribute to the project :< Maybe I will give it a try with debugger and see how the code works during runtime, but to be honest I'm quite discouraged at the moment 😅 Especially when you say that even if I open PR it might not be considered

lmiller1990 commented 1 year ago

in a lot of places it's not using types

Cypress was originally plain JS, but if you want to make a PR improving types, that is definitely something that can be accepted easily! It's hard to figure out the types sometimes, which is why no-one has done it yet.

but to be honest I'm quite discouraged at the moment

Is this due to complexity or something else? Sorry if I said something to discourage you.

Especially when you say that even if I open PR it might not be considered

We can definitely consider the PR, we will just need to make sure there is no intended side effect, like excessive browser memory usage, etc. I re-reviewed your code and I see this is actually looks like it's pretty close to working, so it's probably a reasonable change, if we can figure out the problem.

Just to clarify, this change you are working on is unrelated to the original issue, right? I think this is why I was confused - this doesn't look like it has anything to do with network requests, does it?

You do

$placeholder = iframePlaceholders.get(key);

The only thing I can think of is that this is returning undefined :thinking: everything else looks fine. I don't see any other obvious problem. I am not sure I can pull your code and debug it this week, I might be able to put some time in next week.

If you figure it out, please let me know and I can run our full test suite against your PR, that will verify if anything else got broken.

emilyrohrbough commented 1 year ago

@alexsch01 We are currently working on providing a mechanism to disable logging network requests for cy.intercept() in #7362. When logs are disabled for comments, we do not take snapshots. Do you feel this would alleviate some of the performance issues you are experiencing? or are you receiving so many network requests it's just the logging of these in the Command Log that is impacting performance?

alexsch01 commented 1 year ago

@emilyrohrbough Hey can you send me my comments in the issue(s) where I was writing about performance issues? Very appreciated.