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.

CLI tries to launch a Chrome instance even when given a remote hostname

See original GitHub issue

Provide the steps to reproduce

  1. Run LH on any URL via the CLI, passing --hostname and --port to point at a remote Chrome instance

What is the current behavior?

Lighthouse launches a local Chrome instance, but ignores it and connects to the remote instance anyways. If this isn’t possible because Chrome isn’t installed (for example, in CI environments), the entire Lighthouse run crashes out.

What is the expected behavior?

Lighthouse doesn’t launch a local Chrome instance (and fail the run if it isn’t installed); it just connects to the remote instance.

Environment Information

  • Affected Channels: CLI
  • Lighthouse version: 7.2.0
  • Chrome version: N/A
  • Node.js version: 14.15.4
  • Operating System: macOS Catalina 10.15.7

Related issues

https://github.com/GoogleChrome/lighthouse/issues/2727

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
connorjclarkcommented, Feb 25, 2021

Thanks for taking this, Tyler! let us know if you have any questions.

1reaction
patrickhulcecommented, Feb 25, 2021

Thanks for filing @tkindy!

No this issue is really somewhat unrelated to chrome-launcher, if a hostname other than localhost is used, then lighthouse shouldn’t even be trying to launch Chrome.

AFAICT, lighthouse should still respect the hostname setting but you’ll have a useless Chrome launched and sitting around on your localhost as well (and this might fail if Chrome can’t be started on your machine).

https://github.com/GoogleChrome/lighthouse/blob/fb18dfe70e89d752a46deabe2de8a21b414ceb7e/lighthouse-core/index.js#L38-L45

Either way we’ll want to fix that up on the lighthouse side.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set up Chrome Remote Desktop for Linux on Compute Engine
This tutorial shows you how to set up the Chrome Remote Desktop service on a Debian Linux virtual machine (VM) instance on Compute...
Read more >
How to Connect to a Remote Server Over SSH on Chrome
Open Chrome and type the following into the URL/address bar, replacing [username] with the username of the remote user and [ip-address] with ...
Read more >
Command Line Interface | API | Docs - TestCafe
The following example demonstrates how to run a test in two browsers: one browser is specified with an alias, the other browser is...
Read more >
Chrome remote debugging doesn't work with IP - Stack Overflow
is the port open on windows? when not you have to add to the a windows firewall rules for this port! – Azd325....
Read more >
Configuring a SOCKS proxy server in Chrome
To configure chrome to proxy traffic through the SOCKS v5 proxy server myproxy:8080, launch chrome with these two command-line flags:.
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