* fix sync script with updateds npm-packlist
* chore: update lerna from 6.6.2 to 8.1.8 and ran lerna repair
* chore: pin typescript to ~5.4.5 to avoid importsNotUsedAsValues that was removed in 5.5 and edit workflows and scripts to correctly scope learna packages on v8 snapshot tests [run ci]
* fix indentation in comments
* remove console.log reference to print current package directory in sync exported npm with cli script
* chore: gracefully handle CDP address not returning from webdriver capabilities, prompting a browser relaunch
Update packages/server/lib/browsers/firefox.ts
add inline comment to github comment thread [run ci]
strongly type errors more consistently [run ci]
* add test for firefox cdp error for visual snapshot [run ci]
* misc: implement webdriver npm package as the client for the webdriver specification
* misc: go back to xulstore to save browser preferences [run ci]
* add changelog [run ci]
* chore: fix screenshot resolution [run ci]
* fix check-ts issues [run ci]
* run windows ci [run ci]
* run ci
* add comments [run ci]
* build binaries for webdriver impl [run ci]
* fix Cypress namespace missing issue. see https://github.com/cypress-io/cypress/pull/30331/commits/6d7ba97c2562054e11983e8bfed576f0fa3ee37b
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* patch edgedriver and preserve dependency paths for webdriver so they are included in the binary [run ci]
* fix issues with firefox profile not being created in open mode when old profile exists from previous cypress versions where they are no longer compatible [run ci]
* address comments that came up in review [run ci]
* see if this fixes extension test [run ci]
* make sure process kill emits the exit event [run ci]
* update geckodriver to include contribution patch to types [run ci]
* fix misapplication of geckodriver package (accidentally deleted) [run ci]
* empty commit to trigger ci [run ci]
* address comments from code review [run ci]
---------
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
* fix: ensure that find-process does not error out due to a bad regex
* add changelog
* fix patch
* add a test
* add comment
* update comment
* blank
* blank
* feat: pass spec to beforeSpec to support better reporting on client side protocol errors
* Update packages/types/src/protocol.ts
Co-authored-by: Matt Schile <mschile@cypress.io>
* update changelog
---------
Co-authored-by: Matt Schile <mschile@cypress.io>
* misc: replace marionette-client with geckodriver as b2g marionette client is no longer supported [run ci]
* install pump [run ci]
* refactor to have geckodriver launch the browser and split out webdriver to own class [run ci]
fix other failing tests [run ci]
fix other failing tests [run ci]
pass env variables to firefox
* fix sigkill / treekill issues on windows with firefox binary being a dangling process [run ci]
* fix issue where browser in headed mode was not starting maximized [run ci]
* stub firefox_spec added deps different to get type inference
* add comment to geckodriver patch
* move capabilities to verbose debug statement
* update changelog
* address comments from code review
* add pending for changelog
* update with suggestions from code review
* remove debug enable as the process needs to be bound to stderr and stdout
* add comment on why we need to bind
* add comments from code review
* address comments from code review
* make sure sessionId is set
* new error message for stream stall upload failures
* new unknown error msg, extract printProtocolUploadError for testing, consolidatd args for stream stall msg
* rename env more appropriately, add sampling interval param to putProtocolArtifact
* default to 5000, override with app capture protocol value, override that with env var
* update snapshots
* fix math in upload stall error msg
* changelog
* update gql schema w/ new error msg, fix protocol tscheck
* update test to use fn for app capture supplied interval
* increase default stream stall interval to 10 seconds
* typos
* snapshots
* rename env var
* do not use user-supplied interval if it parses to NaN
* use the more standard makeErr for unknown/uncategorized upload error in visual snapshots
* rearrange upload stall error message
* fix typo
* changelog
---------
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* catch Fetch.enable errors on extra target in browser CRI
* changelog
* changelog
* changelog
* Update packages/server/test/unit/browsers/browser-cri-client_spec.ts
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* use try/catch instead of .catch for wider unit test support
---------
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* fix: resolve files outside the project directory to the bundled directory via the directory path difference [run ci]
* update common ancestor code
---------
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* feat: implement JIT component experiment [run ci]
* don't update the dev server unnecessarily if the run is cancelled [run ci]
* fix system test flake
* Update cli/types/cypress.d.ts
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* Update system-tests/projects/experimental-JIT/webpack/cypress/support/component-index.html
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* Update system-tests/projects/experimental-JIT/vite/cypress/support/component-index.html
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* chore: ignore node_modules for webpack dev server
* be sure to end span when throwing error
---------
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* Refactor connection logic to cri-connection
CDPConnection class instantiates a persistent event emitter, and creates
a CDP Client instance via connect(). When this client emits a disconnect
event, the CDPConnection will automatically attempt to reconnect, if the
connection was not intentionally closed and the connection is created with
the reconnect flag. It only listens to 'event' and 'disconnect' events itself,
making it easy to unsubscribe from events in the event of a disconnection,
helping ease mental load when considering potential memory leaks.
Because it uses its own persistent event emitter, event listeners added
to the CDPConnection do not need to be re-added when the client reconnects.
The CriClient itself no longer handles reconnection logic: it only reacts to
connection state changes in order to re-send failed commands and enablements
when the CDPConnection restores the CDPClient.
* changelog
* clean up event listeners before reconnecting
* changelog
* changelog
* changelog
* unit tests
* lift out of the remote-interface dir
* complete lift from /remote-interface
* further fix imports
* import
* fix disconnect behavior to make integration test pass
* Update packages/server/test/integration/cdp_spec.ts comment
* fix snapgen
* improve debug
* further debug improvements
* do not attach crash handlers on browser level cri clients, add tests
* adds bindingCalled listeners discretely, rather than relying on 'event', which does not trigger for them
* back out of main `event` listener, use discrete listeners, add integration test for service worker bindingCalled
* Revert "back out of main `event` listener, use discrete listeners, add integration test for service worker bindingCalled"
This reverts commit 4855120d42.
* changelog
* adds integration test for various ways to add cdp event listeners
* note in changelog this is a cypress server fix
* ensure enablement promises resolve after reconnect
* Update cli/CHANGELOG.md
Co-authored-by: Matt Schile <mschile@cypress.io>
---------
Co-authored-by: Matt Schile <mschile@cypress.io>
* fix: rethrow stalled network request error correctly
* no longer timeout from stream monitor on failure to start - allow OS to handle
* changelog
* fix system error detection
* fix test for system error throw
* Update cli/CHANGELOG.md
* Update packages/server/test/unit/cloud/network/put_fetch_spec.ts
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* rm noop try-catch
---------
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* unit and integration tests that reproduce websocket disconnected unhandled exception
* WIP: command queue
* complete command queue and retry refactor
* cri-client changes pass tests; modify certain tests for readability and accuracy
* removes unnecessary logic from command queue, adds unit tests for command queue
* rm unused cdp state - this should be reserved for future refactor
* small edits to cri-client: better error handling, more comprehensive comments
* comment re: queue property
* rearrange cri client member methods for readability
* further edits
* Changelog
* Update cli/CHANGELOG.md
Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
* fix continuous retry on close
* split heavier debugs to verbose
---------
Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* WIP - system test snapshots
* bolster error output for response body potential on upload network errors
* edit error output for readability
* changelog
* Update packages/server/lib/cloud/artifacts/upload_artifacts.ts
Co-authored-by: Matt Schile <mschile@cypress.io>
* fix partial rename
* fix system test for single upload error vs aggregate
---------
Co-authored-by: Matt Schile <mschile@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* custom async retry for any async fn
* "proxied" fetch for PUT, throwing http errors
* cleans up put_fetch return types & parsing
* move protocol upload logic to put_protocol_artifact, rm upload_stream
* changelog
* changelog
* manually fix wsp in snapshot
* reorganizes a little, properly tests retryable logic
* removes 408 as a non-retriable error in unit test
* make expectation to be resolved more clear
* rm unnecessary type coercion
* changelog
* Update cli/CHANGELOG.md
* asyncRetry only throws Aggregate errors if there is more than one attempt
* Update packages/server/test/unit/cloud/network/is_retryable_error_spec.ts
Co-authored-by: Matt Schile <mschile@cypress.io>
* Update packages/server/test/unit/cloud/network/is_retryable_error_spec.ts
---------
Co-authored-by: Matt Schile <mschile@cypress.io>
* refactor: CriClient -> traditional class + async factory
* Update packages/server/test/unit/browsers/cri-client_spec.ts
* member fns of CriClient must be bound to context
* rethrow debug-inspected ws send error
* make cri client constructor private to force factory method; ref cri connection via closure
* add todo for potential memory leak in CriClient
* reprod browser cri crash chrome
* commit with the fix
* Add integration-like test that verifies the browser is launched with the correct arguments [run ci]
* chore: update babel to latest in packages and update vite to version 5, vite related vue plugins to version 5, and svg plugin to v5
update vitejs react to v5
updated vite plugins
updates unplugin-vue-components and unplugin-icons for vite
remove vite-plugin-copmponents as it is the same thing as unplugin-vue-components
update vue-i18n from beta package to released v9
get unplugin-vue-i18n to latest
add @babel/types to no rewrite [run ci]
fix typing errors [run ci]
* update snapshot [run ci]
* coerce type for compiled messages to bridge type compatibility between unplugin-vue-i18n and vue-i18n [run ci]
* chore: update babel to latest in packages and update vite to version … (#29634)
* fix vite
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
---------
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
* update other hard coded @babel/core
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
---------
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* [protocol] throw error verifying sig
Not throwing is surfacing as an upload error when it's a download error.
* adds system test snapshot for invalid signature
* changelog
* pending
* Update cli/CHANGELOG.md
---------
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Cacie Prins <cacie@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* misc: report protocol capture afterSpec duration to cloud
* WIP: collecting afterSpec durations, TODO: system test scaffolding
* push all afterSpec timings to cloud
* push afterSpecTotal instead of afterSpec property
* changelog
* fix trailing slash in readme
* fix afterspec duration unit test
* correct return signature of afterSpec; add debug
* changelog
* Update packages/server/lib/cloud/api/index.ts
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* Update packages/server/lib/cloud/protocol.ts
* fix ts check
* fix unit tests re: expected afterSpec sig
* fix return sig of protocol afterSpec stub for system tests
* use env var directly in tests for capture error codepath, rather than override var
* rm unused param
* bump cache
* changelog
* remove pending runnables duration from afterspec report
---------
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* fix: update the monorepo to typescript 5
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* chore: updating v8 snapshot cache
* run ci to see problems [run ci]
* update vue-tsc and typings that conflict with update
* regen snapshot
* fix typescript errors ui test as stack trace behavior has changed
* fix server unit tests
* update cy.origin() spec based on stack traces and code frames
* update spec to include source map url
* run ci
* fix check-ts
* chore: fix system tests [run ci]
* add preprocessor tests to batteries included to exercise new logic
* run ci
* refactor unit tests to be a bit more dry
* pin typescript to ~5.4 and adjust config to ignroe deprecations but keep importsNotUsedAsValues
* add changelog entry
* add fixme issue to stack trace mismatches inside evaled context
* use import type webpack as webpack as a lib isn't actually invboked in the runner webpack config
* fix system test as adding 4 lines of comments impacts the stack trace line 4 lines (duh)
---------
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
* feat: add option to ignore chrome preferences
* build binary on this branch
* adds explanation comment and test
* update changelog from dev
* Update packages/server/lib/browsers/chrome.ts
Co-authored-by: Matt Schile <mschile@cypress.io>
* put disableRestorePagesPrompt back in promise list in browser open
* Update cli/CHANGELOG.md
* ensure we skip writing to chrome prefs when env is set
* changelog update
* Update packages/server/lib/browsers/chrome.ts
Co-authored-by: Matt Schile <mschile@cypress.io>
* more fully ignore chrome preferences when env var is set
---------
Co-authored-by: Cacie Prins <cacie@cypress.io>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
* chore: Force deprecation of unload event
* empty commit
* use pagehide instead of unload event
* tslint
* bump cache
* some debugging
* rm debug
* comment out forced deprecation of unload - tbd how to enable
* rm more unnecessary debug
* changelog
* rename event callback from onUnload -> onPageHide
* comment on discrepency of event naming for end of page lifecycle events
* use pagehide in chrome, unload elsewhere
* comment on chromium-specific pagehide behavior
* changelog
---------
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>