Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEBUG log error message incorrectly claims WebKit is enabled #30229

Open
MikeMcC399 opened this issue Sep 12, 2024 · 2 comments
Open

DEBUG log error message incorrectly claims WebKit is enabled #30229

MikeMcC399 opened this issue Sep 12, 2024 · 2 comments
Labels
type: user experience Improvements needed for UX

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Sep 12, 2024

Current behavior

Although experimentalWebKitSupport is undefined and defaults to false
DEBUG setting with cypress:server:browsers:utils logs an error

cypress:server:browsers:utils WebKit is enabled, but there was an error constructing the WebKit browser: { err: Error: Cannot find module 'playwright-webkit' Require stack: - /home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/packages/server/lib/browsers/utils.ts at node:internal/modules/cjs/loader:1084:15 at Function._resolveFilename (node:electron/js2c/browser_init:2:116118) at resolve (node:internal/modules/cjs/helpers:127:19) at Function.resolve (evalmachine.:1:758945) at P (:2753:103503) at Object.I [as get] (:2753:104338) at W (:2844:92715) at Object.J (:2844:95421) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/packages/server/lib/browsers/utils.ts' ] } } +0ms

Desired behavior

If experimentalWebKitSupport is undefined or set to to false, there should be no WebKit browser error in the debug logs. This is a misleading message.

Test code to reproduce

Execute:

git clone https://github.com/cypress-io/github-action
cd github-action/examples/basic
npm ci
DEBUG=cypress:server:browsers:utils,cypress:config:browser npx cypress run

Cypress Version

13.14.2

Node version

v20.17.0 LTS

Operating System

Ubuntu 22.04.5 LTS

Debug Logs

experimentalWebKitSupport: false,

 ...

  cypress:config:browser validating configuration {} +3ms
  cypress:server:browsers:utils searching for browser { nameOrPath: 'electron', filter: { name: 'electron', channel: 'stable' }, knownBrowsers: [ { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', version: '128.0.6613.137', path: 'google-chrome', minSupportedVersion: 64, majorVersion: '128' }, { name: 'chromium', family: 'chromium', channel: 'stable', displayName: 'Chromium', version: '128.0.6613.119', path: 'chromium', profilePath: '/home/mike/snap/chromium/current', minSupportedVersion: 64, majorVersion: '128' }, { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', version: '130.0', path: 'firefox', profilePath: '/home/mike/snap/firefox/current', minSupportedVersion: 86, majorVersion: '130' }, { name: 'edge', family: 'chromium', channel: 'stable', displayName: 'Edge', version: '128.0.2739.67', path: 'microsoft-edge', minSupportedVersion: 79, majorVersion: '128' }, { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '118.0.5993.159', path: '', majorVersion: 118 } ] } +319ms
  cypress:server:browsers:utils getBrowsers +17ms
  cypress:server:browsers:utils WebKit is enabled, but there was an error constructing the WebKit browser: { err: Error: Cannot find module 'playwright-webkit' Require stack: - /home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/packages/server/lib/browsers/utils.ts     at node:internal/modules/cjs/loader:1084:15     at Function._resolveFilename (node:electron/js2c/browser_init:2:116118)     at resolve (node:internal/modules/cjs/helpers:127:19) at Function.resolve (evalmachine.<anonymous>:1:758945) at P (<embedded>:2753:103503) at Object.I [as get] (<embedded>:2753:104338) at W (<embedded>:2844:92715) at Object.J (<embedded>:2844:95421) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/packages/server/lib/browsers/utils.ts' ] } } +0ms

Other

No response

@MikeMcC399 MikeMcC399 changed the title Log error message incorrectly claims WebKit is enabled DEBUG log error message incorrectly claims WebKit is enabled Sep 12, 2024
@jennifer-shehane
Copy link
Member

@MikeMcC399 Yah this is not the best wording. I would just remove the 'Webkit is enabled, but ' part entirely

@jennifer-shehane jennifer-shehane added the type: user experience Improvements needed for UX label Sep 16, 2024
@MikeMcC399
Copy link
Contributor Author

@jennifer-shehane

I would just remove the 'Webkit is enabled, but ' part entirely

Changing the text would remove the inconsistency in the error message, however the bigger question is why it's trying to find the WebKit browser when WebKit is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: user experience Improvements needed for UX
Projects
None yet
Development

No branches or pull requests

2 participants