Skip to content

After update to cypress:including_4 + we have just a blank window for Chrome browser #270

Closed
@seyfer

Description

Current behavior:

Using Docker image cypress:including_3.8.0 - everything works fine.

We use this mapping to make cypress open work

cypress:
    volumes:
        # cypress X11 mapping
        - /tmp/.X11-unix:/tmp/.X11-unix
        - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket
    environment:
        # cypress X11 mapping
        - DISPLAY=unix${DISPLAY}

The host OS is Ubuntu 18.04, latest updates.

But after update to cypress:including_4 + we have just a blank screen for Chrome browser.
Test runner starts without problems, but running any test does not open Chrome, just a blank window appears.

Screenshot from 2020-02-27 11-08-15

Nevertheless, I can see that the test is running in the console log. We just cannot see it in Chrome.

This is the starting log. I tried with export DEBUG=cypress:* option and cannot see any errors except these.

cypress:server:plugins execute plugin event 'before:browser:launch' Node 'v12.8.1' with args: { channel: 'stable', displayName: 'Chrome', family: 'chromium', isChosen: true, majorVersion: 80, name: 'chrome', path: 'google-chrome', version: '80.0.3987.87', isHeaded: true, isHeadless: false } { preferences: { default: {}, defaultSecure: {}, localState: {} }, 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-save-password-bubble', '--disable-single-click-autofill', '--disable-prompt-on-repos', '--disable-background-timer-throttling', '--disable-renderer-backgrounding', '--disable-renderer-throttling', '--disable-restore-session-state', '--disable-translate', '--disable-new-profile-management', '--disable-new-avatar-menu', '--allow-insecure-localhost', '--reduce-security-for-testing', '--enable-automation', '--disable-device-discovery-notifications', '--disable-infobars', '--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-auto-update', '--safebrowsing-disable-download-protection', '--disable-client-side-phishing-detection', '--disable-component-update', '--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-gpu', '--no-sandbox', '--proxy-server=http://localhost:43005', '--proxy-bypass-list=<-loopback>', '--remote-debugging-port=38611', '--remote-debugging-address=127.0.0.1' ], extensions: [] } undefined +0ms
    '--ignore-certificate-errors',
    '--ignore-certificate-errors',
  cypress:launcher spawning browser { channel: 'stable', displayName: 'Chrome', family: 'chromium', isChosen: true, majorVersion: 80, name: 'chrome', path: 'google-chrome', version: '80.0.3987.87', isHeaded: true, isHeadless: false } with 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-save-password-bubble --disable-single-click-autofill --disable-prompt-on-repos --disable-background-timer-throttling --disable-renderer-backgrounding --disable-renderer-throttling --disable-restore-session-state --disable-translate --disable-new-profile-management --disable-new-avatar-menu --allow-insecure-localhost --reduce-security-for-testing --enable-automation --disable-device-discovery-notifications --disable-infobars --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-auto-update --safebrowsing-disable-download-protection --disable-client-side-phishing-detection --disable-component-update --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-gpu --no-sandbox --proxy-server=http://localhost:43005 --proxy-bypass-list=<-loopback> --remote-debugging-port=38611 --remote-debugging-address=127.0.0.1 --window-size=1920,1080 --disable-gpu --no-sandbox --disable-setuid-sandbox --disable-dev-shm-usage --disable-features=VizDisplayCompositor --load-extension=/root/.config/Cypress/cy/production/browsers/chrome-stable/interactive/CypressExtension,/root/.cache/Cypress/4.0.2/Cypress/resources/app/packages/extension/theme --user-data-dir=/root/.config/Cypress/cy/production/browsers/chrome-stable/interactive --disk-cache-dir=/root/.config/Cypress/cy/production/browsers/chrome-stable/interactive/CypressCache +1ms
  cypress:network:connect received error on connect, retrying { iteration: 0, delay: 100, err: Error: connect ECONNREFUSED 127.0.0.1:38611     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14) { errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 38611 } } +15s
  cypress:network:connect received error on connect, retrying { iteration: 1, delay: 100, err: Error: connect ECONNREFUSED 127.0.0.1:38611     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14) { errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 38611 } }

Desired behavior:

Chrome browser opens normally with Cypress interface and runs the test as it works with Docker image cypress/included:3.8.0

Test code to reproduce

Use cypress/uncluded:4.0.2, have such docker config

cypress:
  image: cypress/included:4.0.2
  restart: always
  entrypoint: sh -c
  command: ["sleep infinity"]
  depends_on:
      - varnish
  security_opt:
      # make chrome security happy
      - apparmor:unconfined
  volumes:
      - ./data/www/symfony:/e2e
  working_dir: /e2e
cypress:
    volumes:
        # cypress X11 mapping
        - /tmp/.X11-unix:/tmp/.X11-unix
        - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket
    environment:
        # cypress X11 mapping
        - DISPLAY=unix${DISPLAY}

Run the command such as

xhost + && docker-compose exec cypress bash -l -c "export DEBUG=cypress:* && cypress open --browser chrome --project cypress/backend/"

It works with 3.8.0
It doesn't for 4.0.2

I think that issue is the newer chrome browser. Something changed starting from Chrome 78.
These are options which worked for us with Chrome 77

launchOptions.args.push('--window-size=1920,1080');
launchOptions.args.push('--disable-gpu');
launchOptions.args.push('--no-sandbox');
launchOptions.args.push('--disable-setuid-sandbox');
launchOptions.args.push('--disable-dev-shm-usage');
launchOptions.args.push('--disable-features=VizDisplayCompositor');

Now it doesn't work with or without these options.
With Cypress builds with Chrome 78-80 we cannot connect to Chrome anymore?
What options could be missing?

Versions

Ubuntu 18.04, Chrome 80, Cypress 4.0.2

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions