Skip to content

Commit

Permalink
dependency: updated chrome-remote-interface to 0.33.0 (#27998)
Browse files Browse the repository at this point in the history
* dependency: updated chrome-remote-interface to 0.33.0

* updating changelog

* updating tests

* updating snapshot

* enable debug logs

* run ci without app integration tests

* .

* is this our problem? seems to be

* .

* run app tests

* .

* remove debug logs in ci

* clean up & re-enable all jobs

* .

* keep existing checked in error for now

* update changelog

---------

Co-authored-by: Emily Rohrbough <emilyrohrbough@yahoo.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
  • Loading branch information
3 people committed Nov 20, 2023
1 parent d964865 commit a22fd5c
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 37 deletions.
4 changes: 4 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ _Released 11/21/2023 (PENDING)_
- Browser tabs and windows other than the Cypress tab are now closed between tests in Chromium-based browsers. Addressed in [#28204](https://github.com/cypress-io/cypress/pull/28204).
- Cypress now ensures the main browser tab is active before running each command in Chromium-based browsers. Addressed in [#28334](https://github.com/cypress-io/cypress/pull/28334).

**Dependency Updates:**

- Upgraded [`chrome-remote-interface`](https://www.npmjs.com/package/chrome-remote-interface) from `0.31.3` to `0.33.0` to increase the max payload from 100MB to 256MB. Addressed in [#27998](https://github.com/cypress-io/cypress/pull/27998).

## 13.5.1

_Released 11/14/2023_
Expand Down
2 changes: 2 additions & 0 deletions packages/data-context/src/DataContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ export class DataContext {
}

_reset () {
DataContext.#activeRequestCount = 0
this.actions.servers.setAppSocketServer(undefined)
this.actions.servers.setGqlSocketServer(undefined)

Expand Down Expand Up @@ -408,6 +409,7 @@ export class DataContext {

static finishActiveRequest () {
this.#activeRequestCount--

if (this.#activeRequestCount === 0) {
this.#awaitingEmptyRequestCount.forEach((fn) => fn())
this.#awaitingEmptyRequestCount = []
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend-shared/cypress/e2e/e2ePluginSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ async function makeE2ETasks () {
process.chdir(cachedCwd)
testState = {}
remoteGraphQLOptions = {}
await DataContext.waitForActiveRequestsToFlush()

await globalPubSub.emitThen('test:cleanup')
await ctx.actions.app.removeAppDataDir()
await ctx.actions.app.ensureAppDataDirExists()
Expand Down
10 changes: 9 additions & 1 deletion packages/server/lib/browsers/chrome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,15 @@ export = {
// navigate to the actual url
if (!options.onError) throw new Error('Missing onError in chrome#open')

browserCriClient = await BrowserCriClient.create({ hosts: ['127.0.0.1'], port, browserName: browser.displayName, onAsynchronousError: options.onError, onReconnect, protocolManager: options.protocolManager, fullyManageTabs: true })
browserCriClient = await BrowserCriClient.create({
hosts: ['127.0.0.1'],
port,
browserName: browser.displayName,
onAsynchronousError: options.onError,
onReconnect,
protocolManager: options.protocolManager,
fullyManageTabs: true,
})

la(browserCriClient, 'expected Chrome remote interface reference', browserCriClient)

Expand Down
4 changes: 2 additions & 2 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"chalk": "2.4.2",
"check-more-types": "2.24.0",
"chokidar": "3.5.1",
"chrome-remote-interface": "0.31.3",
"chrome-remote-interface": "0.33.0",
"cli-table3": "0.5.1",
"coffeescript": "2.6.0",
"color-string": "1.5.5",
Expand Down Expand Up @@ -160,7 +160,7 @@
"@tooling/system-tests": "0.0.0-development",
"@types/chai-as-promised": "7.1.2",
"@types/chrome": "0.0.101",
"@types/chrome-remote-interface": "0.31.4",
"@types/chrome-remote-interface": "0.31.11",
"@types/http-proxy": "1.17.4",
"@types/mime": "3.0.1",
"@types/node": "18.17.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/server/test/integration/cdp_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,13 @@ describe('CDP Clients', () => {

const send = (commands: CDPCommands[]) => {
commands.forEach(({ command, params }) => {
return criClient.send(command, params)
criClient.send(command, params).catch(() => {})
})
}

const on = (subscriptions: CDPSubscriptions[]) => {
subscriptions.forEach(({ eventName, cb }) => {
return criClient.on(eventName, cb)
criClient.on(eventName, cb)
})
}

Expand Down
2 changes: 1 addition & 1 deletion system-tests/__snapshots__/browser_crash_handling_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ exports['Browser Crash Handling / when the tab closes in electron / fails'] = `
Running: chrome_tab_close.cy.js (1 of 2)
We detected that the electron browser process closed unexpectedly.
We detected that the electron tab running Cypress tests closed unexpectedly.
We have failed the current spec and aborted the run.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ describe('suite', function () {
})

it('is still true', () => {
// the config should crash before this test completes;
// this is a long wait in order to improve predictability
// the config should crash before this test completes;
// this is a long wait in order to improve predictability
cy.wait(10000)
expect(true).to.be.true
})
Expand Down
29 changes: 9 additions & 20 deletions system-tests/test/browser_crash_handling_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,14 @@ describe('Browser Crash Handling', () => {
})

// It should fail the chrome_tab_crash spec, but the simple spec should run and succeed
context('when the tab crashes in chrome', () => {
systemTests.it('fails', {
browser: 'chrome',
spec: 'chrome_tab_crash.cy.js,simple.cy.js',
snapshot: true,
expectedExitCode: 1,
})
})

// It should fail the chrome_tab_crash spec, but the simple spec should run and succeed
context('when the tab crashes in electron', () => {
systemTests.it('fails', {
browser: 'electron',
spec: 'chrome_tab_crash.cy.js,simple.cy.js',
snapshot: true,
expectedExitCode: 1,
;['chrome', 'electron'].forEach((browser) => {
context(`when the tab crashes in ${browser}`, () => {
systemTests.it('fails', {
browser,
spec: 'chrome_tab_crash.cy.js,simple.cy.js',
snapshot: true,
expectedExitCode: 1,
})
})
})

Expand Down Expand Up @@ -59,10 +51,7 @@ describe('Browser Crash Handling', () => {
})
})

// Because electron does not have any concepts with regard to a "page" aka a tab
// ...when the tab itself closes, the whole browser process is also closed
// so we actually want the same behavior as the "browser process is killed"
// and not to recover or continue, we should exit early
// It should fail the chrome_tab_close spec, and exit early, do not move onto the next spec
context('when the tab closes in electron', () => {
systemTests.it('fails', {
browser: 'electron',
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6210,10 +6210,10 @@
dependencies:
"@types/node" "*"

"@types/chrome-remote-interface@0.31.4":
version "0.31.4"
resolved "https://registry.yarnpkg.com/@types/chrome-remote-interface/-/chrome-remote-interface-0.31.4.tgz#d07b34f4af0c7294c5b0164780b3d7bfce078155"
integrity sha512-DJHDwimNqCgAyG5gFmr6Y265pe967u3mnkeMVc0iHuf04PHzTgFypA2AjxSvtkM/pogqWxvfRYXy9Wa5Dj0U1g==
"@types/chrome-remote-interface@0.31.11":
version "0.31.11"
resolved "https://registry.yarnpkg.com/@types/chrome-remote-interface/-/chrome-remote-interface-0.31.11.tgz#bd8e3317eac339d1f831659dbb8f07a7ad785f2e"
integrity sha512-9NzphRNJaDSfI6BKQx/i6F3xQghU9PN39bssoPckYPAsOABNy2I1tCH2JUdubuAsED3zszTwivWS+K0X024pJg==
dependencies:
devtools-protocol "0.0.927104"

Expand Down Expand Up @@ -10669,10 +10669,10 @@ chrome-har-capturer@0.13.4:
chrome-remote-interface "^0.25.7"
commander "2.x.x"

chrome-remote-interface@0.31.3:
version "0.31.3"
resolved "https://registry.yarnpkg.com/chrome-remote-interface/-/chrome-remote-interface-0.31.3.tgz#bd01b89f5f0e968f7eeb37b8b7c5ac20e6e1f4d0"
integrity sha512-NTwb1YNPHXLTus1RjqsLxJmdViKwKJg/lrFEcM6pbyQy04Ow2QKWHXyPpxzwE+dFsJghWuvSAdTy4W0trluz1g==
chrome-remote-interface@0.33.0:
version "0.33.0"
resolved "https://registry.yarnpkg.com/chrome-remote-interface/-/chrome-remote-interface-0.33.0.tgz#9140b5612ee5cdc39212cd0296d3b61ea881c47a"
integrity sha512-tv/SgeBfShXk43fwFpQ9wnS7mOCPzETnzDXTNxCb6TqKOiOeIfbrJz+2NAp8GmzwizpKa058wnU1Te7apONaYg==
dependencies:
commander "2.11.x"
ws "^7.2.0"
Expand Down

5 comments on commit a22fd5c

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a22fd5c Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.0/linux-arm64/develop-a22fd5cb82eb93f44a1da2ad73412d7b471be3d1/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a22fd5c Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.0/linux-x64/develop-a22fd5cb82eb93f44a1da2ad73412d7b471be3d1/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a22fd5c Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.0/darwin-x64/develop-a22fd5cb82eb93f44a1da2ad73412d7b471be3d1/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a22fd5c Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.0/darwin-arm64/develop-a22fd5cb82eb93f44a1da2ad73412d7b471be3d1/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a22fd5c Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.0/win32-x64/develop-a22fd5cb82eb93f44a1da2ad73412d7b471be3d1/cypress.tgz

Please sign in to comment.