cypress 10.4+ in chrome 70 breaks with globalThis
See original GitHub issueCurrent behavior
Cypress run on chrome 70 cannot start with error: βUncaught ReferenceError: globalThis is not definedβ
Desired behavior
cypress run with chrome 70
Test code to reproduce
Any test with cypress 10.4+ run on chrome 70 should reproduce.
Cypress Version
10.4+
Node version
v16.5.0
Operating System
linux
Debug Logs
root@me-cd-test-k8s-3137-446pp-dqxkt-wgg0b:/home/jenkins/agent/workspace/ME-CD/test-k8s# DEBUG=cypress:launcher:* node test.js cypress/prepare/role.cy.js /tmp/test-result/3137/admin
β Verified Cypress! /root/.cache/Cypress/10.4.0/Cypress
[16160:0823/155424.906310:ERROR:zygote_host_impl_linux.cc(263)] Failed to adjust OOM score of renderer with pid 16344: Permission denied (13)
[16344:0823/155425.028386:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
2022-08-23T07:54:28.962Z cypress:launcher:detect detecting if the following browsers are present [ { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', versionRegex: /Google Chrome (\S+)/m, binary: [ 'google-chrome', 'chrome', 'google-chrome-stable' ], minSupportedVersion: 64 }, { name: 'chromium', family: 'chromium', channel: 'stable', displayName: 'Chromium', versionRegex: /Chromium (\S+)/m, binary: [ 'chromium-browser', 'chromium' ], minSupportedVersion: 64 }, { name: 'chrome', family: 'chromium', channel: 'beta', displayName: 'Chrome Beta', versionRegex: /Google Chrome (\S+) beta/m, binary: 'google-chrome-beta', minSupportedVersion: 64 }, { name: 'chrome', family: 'chromium', channel: 'canary', displayName: 'Canary', versionRegex: /Google Chrome Canary (\S+)/m, binary: 'google-chrome-canary', minSupportedVersion: 64 }, { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', versionRegex: /^Mozilla Firefox ([^\sab]+)$/m, binary: 'firefox', minSupportedVersion: 86 }, { name: 'firefox', family: 'firefox', channel: 'dev', displayName: 'Firefox Developer Edition', versionRegex: /^Mozilla Firefox (\S+b\S*)$/m, binary: [ 'firefox-developer-edition', 'firefox' ], minSupportedVersion: 86 }, { name: 'firefox', family: 'firefox', channel: 'nightly', displayName: 'Firefox Nightly', versionRegex: /^Mozilla Firefox (\S+a\S*)$/m, binary: [ 'firefox-nightly', 'firefox-trunk' ], minSupportedVersion: 86 }, { name: 'edge', family: 'chromium', channel: 'stable', displayName: 'Edge', versionRegex: /Microsoft Edge (\S+)/m, binary: [ 'edge', 'microsoft-edge' ], minSupportedVersion: 79 }, { name: 'edge', family: 'chromium', channel: 'canary', displayName: 'Edge Canary', versionRegex: /Microsoft Edge Canary (\S+)/m, binary: 'edge-canary', minSupportedVersion: 79 }, { name: 'edge', family: 'chromium', channel: 'beta', displayName: 'Edge Beta', versionRegex: /Microsoft Edge Beta (\S+)/m, binary: 'edge-beta', minSupportedVersion: 79 }, { name: 'edge', family: 'chromium', channel: 'dev', displayName: 'Edge Dev', versionRegex: /Microsoft Edge Dev (\S+)/m, binary: [ 'edge-dev', 'microsoft-edge-dev' ], minSupportedVersion: 79 } ]
Missing baseUrl in compilerOptions. tsconfig-paths will be skipped
2022-08-23T07:54:43.180Z cypress:launcher:detect detecting if the following browsers are present [ { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', versionRegex: /Google Chrome (\S+)/m, binary: [ 'google-chrome', 'chrome', 'google-chrome-stable' ], minSupportedVersion: 64 }, { name: 'chromium', family: 'chromium', channel: 'stable', displayName: 'Chromium', versionRegex: /Chromium (\S+)/m, binary: [ 'chromium-browser', 'chromium' ], minSupportedVersion: 64 }, { name: 'chrome', family: 'chromium', channel: 'beta', displayName: 'Chrome Beta', versionRegex: /Google Chrome (\S+) beta/m, binary: 'google-chrome-beta', minSupportedVersion: 64 }, { name: 'chrome', family: 'chromium', channel: 'canary', displayName: 'Canary', versionRegex: /Google Chrome Canary (\S+)/m, binary: 'google-chrome-canary', minSupportedVersion: 64 }, { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', versionRegex: /^Mozilla Firefox ([^\sab]+)$/m, binary: 'firefox', minSupportedVersion: 86 }, { name: 'firefox', family: 'firefox', channel: 'dev', displayName: 'Firefox Developer Edition', versionRegex: /^Mozilla Firefox (\S+b\S*)$/m, binary: [ 'firefox-developer-edition', 'firefox' ], minSupportedVersion: 86 }, { name: 'firefox', family: 'firefox', channel: 'nightly', displayName: 'Firefox Nightly', versionRegex: /^Mozilla Firefox (\S+a\S*)$/m, binary: [ 'firefox-nightly', 'firefox-trunk' ], minSupportedVersion: 86 }, { name: 'edge', family: 'chromium', channel: 'stable', displayName: 'Edge', versionRegex: /Microsoft Edge (\S+)/m, binary: [ 'edge', 'microsoft-edge' ], minSupportedVersion: 79 }, { name: 'edge', family: 'chromium', channel: 'canary', displayName: 'Edge Canary', versionRegex: /Microsoft Edge Canary (\S+)/m, binary: 'edge-canary', minSupportedVersion: 79 }, { name: 'edge', family: 'chromium', channel: 'beta', displayName: 'Edge Beta', versionRegex: /Microsoft Edge Beta (\S+)/m, binary: 'edge-beta', minSupportedVersion: 79 }, { name: 'edge', family: 'chromium', channel: 'dev', displayName: 'Edge Dev', versionRegex: /Microsoft Edge Dev (\S+)/m, binary: [ 'edge-dev', 'microsoft-edge-dev' ], minSupportedVersion: 79 } ]
====================================================================================================
(Run Starting)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Cypress: 10.4.0 β
β Browser: Chrome 70 (headless) β
β Node Version: v16.5.0 (/usr/local/bin/node) β
β Specs: 1 found (role.cy.js) β
β Searched: cypress/prepare/role.cy.js β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Running: role.cy.js (1 of 1)
[cypress-log-to-output] Attempting to connect to Chrome Debugging Protocol
2022-08-23T07:54:44.983Z cypress:launcher:browsers launching browser { browser: { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', version: '70.0.3538.77', path: 'google-chrome', minSupportedVersion: 64, majorVersion: 70, isHeadless: true, isHeaded: false }, url: 'about:blank' }
2022-08-23T07:54:44.985Z cypress:launcher:browsers spawning browser with args { args: [ 'about:blank', '--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-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', '--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', '--disable-gpu', '--no-sandbox', '--proxy-server=http://localhost:39355', '--headless', '--window-size=1280,720', '--force-device-scale-factor=1', '--remote-debugging-port=33382', '--remote-debugging-address=127.0.0.1', '--user-data-dir=/root/.config/Cypress/cy/production/browsers/chrome-stable/run-16160', '--disk-cache-dir=/root/.config/Cypress/cy/production/browsers/chrome-stable/run-16160/CypressCache' ] }
2022-08-23T07:54:45.198Z cypress:launcher:browsers chrome stderr: [0823/155445.197221:ERROR:gpu_process_transport_factory.cc(980)] Lost UI shared context.
2022-08-23T07:54:45.200Z cypress:launcher:browsers chrome stderr: DevTools listening on ws://127.0.0.1:33382/devtools/browser/13cdca87-00d4-4c07-903c-5064f790ef5a
2022-08-23T07:54:45.208Z cypress:launcher:browsers chrome stderr: [0823/155445.206777:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 16474: Permission denied (13)
[cypress-log-to-output] Connected to Chrome Debugging Protocol
2022-08-23T07:54:46.896Z cypress:launcher:browsers chrome stderr: [0823/155446.895003:INFO:CONSOLE(39990)] "Uncaught ReferenceError: globalThis is not defined", source: http://me-e2e-cypress10.me.magic.com/__/assets/index.23f3e8ba.js (39990)
Other
globalThis is not supported in chrome 70, 10.4+ somehow use it directly in bundled code.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Changelog - Cypress Documentation
Read our Migration Guide which explains the breaking changes in more detail. ... in Cypress 10.0.0 where Cypress was incompatible with Chrome v64...
Read more >Open Source Used In slido-test 22.06 - Cisco
This document contains licenses and notices for open source software used in this product.
Read more >Playground | FastStore
Explore our playground to grab an idea of the developer experience provided by FastStore.
Read more >https://raw.githubusercontent.com/elastic/kibana/m...
... +70Q== dependencies: "@babel/highlight" "^7.18.6" ... dependencies: "@cypress/webpack-preprocessor" "^5.11.0" chalk "4.1.2" dayjs "1.10.7" debug "4.3.4"Β ...
Read more >https://stash.intevity.com/users/alessandro.maclai...
... 14.4.2 '@nrwl/cypress': 14.4.2 '@nrwl/eslint-plugin-nx': 14.4.2 '@nrwl/jest': ... +70Q==} engines: {node: '>=6.9.0'} dependencies: '@babel/highlight':Β ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @levinqdl , thanks for reporting this issue! I have confirmed that we unintentionally introduced some code in Cypress v10.4.0 that is incompatible with older versions of Chrome. Cypress v10.3.1 appears to work as expected in Chrome v70. Weβll get this routed to the team
Released in
10.8.0
.This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v10.8.0, please open a new issue.