Skip to content

Commit a22fd5c

Browse files
dependency: updated chrome-remote-interface to 0.33.0 (#27998)
* 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>
1 parent d964865 commit a22fd5c

File tree

10 files changed

+40
-37
lines changed

10 files changed

+40
-37
lines changed

cli/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ _Released 11/21/2023 (PENDING)_
2020
- 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).
2121
- 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).
2222

23+
**Dependency Updates:**
24+
25+
- 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).
26+
2327
## 13.5.1
2428

2529
_Released 11/14/2023_

packages/data-context/src/DataContext.ts

+2
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ export class DataContext {
351351
}
352352

353353
_reset () {
354+
DataContext.#activeRequestCount = 0
354355
this.actions.servers.setAppSocketServer(undefined)
355356
this.actions.servers.setGqlSocketServer(undefined)
356357

@@ -408,6 +409,7 @@ export class DataContext {
408409

409410
static finishActiveRequest () {
410411
this.#activeRequestCount--
412+
411413
if (this.#activeRequestCount === 0) {
412414
this.#awaitingEmptyRequestCount.forEach((fn) => fn())
413415
this.#awaitingEmptyRequestCount = []

packages/frontend-shared/cypress/e2e/e2ePluginSetup.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ async function makeE2ETasks () {
202202
process.chdir(cachedCwd)
203203
testState = {}
204204
remoteGraphQLOptions = {}
205-
await DataContext.waitForActiveRequestsToFlush()
205+
206206
await globalPubSub.emitThen('test:cleanup')
207207
await ctx.actions.app.removeAppDataDir()
208208
await ctx.actions.app.ensureAppDataDirExists()

packages/server/lib/browsers/chrome.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,15 @@ export = {
611611
// navigate to the actual url
612612
if (!options.onError) throw new Error('Missing onError in chrome#open')
613613

614-
browserCriClient = await BrowserCriClient.create({ hosts: ['127.0.0.1'], port, browserName: browser.displayName, onAsynchronousError: options.onError, onReconnect, protocolManager: options.protocolManager, fullyManageTabs: true })
614+
browserCriClient = await BrowserCriClient.create({
615+
hosts: ['127.0.0.1'],
616+
port,
617+
browserName: browser.displayName,
618+
onAsynchronousError: options.onError,
619+
onReconnect,
620+
protocolManager: options.protocolManager,
621+
fullyManageTabs: true,
622+
})
615623

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

packages/server/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"chalk": "2.4.2",
4747
"check-more-types": "2.24.0",
4848
"chokidar": "3.5.1",
49-
"chrome-remote-interface": "0.31.3",
49+
"chrome-remote-interface": "0.33.0",
5050
"cli-table3": "0.5.1",
5151
"coffeescript": "2.6.0",
5252
"color-string": "1.5.5",
@@ -160,7 +160,7 @@
160160
"@tooling/system-tests": "0.0.0-development",
161161
"@types/chai-as-promised": "7.1.2",
162162
"@types/chrome": "0.0.101",
163-
"@types/chrome-remote-interface": "0.31.4",
163+
"@types/chrome-remote-interface": "0.31.11",
164164
"@types/http-proxy": "1.17.4",
165165
"@types/mime": "3.0.1",
166166
"@types/node": "18.17.5",

packages/server/test/integration/cdp_spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,13 @@ describe('CDP Clients', () => {
209209

210210
const send = (commands: CDPCommands[]) => {
211211
commands.forEach(({ command, params }) => {
212-
return criClient.send(command, params)
212+
criClient.send(command, params).catch(() => {})
213213
})
214214
}
215215

216216
const on = (subscriptions: CDPSubscriptions[]) => {
217217
subscriptions.forEach(({ eventName, cb }) => {
218-
return criClient.on(eventName, cb)
218+
criClient.on(eventName, cb)
219219
})
220220
}
221221

system-tests/__snapshots__/browser_crash_handling_spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ exports['Browser Crash Handling / when the tab closes in electron / fails'] = `
521521
Running: chrome_tab_close.cy.js (1 of 2)
522522
523523
524-
We detected that the electron browser process closed unexpectedly.
524+
We detected that the electron tab running Cypress tests closed unexpectedly.
525525
526526
We have failed the current spec and aborted the run.
527527

system-tests/projects/config-with-crashing-plugin/cypress/e2e/simple_multiple.cy.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ describe('suite', function () {
55
})
66

77
it('is still true', () => {
8-
// the config should crash before this test completes;
9-
// this is a long wait in order to improve predictability
8+
// the config should crash before this test completes;
9+
// this is a long wait in order to improve predictability
1010
cy.wait(10000)
1111
expect(true).to.be.true
1212
})

system-tests/test/browser_crash_handling_spec.js

+9-20
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,14 @@ describe('Browser Crash Handling', () => {
88
})
99

1010
// It should fail the chrome_tab_crash spec, but the simple spec should run and succeed
11-
context('when the tab crashes in chrome', () => {
12-
systemTests.it('fails', {
13-
browser: 'chrome',
14-
spec: 'chrome_tab_crash.cy.js,simple.cy.js',
15-
snapshot: true,
16-
expectedExitCode: 1,
17-
})
18-
})
19-
20-
// It should fail the chrome_tab_crash spec, but the simple spec should run and succeed
21-
context('when the tab crashes in electron', () => {
22-
systemTests.it('fails', {
23-
browser: 'electron',
24-
spec: 'chrome_tab_crash.cy.js,simple.cy.js',
25-
snapshot: true,
26-
expectedExitCode: 1,
11+
;['chrome', 'electron'].forEach((browser) => {
12+
context(`when the tab crashes in ${browser}`, () => {
13+
systemTests.it('fails', {
14+
browser,
15+
spec: 'chrome_tab_crash.cy.js,simple.cy.js',
16+
snapshot: true,
17+
expectedExitCode: 1,
18+
})
2719
})
2820
})
2921

@@ -59,10 +51,7 @@ describe('Browser Crash Handling', () => {
5951
})
6052
})
6153

62-
// Because electron does not have any concepts with regard to a "page" aka a tab
63-
// ...when the tab itself closes, the whole browser process is also closed
64-
// so we actually want the same behavior as the "browser process is killed"
65-
// and not to recover or continue, we should exit early
54+
// It should fail the chrome_tab_close spec, and exit early, do not move onto the next spec
6655
context('when the tab closes in electron', () => {
6756
systemTests.it('fails', {
6857
browser: 'electron',

yarn.lock

+8-8
Original file line numberDiff line numberDiff line change
@@ -6210,10 +6210,10 @@
62106210
dependencies:
62116211
"@types/node" "*"
62126212

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

@@ -10669,10 +10669,10 @@ chrome-har-capturer@0.13.4:
1066910669
chrome-remote-interface "^0.25.7"
1067010670
commander "2.x.x"
1067110671

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

0 commit comments

Comments
 (0)