From 770a50255ffa3c873b50925bd298642a7f7d4694 Mon Sep 17 00:00:00 2001 From: Bill Glesias Date: Wed, 4 Sep 2024 09:47:55 -0400 Subject: [PATCH] fix: revert HiDPI for Wayland users to resolve unknown issues with GLib-GIO-ERROR and cy.screenshot() timeouts [run ci] (#30179) --- .circleci/workflows.yml | 6 +++--- cli/CHANGELOG.md | 1 + cli/lib/exec/spawn.js | 2 +- cli/test/lib/exec/spawn_spec.js | 4 ---- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index b4e592c26647..fa9b9cd3fd12 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -30,6 +30,7 @@ mainBuildFilters: &mainBuildFilters - /^release\/\d+\.\d+\.\d+$/ # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - 'update-v8-snapshot-cache-on-develop' + - 'fix/revert_ozone_hint' - 'publish-binary' - 'chore/support_hidpi_wayland' - 'ryanm/chore/fix-kitchensink-against-staging' @@ -43,7 +44,6 @@ macWorkflowFilters: &darwin-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'chore/support_hidpi_wayland', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -54,7 +54,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'chore/support_hidpi_wayland', << pipeline.git.branch >> ] + - equal: [ 'fix/revert_ozone_hint', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -153,7 +153,7 @@ commands: name: Set environment variable to determine whether or not to persist artifacts command: | echo "Setting SHOULD_PERSIST_ARTIFACTS variable" - echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "chore/support_hidpi_wayland" ]]; then + echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "fix/revert_ozone_hint" ]]; then export SHOULD_PERSIST_ARTIFACTS=true fi' >> "$BASH_ENV" # You must run `setup_should_persist_artifacts` command and be using bash before running this command diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index efbcf7cb8e80..9f1696f0fcf9 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -6,6 +6,7 @@ _Released 9/10/2024 (PENDING)_ **Bugfixes:** - Fixed an issue where Cypress could crash with a `WebSocket Connection Closed` error. Fixes [#30100](https://github.com/cypress-io/cypress/issues/30100). +- Fixed an issue where `cy.screenshot()` was timing out and Cypress was failing to start due to `GLib-GIO-ERROR` error. Reverts [#30109](https://github.com/cypress-io/cypress/pull/30109), the change to allow HiDPI screen for Wayland users. Fixes [#30172](https://github.com/cypress-io/cypress/issues/30172) and [#30160](https://github.com/cypress-io/cypress/issues/30160). ## 13.14.1 diff --git a/cli/lib/exec/spawn.js b/cli/lib/exec/spawn.js index 93595243cd54..e132b964e0a3 100644 --- a/cli/lib/exec/spawn.js +++ b/cli/lib/exec/spawn.js @@ -155,7 +155,7 @@ module.exports = { const { onStderrData } = overrides const envOverrides = util.getEnvOverrides(options) - const electronArgs = ['--ozone-platform-hint=auto'] + const electronArgs = [] const node11WindowsFix = isPlatform('win32') let startScriptPath diff --git a/cli/test/lib/exec/spawn_spec.js b/cli/test/lib/exec/spawn_spec.js index 6b4d7b46f0fd..26ad6d6713e7 100644 --- a/cli/test/lib/exec/spawn_spec.js +++ b/cli/test/lib/exec/spawn_spec.js @@ -121,7 +121,6 @@ describe('lib/exec/spawn', function () { return spawn.start('--foo', { foo: 'bar' }) .then(() => { expect(cp.spawn).to.be.calledWithMatch('/path/to/cypress', [ - '--ozone-platform-hint=auto', '--', '--foo', '--cwd', @@ -149,7 +148,6 @@ describe('lib/exec/spawn', function () { const args = cp.spawn.firstCall.args.slice(0, 2) // it is important for "--no-sandbox" to appear before "--" separator const expectedCliArgs = [ - '--ozone-platform-hint=auto', '--no-sandbox', '--', '--foo', @@ -175,7 +173,6 @@ describe('lib/exec/spawn', function () { .then(() => { expect(cp.spawn).to.be.calledWithMatch('node', [ p, - '--ozone-platform-hint=auto', '--', '--foo', '--cwd', @@ -201,7 +198,6 @@ describe('lib/exec/spawn', function () { .then(() => { expect(cp.spawn).to.be.calledWithMatch('node', [ p, - '--ozone-platform-hint=auto', '--', '--foo', '--cwd',