v15.18.0
Added 1
- Added a removeSRIAttributes configuration option that strips the integrity attribute from <script> and <link> elements on first-party resources to prevent them from being blocked by Subresource Integrity enforcement after Cypress rewrites them
Fixed 11
- Fixed an issue where an application that repeatedly threw the same uncaught exception could exhaust renderer memory and crash the browser; consecutive identical uncaught exceptions within a test now collapse into a single, updating command-log entry, and a handled uncaught exception no longer captures a DOM snapshot
- Fixed an issue where calling req.destroy() or using { forceNetworkError: true } inside a cy.intercept() handler in experimental WebKit caused infinite request loops
- Fixed an issue where the before:spec plugin event fired twice for the same spec when a test navigated to a cross-origin URL via cy.visit()
- Fixed an issue where setting numTestsKeptInMemory to a value greater than 0 from setupNodeEvents would take effect during cypress run and prevent snapshots from being captured correctly; numTestsKeptInMemory is now always treated as 0 during cypress run
- Fixed an issue where Cypress installed in a read-only location could log a cannot delete profileDir on exit error and leave the browser profile directory behind
- Fixed an issue where the resolved remote origin could include an explicit default port or embedded credentials when the visited URL contained them, which did not match the origin reported by the browser
- Fixed an issue where cy.screenshot() could still capture changing pixels from some running web animations
- Fixed an issue where during cypress run with experimentalSingleTabRunMode and experimental WebKit, component test runs with video recording enabled would only record the first spec's video and could hang without exiting
- Fixed an issue where running component tests with experimentalSingleTabRunMode enabled could cause a spec to fail intermittently after many other specs had run in the same browser tab
- Fixed an issue where passing a cy.fixture() alias to cy.selectFile() attached the file without its name in a second or later test that loaded the same fixture, causing servers to reject the upload
- Fixed a regression in 15.17.0 where loading the Cypress configuration could fail with TransformError when the project has the same esbuild version installed that Cypress bundles internally and a dependency registers its own tsx loader
Performance:
- Fixed an issue where an application that repeatedly threw the same uncaught exception (for example, a benign
ResizeObserver loop ...notification fired on every animation frame) could exhaust renderer memory and crash the browser. Consecutive identical uncaught exceptions within a test now collapse into a single, updating command-log entry, and a handled (suppressed) uncaught exception no longer captures a DOM snapshot. Addresses #27415.
Features:
- Added a
removeSRIAttributesconfiguration option. When enabled, Cypress strips theintegrityattribute from<script>and<link>elements on first-party resources so they are not blocked by Subresource Integrity (SRI) enforcement after Cypress rewrites them. This coversintegrityset via static HTML, a JavaScript string literal, and runtime DOM assignment (including thewebpack-subresource-integritypattern used for lazily-loaded chunks). Addresses #34124 and #18315.
Bugfixes:
- Fixed an issue where calling
req.destroy()or using{ forceNetworkError: true }inside acy.intercept()handler in experimental WebKit caused infinite request loops. Fixes #23810. Fixed in #33948. - Fixed an issue where the
before:specplugin event fired twice for the same spec when a test navigated to a cross-origin URL viacy.visit(). Affectscypress runandcypress openwithexperimentalInteractiveRunEventsenabled. The event now fires exactly once per spec run, regardless of how many times the runner page reloads internally during cross-origin navigation. Fixes #26300. - Fixed an issue where setting
numTestsKeptInMemoryto a value greater than0fromsetupNodeEventswould take effect duringcypress run, which could prevent snapshots from being captured correctly when recording Test Replay to Cypress Cloud. Duringcypress run,numTestsKeptInMemoryis now always treated as0regardless of how it is configured. Fixes #31167. - Fixed an issue where, when Cypress was installed in a read-only location, running tests in Firefox or Chrome could log a
cannot delete profileDir on exiterror (EACCES/EPERM) and leave the browser profile directory behind, requiring manual cleanup before the next run. Cypress now removes the profile directory on exit as expected. Fixes #31300. - Fixed an issue where the resolved remote origin (for example,
Cypress.config('remote').origin) could include an explicit default port (:80for HTTP or:443for HTTPS) or embedded credentials when the visited URL contained them, which did not match the origin reported by the browser. The reported origin now always matches the browser'slocation.origin, omitting default ports and any embedded credentials. Fixes #28369. Fixed in #34050. - Fixed an issue where
cy.screenshot()could still capture changing pixels from some running web animations. Fixes #29144. - Fixed an issue where, during
cypress runwithexperimentalSingleTabRunModeand the experimental WebKit browser, component test runs with video recording enabled would only record the first spec's video and could then hang without exiting. Each spec is now recorded to its own video and the run exits normally. Fixes #23815. - Fixed an issue where running component tests with the
experimentalSingleTabRunModeexperiment enabled could cause a spec to fail intermittently after many other specs had run in the same browser tab, even though that spec passed when run on its own. Fixes #24146. - Fixed an issue where passing a
cy.fixture()alias tocy.selectFile()attached the file without its name in a second or later test that loaded the same fixture (for example, when the same fixture is reused across multiple tests), causing servers to reject the upload as a missing file. The file name is now preserved every time the fixture is used. Fixes #21936. - Fixed a regression in 15.17.0 where loading the Cypress configuration could fail with
TransformError: Internal error: Expected id N but got id Mwhen the project has the sameesbuildversion installed that Cypress bundles internally (currently0.28.0) and a dependency loaded during config processing registers its owntsxloader. Thetsxloader Cypress uses to load the configuration file is now removed fromNODE_OPTIONSbefore the configuration file is sourced, so it no longer executes inside worker threads spawned by the project's own dependencies. Fixes #34076. - Fixed an issue where
cy.request()in Firefox did not sendSecurecookies tolocalhostor loopback addresses such as127.0.0.1overhttp, even though browsers treat those origins as secure contexts. ASecurecookie set overhttpson such a host is now included on subsequenthttprequests to that host in Firefox, matching the browser's own behavior and how Cypress already behaves in Chrome. Fixes #24332. - Fixed an issue where a transient failure to bind Cypress's internal file server to an available port (for example, an intermittent
EADDRINUSEunder port pressure on a reused CI machine) could crash the run with an uncaught exception before any tests started. Cypress now retries on a fresh port and, if it still cannot bind, fails with a clear error instead of crashing. Fixes #34109. - Fixed a regression in 15.17.0 where visiting a URL with an IPv6 literal host, such as
cy.visit('http://[::1]:3000'), crashed the proxy with anInternal error while proxying ... option domain is invaliderror. Cypress no longer sets aDomainattribute on its internal cookies for IPv6 hosts, so such URLs work as expected. Fixes #34143. Fixed in #34146.
Misc:
- Running
cypress installwhen Cypress is installed globally no longer prints a warning recommending that Cypress be installed as a per-project devDependency. Addresses #34134. - Running Cypress with process profiler debug logs enabled (for example
DEBUG=cypress*process_profiler) no longer intermittently prints anExpected DataContext to already have been set via setCtxerror to the logs. Addresses #30670. - Cypress now shows a clear error explaining that
browsersmust be an array and that a specific browser should be selected with--browserwhen aCYPRESS_BROWSERSenvironment variable is set to a plain string (for exampleCYPRESS_BROWSERS=chrome) instead of showing an opaqueTypeError: a.map is not a functionerror. Addresses #33198.
Dependency Updates:
- Upgraded
webdriverfrom9.14.0to9.28.0,geckodriverfrom5.0.0to6.1.0, andedgedriverfrom6.1.1to6.3.0. These packages are used to launch and automate Firefox duringcypress runandcypress open. Addresses #34072. - Upgraded
undicifrom6.26.0to6.27.0to address a CRLF Injection vulnerability reported in security scans. Addressed in #34121.