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

Error Runtime.addBinding with Chromium 66 #30205

Open
MikeMcC399 opened this issue Sep 9, 2024 · 3 comments
Open

Error Runtime.addBinding with Chromium 66 #30205

MikeMcC399 opened this issue Sep 9, 2024 · 3 comments

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Sep 9, 2024

Current behavior

Cypress fails to run with Chromium 66. The error is

'Runtime.addBinding' wasn't found

Desired behavior

Cypress should run with Chromium 66 since the documentation states:

Cypress supports the browser versions below:

Chrome 64 and above. Chrome 80 and above is required for cypress open usage.

Test code to reproduce

Set up default Cypress project with single example spec.

Install Chromium 66 into project with

npx @puppeteer/browsers install chromium@540276

Run Cypress

npx cypress run --browser ./chromium/linux-540276/chrome-linux/chrome

Cypress Version

13.14.2

Node version

v18.20.4

Operating System

Ubuntu 22.04.4 LTS

Debug Logs

$ npx cypress run --browser /home/mike/github/cy-chromium-66/chromium/linux-540276/chrome-linux/chrome

DevTools listening on ws://127.0.0.1:45645/devtools/browser/f13f492d-ee87-4fe5-b2e1-f77ef887ac1c
  cypress:server:browsers:utils getBrowsers +0ms
  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 getBrowsers] (<embedded>:2753:104338) at b.machineBrowsers (<embedded>:2330:76158) at T._setCurrentProject (<embedded>:2709:67291) at new T (<embedded>:2709:60179) at new S (<embedded>:2709:121931) at q (<embedded>:2844:42571) at s.exports (<embedded>:2844:100215) at <embedded>:2851:3280 at tryCatcher (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/util.js:16:23) at Function.<anonymous> (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/method.js:39:29) at Object.runElectron (<embedded>:2851:3050) at Object.startInMode (<embedded>:2851:5738) at <embedded>:2851:4826 at tryCatcher (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:512:31) at Promise._settlePromise (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:569:18) at Promise._settlePromise0 (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:694:18) at Promise._fulfill (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:638:18) at PromiseArray._resolve (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise_array.js:126:19) at PromiseArray._promiseFulfilled (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise_array.js:144:14) at Promise._settlePromise (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:574:26) at Promise._settlePromise0 (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:694:18) at Promise._fulfill (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:638:18) at Promise._settlePromise (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:582:21) at Promise._settlePromise0 (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:694:18) at Promise._fulfill (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:638:18) at Promise._settlePromise (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:582:21) at Promise._settlePromise0 (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:694:18) at Promise._fulfill (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:638:18) at PromiseArray._resolve (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise_array.js:126:19) at PromiseArray._promiseFulfilled (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise_array.js:144:14) at Promise._settlePromise (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:574:26) at Promise._settlePromise0 (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:694:18) at Promise._fulfill (/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/promise.js:638:18) at /home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/node_modules/bluebird/js/release/nodeback.js:42:21 at <embedded>:445:121677 { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/mike/.cache/Cypress/13.14.2/Cypress/resources/app/packages/server/lib/browsers/utils.ts' ] } } +2ms
  cypress:server:browsers:utils found browsers { browsers: [ { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', version: '128.0.6613.119', path: 'google-chrome', minSupportedVersion: 64, majorVersion: '128' }, { name: 'chromium', family: 'chromium', channel: 'stable', displayName: 'Chromium', version: '128.0.6613.119', path: 'chromium-browser', profilePath: '/home/mike/snap/chromium/current', minSupportedVersion: 64, majorVersion: '128' }, { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', version: '115.14.0esr', path: 'firefox', minSupportedVersion: 86, majorVersion: '115' }, { name: 'edge', family: 'chromium', channel: 'stable', displayName: 'Edge', version: '128.0.2739.67', path: 'microsoft-edge', minSupportedVersion: 79, majorVersion: '128' } ] } +478ms
  cypress:server:browsers:utils searching for browser { nameOrPath: '/home/mike/github/cy-chromium-66/chromium/linux-540276/chrome-linux/chrome', filter: { name: '/home/mike/github/cy-chromium-66/chromium/linux-540276/chrome-linux/chrome', channel: 'stable' }, knownBrowsers: [ { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', version: '128.0.6613.119', path: 'google-chrome', minSupportedVersion: 64, majorVersion: '128' }, { name: 'chromium', family: 'chromium', channel: 'stable', displayName: 'Chromium', version: '128.0.6613.119', path: 'chromium-browser', profilePath: '/home/mike/snap/chromium/current', minSupportedVersion: 64, majorVersion: '128' }, { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', version: '115.14.0esr', path: 'firefox', minSupportedVersion: 86, majorVersion: '115' }, { 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 } ] } +60ms
  cypress:server:browsers:utils getBrowsers +82ms
  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
  cypress:server:browsers:utils found browsers { browsers: [ { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', version: '128.0.6613.119', path: 'google-chrome', minSupportedVersion: 64, majorVersion: '128' }, { name: 'chromium', family: 'chromium', channel: 'stable', displayName: 'Chromium', version: '128.0.6613.119', path: 'chromium-browser', profilePath: '/home/mike/snap/chromium/current', minSupportedVersion: 64, majorVersion: '128' }, { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', version: '115.14.0esr', path: 'firefox', minSupportedVersion: 86, majorVersion: '115' }, { name: 'edge', family: 'chromium', channel: 'stable', displayName: 'Edge', version: '128.0.2739.67', path: 'microsoft-edge', minSupportedVersion: 79, majorVersion: '128' } ] } +377ms
  cypress:server:browsers:utils searching for browser { nameOrPath: '/home/mike/github/cy-chromium-66/chromium/linux-540276/chrome-linux/chrome', filter: { name: '/home/mike/github/cy-chromium-66/chromium/linux-540276/chrome-linux/chrome', channel: 'stable' }, knownBrowsers: [ { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', version: '128.0.6613.119', path: 'google-chrome', minSupportedVersion: 64, majorVersion: '128' }, { name: 'chromium', family: 'chromium', channel: 'stable', displayName: 'Chromium', version: '128.0.6613.119', path: 'chromium-browser', profilePath: '/home/mike/snap/chromium/current', minSupportedVersion: 64, majorVersion: '128' }, { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', version: '115.14.0esr', path: 'firefox', minSupportedVersion: 86, majorVersion: '115' }, { 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 } ] } +57ms

====================================================================================================

  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:        13.14.2                                                                        │
  │ Browser:        Custom Chromium 66 (headless)                                                  │
  │ Node Version:   v18.20.4 (/home/mike/n/bin/node)                                               │
  │ Specs:          1 found (spec.cy.js)                                                           │
  │ Searched:       cypress/e2e/**/*.cy.{js,jsx,ts,tsx}                                            │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running:  spec.cy.js                                                                      (1 of 1)
  cypress:server:browsers:chrome reading chrome preferences... { userDir: '/home/mike/.config/Cypress/cy/production/browsers/chromium-stable/run-15486', CHROME_PREFERENCE_PATHS: { default: 'Default/Preferences', defaultSecure: 'Default/Secure Preferences', localState: 'Local State' } } +0ms
  cypress:server:browsers:chrome chrome is running headlessly, not installing extension +2ms
  cypress:server:browsers:chrome launching in chrome with debugging port { url: 'http://localhost:43005/__/#/specs/runner?file=cypress/e2e/spec.cy.js', args: [ '--test-type', '--ignore-certificate-errors', '--start-maximized', '--silent-debugger-extension-api', '--no-default-browser-check', '--no-first-run', '--noerrdialogs', '--enable-fixed-layout', '--disable-popup-blocking', '--disable-password-generation', '--disable-single-click-autofill', '--disable-prompt-on-repos', '--disable-background-timer-throttling', '--disable-renderer-backgrounding', '--disable-renderer-throttling', '--disable-backgrounding-occluded-windows', '--disable-restore-session-state', '--disable-new-profile-management', '--disable-new-avatar-menu', '--allow-insecure-localhost', '--reduce-security-for-testing', '--enable-automation', '--disable-print-preview', '--disable-component-extensions-with-background-pages', '--disable-device-discovery-notifications', '--autoplay-policy=no-user-gesture-required', '--disable-site-isolation-trials', '--metrics-recording-only', '--disable-prompt-on-repost', '--disable-hang-monitor', '--disable-sync', '--disable-web-resources', '--safebrowsing-disable-download-protection', '--disable-client-side-phishing-detection', '--disable-component-update', "--simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT'", '--disable-default-apps', '--disable-features=Translate,PrivacySandboxSettings4', '--use-fake-ui-for-media-stream', '--use-fake-device-for-media-stream', '--disable-ipc-flooding-protection', '--disable-backgrounding-occluded-window', '--disable-breakpad', '--password-store=basic', '--use-mock-keychain', '--disable-dev-shm-usage', '--enable-precise-memory-info', '--disable-gpu', '--no-sandbox', '--proxy-server=http://localhost:43005', '--disable-blink-features=RootLayerScrolling', '--headless', '--window-size=1280,720', '--force-device-scale-factor=1', '--remote-debugging-port=36449', '--remote-debugging-address=127.0.0.1', '--user-data-dir=/home/mike/.config/Cypress/cy/production/browsers/chromium-stable/run-15486', '--disk-cache-dir=/home/mike/.config/Cypress/cy/production/browsers/chromium-stable/run-15486/CypressCache' ], port: 36449 } +0ms
  cypress:server:browsers:cri-client creating cri client with {
  host: undefined,
  port: undefined,
  targetId: 'ws://127.0.0.1:36449/devtools/browser/6fcfe49e-d83b-467c-8997-505264450ee9'
} +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:36449/devtools/browser/6fcfe49e-d83b-467c-8997-505264450ee9 adding connection event listener for  cdp-connection-reconnect-error +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:36449/devtools/browser/6fcfe49e-d83b-467c-8997-505264450ee9 adding connection event listener for  cdp-connection-reconnect +0ms
  cypress:server:browsers:cri-client connecting { connected: false, target: 'ws://127.0.0.1:36449/devtools/browser/6fcfe49e-d83b-467c-8997-505264450ee9' } +2ms
  cypress:server:browsers:cri-client connected { connected: true, target: 'ws://127.0.0.1:36449/devtools/browser/6fcfe49e-d83b-467c-8997-505264450ee9' } +14ms
  cypress:server:browsers:cri-client registering enable command Target.setDiscoverTargets +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:36449/devtools/browser/6fcfe49e-d83b-467c-8997-505264450ee9 attaching event listener to cdp connection Target.attachedToTarget +16ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Target.attachedToTarget' } +1ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:36449/devtools/browser/6fcfe49e-d83b-467c-8997-505264450ee9 attaching event listener to cdp connection Target.targetDestroyed +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Target.targetDestroyed' } +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:36449/devtools/browser/6fcfe49e-d83b-467c-8997-505264450ee9 attaching event listener to cdp connection Inspector.targetReloadedAfterCrash +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Inspector.targetReloadedAfterCrash' } +0ms
  cypress:server:browsers:browser-cri-client Attaching to target url about:blank +0ms
  cypress:server:browsers:cri-client creating cri client with {
  host: '127.0.0.1',
  port: 36449,
  targetId: 'E629E851175694D8019742A48C141067'
} +1ms
  cypress:server:browsers:cdp-connection:E629E851175694D8019742A48C141067 adding connection event listener for  cdp-connection-reconnect-error +0ms
  cypress:server:browsers:cdp-connection:E629E851175694D8019742A48C141067 adding connection event listener for  cdp-connection-reconnect +0ms
  cypress:server:browsers:cdp-connection:E629E851175694D8019742A48C141067 attaching event listener to cdp connection Target.targetCrashed +0ms
  cypress:server:browsers:cdp-connection:E629E851175694D8019742A48C141067 attaching event listener to cdp connection Target.attachedToTarget +0ms
  cypress:server:browsers:cri-client connecting { connected: false, target: 'E629E851175694D8019742A48C141067' } +0ms
  cypress:server:browsers:cri-client connected { connected: true, target: 'E629E851175694D8019742A48C141067' } +4ms
  cypress:server:browsers:cri-client registering enable command Runtime.enable +0ms
  cypress:server:browsers:cri-client registering enable command Runtime.addBinding +2ms
  cypress:server:browsers:cri-client Encountered error on send { command: 'Runtime.addBinding', params: { name: 'cypressSendToServer-/__socket/default' }, sessionId: undefined, err: p [Error]: 'Runtime.addBinding' wasn't found at <embedded>:653:577907 at _._handleMessage (<embedded>:653:580210) at A.<anonymous> (<embedded>:653:579849)     at A.emit (node:events:514:28) at f.U (<embedded>:653:565033)     at f.emit (node:events:514:28) at f.dataMessage (<embedded>:653:545408) at f.getData (<embedded>:653:544590) at f.startLoop (<embedded>:653:541297) at f._write (<embedded>:653:540652)     at writeOrBuffer (node:internal/streams/writable:392:12)     at _write (node:internal/streams/writable:333:10)     at f.write (node:internal/streams/writable:337:10) at Socket.W (<embedded>:653:565719)     at Socket.emit (node:events:514:28)     at addChunk (node:internal/streams/readable:324:12)     at readableAddChunk (node:internal/streams/readable:297:9)     at Socket.push (node:internal/streams/readable:234:10)     at TCP.onStreamRead (node:internal/stream_base_commons:190:23) { request: { method: 'Runtime.addBinding', params: [Object], sessionId: undefined }, response: { code: -32601, message: "'Runtime.addBinding' wasn't found" } } } +1ms
'Runtime.addBinding' wasn't found
Error: 'Runtime.addBinding' wasn't found
    at <embedded>:653:577907
    at _._handleMessage (<embedded>:653:580210)
    at A.<anonymous> (<embedded>:653:579849)
    at A.emit (node:events:514:28)
    at f.U (<embedded>:653:565033)
    at f.emit (node:events:514:28)
    at f.dataMessage (<embedded>:653:545408)
    at f.getData (<embedded>:653:544590)
    at f.startLoop (<embedded>:653:541297)
    at f._write (<embedded>:653:540652)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
    at f.write (node:internal/streams/writable:337:10)
    at Socket.W (<embedded>:653:565719)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Socket.push (node:internal/streams/readable:234:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)

Other

@jennifer-shehane
Copy link
Member

This is very unlikely to be addressed. We intend to drop support for these versions as soon as next quarter: #29977

@MikeMcC399
Copy link
Contributor Author

@jennifer-shehane

This is very unlikely to be addressed. We intend to drop support for these versions as soon as next quarter: #29977

I appreciate that it is unlikely for Cypress to be able to support Chromium 66 again.

I did some further tests and found that Chromium 79 doesn't work either with Cypress 13.14.2 in run mode. It times out:

Timed out waiting for the browser to connect. Retrying...
The browser never connected. Something is wrong. The tests cannot run. Aborting...

I went back to previous Cypress versions and found that Cypress 11.2.0 was a working version for Chromium 79 and it failed on Cypress 12.17.4.

Should there be any documentation changes made due to this situation? The documentation says that Chrome 64 - 69 should work in run mode, however that appears only to be true for Cypress 11.x, not for Cypress 12.x or 13.x.

@MikeMcC399
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants