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

docs: fix multiline xvfb-run command #14471

Merged
merged 1 commit into from
Oct 27, 2022
Merged

docs: fix multiline xvfb-run command #14471

merged 1 commit into from
Oct 27, 2022

Conversation

TechnologyClassroom
Copy link
Contributor

Summary

This is a documentation fix as the xvfb-run command for headless chromium does not currently work.

This PR adds a trailing backslash to a multiline command. Without the trailing backslash, the command is incomplete when pasted.

Output without the change looks something like this (There are other warnings that can be ignored):

/etc/chromium.d/README: line 1: Any: command not found                                                                                      
dpkg-query: no packages found matching bluealsa
[17369:17369:1027/092051.805408:ERROR:component_loader.cc(193)] Failed to parse extension manifest.
[17435:17435:1027/092052.296294:ERROR:gpu_init.cc(486)] Passthrough is not supported, GL is egl, ANGLE is
[17435:17435:1027/092052.369356:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[17521:17521:1027/092052.734923:ERROR:gpu_init.cc(486)] Passthrough is not supported, GL is egl, ANGLE is
[17521:17521:1027/092052.807645:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[17547:17547:1027/092052.935525:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
[17513:7:1027/092052.949790:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateComma
ndBuffer.
^C[17547:17547:1027/092531.004289:ERROR:connection.cc(46)] X connection error received.
[17547:17558:1027/092531.013258:ERROR:connection.cc(46)] X connection error received.
-bash: --start-maximized: command not found

lighthouse then looks like this when it tries to connect (There are other warnings that can be ignored):

  LH:ChromeLauncher No debugging port found on port 9222, launching a new Chrome. +0ms
  LH:ChromeLauncher Waiting for browser. +88ms
  LH:ChromeLauncher Waiting for browser... +1ms
...
  LH:ChromeLauncher Waiting for browser.....................................................................................................
.. +503ms
  LH:ChromeLauncher:error connect ECONNREFUSED 127.0.0.1:9222 +4ms
  LH:ChromeLauncher:error Logging contents of /tmp/lighthouse.OycuoNt/chrome-err.log +0ms
  LH:ChromeLauncher:error /etc/chromium.d/README: line 1: Any: command not found
  LH:ChromeLauncher:error dpkg-query: no packages found matching bluealsa
  LH:ChromeLauncher:error [17757:17757:1027/092133.850895:ERROR:ozone_platform_x11.cc(247)] Missing X server or $DISPLAY
  LH:ChromeLauncher:error [17757:17757:1027/092133.851052:ERROR:env.cc(226)] The platform failed to initialize.  Exiting.
  LH:ChromeLauncher:error  +1ms
Unable to connect to Chrome

With the change the xvfb-run command succeeds (There are other warnings that can be ignored):

/etc/chromium.d/README: line 1: Any: command not found
dpkg-query: no packages found matching bluealsa
[18975:18975:1027/092559.171562:ERROR:component_loader.cc(193)] Failed to parse extension manifest.

DevTools listening on ws://127.0.0.1:9222/devtools/browser/08b41b3e-1299-4582-9d54-bea461031b55
[19041:19041:1027/092559.335451:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
[18975:18975:1027/092611.879392:ERROR:devtools_http_handler.cc(636)] Using unsafe HTTP verb GET to invoke /json/new. This action will stop supporting GET and POST verbs in future versions.

lighthouse is then able to connect and generate reports.

Tested on an arm processor without X11 using node v18.12.0 (npm v8.19.2).

Related Issues/PRs

@TechnologyClassroom TechnologyClassroom requested a review from a team as a code owner October 27, 2022 14:16
@TechnologyClassroom TechnologyClassroom requested review from adamraine and removed request for a team October 27, 2022 14:16
@google-cla
Copy link

google-cla bot commented Oct 27, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@TechnologyClassroom TechnologyClassroom changed the title Fix headless-chrome documentation docs(headless-chrome): Fix multiline xvfb-run command Oct 27, 2022
@TechnologyClassroom
Copy link
Contributor Author

I signed the CLA, rescan did not change the status. PR change is a minor two character change which is not copyrightable.

@connorjclark connorjclark changed the title docs(headless-chrome): Fix multiline xvfb-run command docs: fix multiline xvfb-run command Oct 27, 2022
@adamraine adamraine merged commit 60c2fa2 into GoogleChrome:main Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants