question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using --headless mode isn't hiding the chrome browser

See original GitHub issue

Please make sure you have read the submission guidelines before posting an issue

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • I am running the latest version
  • I checked the documentation (nx.dev) and found no answer
  • I checked to make sure that this issue has not already been filed
  • I’m reporting the issue to the correct repository (not related to React, Angular or any dependency)

Expected Behavior

Please describe the behavior you are expecting

Current Behavior

What is the current behavior?

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. step 1
  2. step 2

If you can provide steps to reproduce from scratch, that would be enormously appreciated (i.e. where the first step is npx create-nx-workspace@latest repro-workspace)

Context

Please provide any relevant information about your setup:

  • version of Nx used (Please run nx report at the root of your workspace and copy the results here if you are using Nx 8.6.1 or greater)
  • 3rd-party libraries and their versions
  • and most importantly - a use-case that fails

A minimal reproduction scenario allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem.

Failure Logs

Please include any relevant log snippets or files here.

Other

Any other relevant information that will help us help you.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ftischlercommented, Mar 6, 2020

Same problem for me when using cypress with nx e2e projectName —browser chrome —headless on @nrwl/cypress@9.0.4 with cypress@4.1.0

1reaction
ftischlercommented, Mar 18, 2020

I prepared a reproduction for you.

The script yarn example-e2e should run cypress with browser Chrome in headless mode but it’s starting with UI.

My current workaround is to run cypress with the following command

cypress run -P path/to/e2e-app --browser chrome --headless

after changing plugins/index.js to look like this:

const { preprocessTypescript } = require('@nrwl/cypress/plugins/preprocessor');
const { cwd } = require('process');
const { join } = require('path');

module.exports = (on, config) => {
  // `on` is used to hook into various events Cypress emits
  // `config` is the resolved Cypress config

  // Preprocess Typescript file using Nx helper
  config.env.tsConfig = join(cwd(), 'tsconfig.e2e.json');
  on('file:preprocessor', preprocessTypescript(config));
};
Read more comments on GitHub >

github_iconTop Results From Across the Web

It is *not* possible to detect and block Chrome headless - Intoli
A few months back, I wrote a popular article called Making Chrome Headless Undetectable in response to one called Detecting Chrome Headless ......
Read more >
Getting Started with Headless Chrome - Chrome Developers
It's a way to run the Chrome browser in a headless environment. Essentially, running Chrome without chrome! It brings all modern web platform ......
Read more >
Unable to locate elements on webpage with headless chrome
This doesn't hide the chrome task from the taskbar, but the Chrome tab itself will still be hidden for the User. Save this...
Read more >
How to run a headless Chrome browser in Selenium WebDriver.
Starting with version 60, the Chrome browser introduced the ability to run in headless mode. We now have the ability to launch the...
Read more >
Is it Possible to Start Chrome Hidden using Selenium in VBA?
Your browser can't play this video. Learn more.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found