femtopixel / docker-google-lighthouse Goto Github PK
View Code? Open in Web Editor NEWGoogle Lighthouse - Docker Image
Home Page: https://brands.jaymoulin.me/femtopixel/docker-google-lighthouse
License: MIT License
Google Lighthouse - Docker Image
Home Page: https://brands.jaymoulin.me/femtopixel/docker-google-lighthouse
License: MIT License
Hi
I know this is not the appropriate place to ask for this help but it will be very much appreciated if you are able to help.
Basically, this docker implementation is really beautiful . I have implemented it and it works in my pipeline and writes the report to a json file . However because of how big the file is, splunk is not able to index the entire lines of the file. Is there a way to run the lighthouse command such that the output it filtered..meaning to specify the components of the report that we need e.g SEO, Performance . I know this is possible in the browser but not sure about the command line. Thanks for your help
Description
I have not tried this yet, as I am not sure if the dockerfile is set up to this, but is there a way to configure the file to export the json object as an output with a variable using cloud run or similar so you can call an endpoint and that will return a lighthouse report back?
this project is dependent from other. consider an autoupdate system to avoid to maintain it
Output of docker inspect lighthouse --format='{{index .Config.Labels.version}}'
:
v5.6.0
Description
Attempting to test a site with the current docker image results in error output. I will put in a suggested pull request.
Command line I used to start the container
docker run --rm --name lighthouse -it -v /root/docker-tests/lighthouse:/home/chrome/reports --cap-add=SYS_ADMIN femtopixel/google-lighthouse https://URLNAME
Steps to reproduce the issue:
Describe the results you received:
Following stdout error:
Runtime error encountered: this._select is not a function TypeError: this._select is not a function at PluralRules.select (/usr/lib/node_modules/lighthouse/node_modules/intl-pluralrules/factory.js:143:21) at PluralFormat.getOption (/usr/lib/node_modules/lighthouse/node_modules/intl-messageformat/dist/compiler.js:161:38) at formatPatterns (/usr/lib/node_modules/lighthouse/node_modules/intl-messageformat/dist/core.js:69:43) at IntlMessageFormat.format (/usr/lib/node_modules/lighthouse/node_modules/intl-messageformat/dist/core.js:139:24) at _formatIcuMessage (/usr/lib/node_modules/lighthouse/lighthouse-core/lib/i18n/i18n.js:293:37) at _resolveIcuMessageInstanceId (/usr/lib/node_modules/lighthouse/lighthouse-core/lib/i18n/i18n.js:424:29) at replaceInObject (/usr/lib/node_modules/lighthouse/lighthouse-core/lib/i18n/i18n.js:452:55) at replaceInObject (/usr/lib/node_modules/lighthouse/lighthouse-core/lib/i18n/i18n.js:465:9) at replaceInObject (/usr/lib/node_modules/lighthouse/lighthouse-core/lib/i18n/i18n.js:465:9) at Object.replaceIcuMessageInstanceIds (/usr/lib/node_modules/lighthouse/lighthouse-core/lib/i18n/i18n.js:472:3)
Describe the results you expected:
I expected the command to complete and the html output of the report to be available.
Additional information you deem important (e.g. issue happens only occasionally):
It would appear that this might be related to an issue with the latest lighthouse version and node 11: GoogleChrome/lighthouse#9860
I'll put in a pull request to see if this will resolve.
Provide some logs (docker logs lighthouse
)
Runtime error encountered: this._select is not a function TypeError: this._select is not a function at PluralRules.select (/usr/lib/node_modules/lighthouse/node_modules/intl-pluralrules/factory.js:143:21) at PluralFormat.getOption (/usr/lib/node_modules/lighthouse/node_modules/intl-messageformat/dist/compiler.js:161:38) at formatPatterns (/usr/lib/node_modules/lighthouse/node_modules/intl-messageformat/dist/core.js:69:43) at IntlMessageFormat.format (/usr/lib/node_modules/lighthouse/node_modules/intl-messageformat/dist/core.js:139:24) at _formatIcuMessage (/usr/lib/node_modules/lighthouse/lighthouse-core/lib/i18n/i18n.js:293:37) at _resolveIcuMessageInstanceId (/usr/lib/node_modules/lighthouse/lighthouse-core/lib/i18n/i18n.js:424:29) at replaceInObject (/usr/lib/node_modules/lighthouse/lighthouse-core/lib/i18n/i18n.js:452:55) at replaceInObject (/usr/lib/node_modules/lighthouse/lighthouse-core/lib/i18n/i18n.js:465:9) at replaceInObject (/usr/lib/node_modules/lighthouse/lighthouse-core/lib/i18n/i18n.js:465:9) at Object.replaceIcuMessageInstanceIds (/usr/lib/node_modules/lighthouse/lighthouse-core/lib/i18n/i18n.js:472:3)
Docker version:
Client: Docker Engine - Community
Version: 18.09.2
API version: 1.39
Go version: go1.10.8
Git commit: 6247962
Built: Sun Feb 10 04:12:31 2019
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.2
API version: 1.39 (minimum version 1.24)
Go version: go1.10.6
Git commit: 6247962
Built: Sun Feb 10 04:28:48 2019
OS/Arch: windows/amd64
Experimental: true
Command executed:
I ran the command using the experimental --platform linux
param.
docker run --rm -it -v D:\LighthouseReports:/home/chrome/reports --security-opt seccomp=C:\chrome.json --platform linux femtopixel/google-lighthouse https://leeconlin.co.uk
Output:
ChromeLauncher Waiting for browser. +0ms
ChromeLauncher Waiting for browser... +2ms
Every 1-2 minutes it adds another line with some extra dots but never generates a report.
It is no problem if I am running this docker image locally in windows. But meet the error when I do it in Jenkin pipeline
I do looked at the old issue which report similar in 2018. but I tried the solution to chmod 777 to the mounted volume But it is still the same
The docker image version I am using
"Labels": {
"maintainer": "Jay MOULIN https://jaymoulin.me/femtopixel/docker-google-lighthouse http://twitter.com/MoulinJay",
"version": "v9.5.0"
}
Steps to reproduce the issue:
Fri, 08 Apr 2022 16:14:21 GMT LH:status Generating results...
Fri, 08 Apr 2022 16:14:21 GMT LH:ChromeLauncher Killing Chrome instance 27
Runtime error encountered: EACCES: permission denied, open 'lighthouse-result.html'
Error: EACCES: permission denied, open 'lighthouse-result.html'
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE
Some environments (e.g. Bitbucket Pipelines) don't allow options such as --security-opts
for Docker, but as it turns out, this image runs just fine without that option. 🎉
So... why is this option suggested in the docs? Am I missing something? My reports (seem to) contain all the expected things.
Output of docker inspect lighthouse --format='{{index .Config.Labels.version}}'
:
v6.5.0
Description
Command line I used to start the container
-----------------------------------
FROM femtopixel/google-lighthouse:v6.5.0
LABEL name="lighthouse"
ENV HTTP_PROXY "http://proxy.xx.xxxxxx.xxx:3128"
ENV HTTPS_PROXY "http://proxy.xx.xxxxxx.xxx:3128"
ENV NO_PROXY = "*.xxxxxx.edu,*.xx.xxxxxx.xxx"
# Run Chrome non-privileged
USER chrome
# some place we can mount and view lighthouse reports
VOLUME /home/chrome/reports
WORKDIR /home/chrome/reports
COPY urls* /home/chrome/reports/
# Drop to cli
CMD ["/bin/bash"]
-----------------------------------
-----------------------------------
#!/bin/bash
while IFS= read -r line
do
echo $( date +%X ) 'Creating report for ' $line
lighthouse --quiet --no-enable-error-reporting --skip-audits redirects-http \
--chrome-flags="--headless --disable-gpu --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors" \
$line --output html --output json
done < 'urls.txt'
-----------------------------------
docker run --name LH lighthouse:6.5 bash urls.sh
Steps to reproduce the issue:
Describe the results you received:
This error does not happen for v5.6 or v. 6.1.1
This error does not happen for v6.5 and v.7+
"The page loaded too slowly to finish within the time limit. Results may be incomplete."
]
Sometimes, I got
LHError: PROTOCOL_TIMEOUT
at Timeout._onTimeout (/usr/lib/node_modules/lighthouse/lighthouse-core/gather/driver.js:382:21)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
Describe the results you expected:
Expected behavior to be the same as using v5.6
Additional information you deem important (e.g. issue happens only occasionally):
Provide some logs (docker logs lighthouse
)
(paste logs)
Hi i'm looking for support for M1 Apple processors using docker arm images. thank you
hey there, when I run docker run --rm -it femtopixel/google-lighthouse lighthouse --version
I get 5.60. Is it possible to get it bumped to lighthouse 6.2? The new tests are good. Thanks!
run
docker run --rm --name lighthouse -it -v /path/to/your/report:/home/chrome/reports femtopixel/google-lighthouse http://www.google.com --output json
output
Runtime error encountered: No Chrome installations found.
Error
at new LauncherError (/usr/lib/node_modules/lighthouse/node_modules/chrome-launcher/dist/utils.js:35:22)
at new ChromeNotInstalledError (/usr/lib/node_modules/lighthouse/node_modules/chrome-launcher/dist/utils.js:66:9)
at Launcher.<anonymous> (/usr/lib/node_modules/lighthouse/node_modules/chrome-launcher/dist/chrome-launcher.js:146:27)
at Generator.next (<anonymous>)
at fulfilled (/usr/lib/node_modules/lighthouse/node_modules/chrome-launcher/dist/chrome-launcher.js:9:58)
Description
Since 31st January our lighthouse reports have been failing when running inside of the femtopixel/google-lighthouse:latest
docker image which roughly coincides with the v4.1.0 release. The build hangs for 45 seconds when it is loading the page to test (or longer for however long I set the '--max-wait-for-load' flag. I have tried 5 mins and this still occurs) then once it times out an unhandled error is thrown and the container exits.
Command line I used to start the container
docker run -it femtopixel/google-lighthouse:latest bash
also occurs when docker image is used within a Jenkins build pipeline using the docker plugin
Steps to reproduce the issue:
lighthouse https://coolstuff.se --output-path=./se --chrome-flags='--headless --no-sandbox'
within the latest docker imageDescribe the results you received:
Lighthouse hangs for 45s before crashing out with an error
ChromeLauncher Waiting for browser. +0ms
ChromeLauncher Waiting for browser... +1ms
ChromeLauncher Waiting for browser..... +507ms
ChromeLauncher Waiting for browser.....✓ +3ms
status Connecting to browser +133ms
status Resetting state with about:blank +20ms
status Benchmarking machine +15ms
status Initializing… +504ms
status Loading page & waiting for onload Scripts, CSSUsage, ViewportDimensions, Manifest, RuntimeExceptions, ChromeConsoleMessages, Accessibility, ImageElements, LinkElements, MetaElements, AnchorsWithNoRelNoopener, AppCacheManifest, Doctype, DOMStats, JSLibraries, OptimizedImages, PasswordInputsWithPreventedPaste, ResponseCompression, TagsBlockingFirstPaint, FontSize, CrawlableLinks, Hreflang, EmbeddedContent, Canonical, RobotsTxt +16ms
Driver:warn Timed out waiting for page load. Checking if page is hung... +45s
Driver:warn Page appears to be hung, killing JavaScript... +1s
status Disconnecting from browser... +30s
ChromeLauncher Killing Chrome instance 124 +15ms
events.js:173
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:162:27)
Emitted 'error' event at:
at Socket.socketErrorListener (_http_client.js:399:9)
at Socket.emit (events.js:197:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at processTicksAndRejections (internal/process/next_tick.js:76:17)
Describe the results you expected:
I expoect the container to be able to scan the https://coolstuff.se website and not crash. The report generated should eb along the lines of google.co.uk (works if i use a site like google.co.uk):
ChromeLauncher Waiting for browser. +0ms
ChromeLauncher Waiting for browser... +0ms
ChromeLauncher Waiting for browser..... +507ms
ChromeLauncher Waiting for browser.....✓ +4ms
status Connecting to browser +127ms
status Resetting state with about:blank +13ms
status Benchmarking machine +25ms
status Initializing… +505ms
status Loading page & waiting for onload Scripts, CSSUsage, ViewportDimensions, Manifest, RuntimeExceptions, ChromeConsoleMessages, Accessibility, ImageElements, LinkElements, MetaElements, AnchorsWithNoRelNoopener, AppCacheManifest, Doctype, DOMStats, JSLibraries, OptimizedImages, PasswordInputsWithPreventedPaste, ResponseCompression, TagsBlockingFirstPaint, FontSize, CrawlableLinks, Hreflang, EmbeddedContent, Canonical, RobotsTxt +15ms
status Retrieving in-page: Scripts +2s
status Retrieving in-page: CSSUsage +0ms
status Retrieving in-page: ViewportDimensions +1ms
status Retrieving in-page: Manifest +0ms
status Retrieving in-page: RuntimeExceptions +0ms
status Retrieving in-page: ChromeConsoleMessages +0ms
status Retrieving in-page: Accessibility +1ms
status Retrieving in-page: ImageElements +0ms
status Retrieving in-page: LinkElements +0ms
status Retrieving in-page: MetaElements +0ms
status Retrieving in-page: AnchorsWithNoRelNoopener +0ms
status Retrieving in-page: AppCacheManifest +1ms
status Retrieving in-page: Doctype +0ms
status Retrieving in-page: DOMStats +0ms
status Retrieving in-page: JSLibraries +0ms
status Retrieving in-page: OptimizedImages +0ms
status Retrieving in-page: PasswordInputsWithPreventedPaste +0ms
status Retrieving in-page: ResponseCompression +1ms
status Retrieving in-page: TagsBlockingFirstPaint +0ms
status Retrieving in-page: FontSize +0ms
status Retrieving in-page: CrawlableLinks +0ms
status Retrieving in-page: Hreflang +0ms
status Retrieving in-page: EmbeddedContent +0ms
status Retrieving in-page: Canonical +1ms
status Retrieving in-page: RobotsTxt +0ms
status Retrieving trace +3ms
status Retrieving devtoolsLog & network records +64ms
status Retrieving: Scripts +4ms
status Retrieving: CSSUsage +19ms
status Retrieving: ViewportDimensions +30ms
status Retrieving: Manifest +5ms
status Retrieving: RuntimeExceptions +0ms
status Retrieving: ChromeConsoleMessages +0ms
status Retrieving: Accessibility +1ms
status Retrieving: ImageElements +262ms
status Retrieving: LinkElements +5ms
status Retrieving: MetaElements +2ms
status Retrieving: AnchorsWithNoRelNoopener +2ms
status Retrieving: AppCacheManifest +1ms
status Retrieving: Doctype +3ms
status Retrieving: DOMStats +1ms
status Retrieving: JSLibraries +14ms
status Retrieving: OptimizedImages +13ms
status Retrieving: PasswordInputsWithPreventedPaste +55ms
status Retrieving: ResponseCompression +1ms
status Retrieving: TagsBlockingFirstPaint +2ms
status Retrieving: FontSize +3ms
status Retrieving: CrawlableLinks +71ms
status Retrieving: Hreflang +3ms
status Retrieving: EmbeddedContent +1ms
status Retrieving: Canonical +2ms
status Retrieving: RobotsTxt +3ms
status Resetting state with about:blank +33ms
status Loading page & waiting for onload ServiceWorker, Offline, StartUrl +31ms
status Retrieving in-page: ServiceWorker +52ms
status Retrieving in-page: Offline +0ms
status Retrieving in-page: StartUrl +1ms
status Retrieving devtoolsLog & network records +0ms
status Retrieving: ServiceWorker +1ms
status Retrieving: Offline +0ms
status Retrieving: StartUrl +1ms
status Resetting state with about:blank +1ms
status Loading page & waiting for onload HTTPRedirect, HTMLWithoutJavaScript +36ms
status Retrieving in-page: HTTPRedirect +213ms
status Retrieving in-page: HTMLWithoutJavaScript +0ms
status Retrieving devtoolsLog & network records +0ms
status Retrieving: HTTPRedirect +1ms
status Retrieving: HTMLWithoutJavaScript +9ms
status Disconnecting from browser... +7ms
status Analyzing and running audits... +2ms
status Evaluating: Uses HTTPS +2ms
status Evaluating: Redirects HTTP traffic to HTTPS +3ms
status Evaluating: Registers a service worker that controls page and start_url +0ms
status Evaluating: Current page responds with a 200 when offline +0ms
status Evaluating: Has a `<meta name="viewport">` tag with `width` or `initial-scale` +1ms
status Evaluating: Contains some content when JavaScript is not available +0ms
status Evaluating: First Contentful Paint +2ms
status Evaluating: First Meaningful Paint +15ms
status Evaluating: Page load is fast enough on mobile networks +2ms
status Evaluating: Speed Index +4ms
status Evaluating: Screenshot Thumbnails +327ms
status Evaluating: Final Screenshot +124ms
status Evaluating: Estimated Input Latency +1ms
status Evaluating: No browser errors logged to the console +5ms
status Evaluating: Server response times are low (TTFB) +1ms
status Evaluating: First CPU Idle +0ms
status Evaluating: Time to Interactive +4ms
status Evaluating: User Timing marks and measures +0ms
status Evaluating: Minimize Critical Requests Depth +1ms
status Evaluating: Avoid multiple page redirects +1ms
status Evaluating: Web app manifest meets the installability requirements +2ms
status Evaluating: Configured for a custom splash screen +0ms
status Evaluating: Sets an address-bar theme color +0ms
status Evaluating: Content is sized correctly for the viewport +1ms
status Evaluating: Displays images with correct aspect ratio +0ms
status Evaluating: Avoids deprecated APIs +0ms
status Evaluating: Minimizes main-thread work +0ms
status Evaluating: JavaScript execution time +10ms
status Evaluating: Preload key requests +2ms
status Evaluating: Preconnect to required origins +1ms
status Evaluating: All text remains visible during webfont loads +1ms
status Evaluating: Network Requests +1ms
status Evaluating: Metrics +5ms
status Evaluating: start_url responds with a 200 when offline +1ms
status Evaluating: Site works cross-browser +0ms
status Evaluating: Page transitions don't feel like they block on the network +0ms
status Evaluating: Each page has a URL +1ms
status Evaluating: `[aria-*]` attributes match their roles +0ms
status Evaluating: `[role]`s have all required `[aria-*]` attributes +0ms
status Evaluating: Elements with `[role]` that require specific children `[role]`s, are present +1ms
status Evaluating: `[role]`s are contained by their required parent element +0ms
status Evaluating: `[role]` values are valid +1ms
status Evaluating: `[aria-*]` attributes have valid values +0ms
status Evaluating: `[aria-*]` attributes are valid and not misspelled +1ms
status Evaluating: `<audio>` elements contain a `<track>` element with `[kind="captions"]` +0ms
status Evaluating: Buttons have an accessible name +0ms
status Evaluating: The page contains a heading, skip link, or landmark region +1ms
status Evaluating: Background and foreground colors have a sufficient contrast ratio +0ms
status Evaluating: `<dl>`'s contain only properly-ordered `<dt>` and `<dd>` groups, `<script>` or `<template>` elements. +1ms
status Evaluating: Definition list items are wrapped in `<dl>` elements +0ms
status Evaluating: Document has a `<title>` element +0ms
status Evaluating: `[id]` attributes on the page are unique +1ms
status Evaluating: `<frame>` or `<iframe>` elements have a title +0ms
status Evaluating: `<html>` element has a `[lang]` attribute +0ms
status Evaluating: `<html>` element has a valid value for its `[lang]` attribute +1ms
status Evaluating: Image elements have `[alt]` attributes +0ms
status Evaluating: `<input type="image">` elements have `[alt]` text +1ms
status Evaluating: Form elements have associated labels +0ms
status Evaluating: Presentational `<table>` elements avoid using `<th>`, `<caption>` or the `[summary]` attribute. +0ms
status Evaluating: Links have a discernible name +1ms
status Evaluating: Lists contain only `<li>` elements and script supporting elements (`<script>` and `<template>`). +0ms
status Evaluating: List items (`<li>`) are contained within `<ul>` or `<ol>` parent elements +0ms
status Evaluating: The document does not use `<meta http-equiv="refresh">` +1ms
status Evaluating: `[user-scalable="no"]` is not used in the `<meta name="viewport">` element and the `[maximum-scale]` attribute is not less than 5. +0ms
status Evaluating: `<object>` elements have `[alt]` text +0ms
status Evaluating: No element has a `[tabindex]` value greater than 0 +1ms
status Evaluating: Cells in a `<table>` element that use the `[headers]` attribute only refer to other cells of that same table. +0ms
status Evaluating: `<th>` elements and elements with `[role="columnheader"/"rowheader"]` have data cells they describe. +0ms
status Evaluating: `[lang]` attributes have a valid value +1ms
status Evaluating: `<video>` elements contain a `<track>` element with `[kind="captions"]` +0ms
status Evaluating: `<video>` elements contain a `<track>` element with `[kind="description"]` +0ms
status Evaluating: `[accesskey]` values are unique +1ms
status Evaluating: Custom controls have associated labels +0ms
status Evaluating: Custom controls have ARIA roles +0ms
status Evaluating: User focus is not accidentally trapped in a region +0ms
status Evaluating: Interactive controls are keyboard focusable +1ms
status Evaluating: Headings don't skip levels +0ms
status Evaluating: Interactive elements indicate their purpose and state +0ms
status Evaluating: The page has a logical tab order +0ms
status Evaluating: The user's focus is directed to new content added to the page +0ms
status Evaluating: Offscreen content is hidden from assistive technology +0ms
status Evaluating: HTML5 landmark elements are used to improve navigation +0ms
status Evaluating: Visual order on the page follows DOM order +0ms
status Evaluating: Uses efficient cache policy on static assets +0ms
status Evaluating: Avoids enormous network payloads +2ms
status Evaluating: Defer offscreen images +0ms
status Evaluating: Eliminate render-blocking resources +3ms
status Evaluating: Minify CSS +5ms
status Evaluating: Minify JavaScript +13ms
status Evaluating: Defer unused CSS +40ms
status Evaluating: Serve images in next-gen formats +3ms
status Evaluating: Efficiently encode images +4ms
status Evaluating: Enable text compression +2ms
status Evaluating: Properly size images +5ms
status Evaluating: Use video formats for animated content +2ms
status Evaluating: Avoids Application Cache +2ms
status Evaluating: Page has the HTML doctype +0ms
status Evaluating: Avoids an excessive DOM size +0ms
status Evaluating: Links to cross-origin destinations are safe +1ms
status Evaluating: Avoids requesting the geolocation permission on page load +0ms
status Evaluating: Avoids `document.write()` +1ms
status Evaluating: Avoids front-end JavaScript libraries with known security vulnerabilities +0ms
status Evaluating: Detected JavaScript libraries +0ms
status Evaluating: Avoids requesting the notification permission on page load +0ms
status Evaluating: Allows users to paste into password fields +0ms
status Evaluating: Uses HTTP/2 for its own resources +0ms
status Evaluating: Uses passive listeners to improve scrolling performance +1ms
status Evaluating: Document has a meta description +0ms
status Evaluating: Page has successful HTTP status code +0ms
status Evaluating: Document uses legible font sizes +1ms
status Evaluating: Links have descriptive text +0ms
status Evaluating: Page isn’t blocked from indexing +2ms
status Evaluating: robots.txt is valid +2ms
status Evaluating: Document has a valid `hreflang` +1ms
status Evaluating: Document avoids plugins +0ms
status Evaluating: Document has a valid `rel=canonical` +0ms
status Evaluating: Page is mobile friendly +1ms
status Evaluating: Structured data is valid +0ms
status Generating results... +0ms
ChromeLauncher Killing Chrome instance 217 +30ms
Printer html output written to ./se +40ms
CLI Protip: Run lighthouse with `--view` to immediately open the HTML report in your browser +0ms
Additional information you deem important (e.g. issue happens only occasionally):
I have only seen this happen on 'https://coolstuff.se' so far however I have not tested it on my other sites.
The lighthouse report does work if I run from the chrome dev tools on my browser.
Description
When running a Lighthouse test I receive the following error. It appears to be tied to the version of Docker we have installed - we have two servers, and the newer one running a newer version is the one with the problem. The other works every time.
Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "chdir to cwd (\"/home/chrome/reports\") set in config.json failed: permission denied": unknown.
Command line I used to start the container
docker run --rm --name lighthouse -v /tmp/bc4151e9-8132-4b2e-bf8c-27133749fc53/:/home/chrome/reports --cap-add=SYS_ADMIN femtopixel/google-lighthouse:4.0.0-alpha.0-amd64 'https://www.example.com/' --quiet --max-wait-for-load=30000 --output=html --output=json --output=csv --output-path=/home/chrome/reports/www_example_com --emulated-form-factor=desktop --throttling-method=provided
Steps to reproduce the issue:
Docker version 18.09.0, build 4d60db4
Describe the results you received:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "chdir to cwd (\"/home/chrome/reports\") set in config.json failed: permission denied": unknown.
Describe the results you expected:
A test to run and then I can view the output files in the desired director.
Additional information you deem important (e.g. issue happens only occasionally):
We have two Ubuntu 16.04 servers running Lighthouse tests - only one of them has this issue. It's running Docker version 18.09.0, build 4d60db4
.
Provide some logs (docker logs lighthouse
)
No logs available due to --rm
option killing the container (Error: No such container: lighthouse
). When --rm
is removed there's still no logs.
Output of docker inspect lighthouse --format='{{index .Config.Labels.version}}'
:
4.0.0-alpha.0-amd64
Thank you for maintaining this docker. Could you please upgrade lighthouse version to "v5.1.0" which has fix for "NO_FCP" error?
I am running into this error as described here:
GoogleChrome/lighthouse#7534
which is fixed in latest version of lighthouse.
Thank you!
Description
When running the image on CentOS7/RHEL7 the result is a series of "waiting for browser" messages and eventually the ECONNREFUSED error.
See this from upstream: GoogleChrome/lighthouse#2726
Command line I used to start the container
docker run --rm --cap-add=SYS_ADMIN --name "localtest-15beb5d" -t -v "$(pwd)/lighthouse-reports/:/home/chrome/reports" "femtopixel/google-lighthouse:latest" "http://www.google.com"
Steps to reproduce the issue:
Describe the results you received:
ChromeLauncher Waiting for browser................................................................................................. +501ms
ChromeLauncher Waiting for browser................................................................................................... +502ms
ChromeLauncher Waiting for browser..................................................................................................... +501ms
ChromeLauncher Waiting for browser....................................................................................................... +501ms
ChromeLauncher:error connect ECONNREFUSED 127.0.0.1:43818 +1ms
ChromeLauncher:error Logging contents of /tmp/lighthouse.yHe0vyL/chrome-err.log +1ms
ChromeLauncher:error [0402/142744.311466:ERROR:zygote_host_impl_linux.cc(116)] No usable sandbox! If this is a Debian system, please install the chromium-sandbox package to solve this problem. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
Describe the results you expected:
status Evaluating: Links have descriptive text +0ms
status Evaluating: Page isn’t blocked from indexing +2ms
status Evaluating: robots.txt is valid +2ms
status Evaluating: Tap targets are sized appropriately +1ms
status Evaluating: Document has a valid `hreflang` +2ms
status Evaluating: Document avoids plugins +0ms
status Evaluating: Document has a valid `rel=canonical` +1ms
status Evaluating: Structured data is valid +0ms
status Generating results... +0ms
Printer html output written to /home/chrome/reports/www.google.com_2019-04-02_15-01-27.report.html +44ms
CLI Protip: Run lighthouse with `--view` to immediately open the HTML report in your browser +0ms
ChromeLauncher Killing Chrome instance 21 +0ms
Additional information you deem important (e.g. issue happens only occasionally):
By building on this image to add --no-sandbox to the chrome flags it works.
Perhaps the chrome flags could be made configurable by environment variable so that this is only overridden where required? Or can it be considered safe to --no-sandbox in this case seeing as it's confined in a docker container under an unprivileged user anyway (particularly if running with the seccomp profile instead of SYS_ADMIN caps).
In the Lighthouse 5.6.0, there are issue GoogleChrome/lighthouse#9860 that depend on another 3rd party library they used.
The workaround needs to install [email protected]
.
If you are using femtopixel/docker-google-lighthouse
v5.6.0 or above, you will also face the same issue and need to be downgraded to 5.5.0 to be work again.
I get the following error when running the latest container, rolling back to v.3.0.3 fixes the issue
Runtime error encountered: The environment variable CHROME_PATH must be set to executable of a build of Chromium version 54.0 or later.
Hiya,
I am new to this. I run that command and I don't see any reports in there apart from the folder. Could you point me in the right direction?
Description
I am trying to run this docker container into a serverless environment on Google Cloud, using Cloud build. In the final step I want to export json file to a cloud bucket - I have tried several options. Latest I've tried copying the full folder in order to see if I could spot where the file gets exported. I do however get acess denied.
Command line I used to start the container
YALM SETUP:
steps:
- name: 'femtopixel/google-lighthouse'
dir: '/build/'
args: ['https://www.google.dk/', '--output json', '--output-path', './google.json']
- name: 'gcr.io/cloud-builders/gsutil'
args: ['-m', 'cp', '-r', '.', 'gs://myBucket']
timeout: 1200s
Describe the results you received:
Error: EACCES: permission denied, open './google.json'
Runtime error encountered: EACCES: permission denied, open './google.json
Describe the results you expected:
Expected the file to be found on the next buildstep of my build so it can be exported.
Description
I am receiving the following when running the latest image on macOS v10.14.5.
Command line I used to start the container
docker run --rm --cap-add=SYS_ADMIN --name "lighthouse" -t -v "$(pwd)/lighthouse-reports/:/home/chrome/reports" "femtopixel/google-lighthouse:latest" "http://www.google.com"
Steps to reproduce the issue:
Describe the results you received:
ChromeLauncher Waiting for browser....................................................................................................... +503ms ChromeLauncher:error connect ECONNREFUSED 127.0.0.1:45353 +3ms ChromeLauncher:error Logging contents of /tmp/lighthouse.io8VYLM/chrome-err.log +0ms ChromeLauncher:error /usr/bin/chromium-browser: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory ChromeLauncher:error +1ms Unable to connect to Chrome
Describe the results you expected:
Lighthouse to run successfully. The below was gained by running the following command
docker run --rm --cap-add=SYS_ADMIN --name "lighthouse" -t -v "$(pwd)/lighthouse-reports/:/home/chrome/reports" "femtopixel/google-lighthouse:v5.5.0" "http://www.google.com"
status Generating results... +0ms Printer html output written to /home/chrome/reports/_2020-03-02_10-49-22.report.html +130ms CLI Protip: Run lighthouse with
--view to immediately open the HTML report in your browser +1ms ChromeLauncher Killing Chrome instance 21 +1ms
Additional information you deem important (e.g. issue happens only occasionally):
It seemed to be working last week when we were using the latest version. Just began having issues today
Output of docker inspect lighthouse --format='{{index .Config.Labels.version}}'
:
wait a sec
Description
Jun 25, 2020 9:31 PM - jenkins build running lighthouse inpsection is working
Jun 26, 2020 2:32 PM - it is not working with error below
Command line I used to start the container
Jenkins
Steps to reproduce the issue:
Describe the results you received:
Errors below
Describe the results you expected:
Reports are generated
Additional information you deem important (e.g. issue happens only occasionally):
I think it has smth to do with release of new verions of lighthouse.
Also I am rebuilding docker image on each build to grap last code that runs lighthouse
with lighthouse version 6.1.0
Provide some logs (docker logs lighthouse
)
checkPerformance started 17:33:16 17:33:16 launchLighthouse started 17:33:16 17:33:16 cmd lighthouse --output=json --output=html --output-path=stdout --chrome-flags="--headless --disable-gpu --no-sandbox" --config-path=./configs/default.json https://auto-development.weplay.space 17:33:16 17:33:16 lighthouse started 17:33:16 17:33:18 Fri, 26 Jun 2020 14:33:18 GMT ChromeLauncher Waiting for browser. 17:33:18 17:33:18 17:33:18 Fri, 26 Jun 2020 14:33:18 GMT ChromeLauncher Waiting for browser... 17:33:18 17:33:18 17:33:18 Fri, 26 Jun 2020 14:33:18 GMT ChromeLauncher Waiting for browser..... 17:33:18 17:33:18 17:33:19 Fri, 26 Jun 2020 14:33:19 GMT ChromeLauncher Waiting for browser....... 17:33:19 17:33:19 17:33:19 Fri, 26 Jun 2020 14:33:19 GMT ChromeLauncher Waiting for browser......... 17:33:19 17:33:19 17:33:19 Fri, 26 Jun 2020 14:33:19 GMT ChromeLauncher Waiting for browser.........✓ 17:33:19 17:33:19 17:33:19 Fri, 26 Jun 2020 14:33:19 GMT ChromeLauncher Killing Chrome instance 33 17:33:19 17:33:19 17:33:19 Runtime error encountered: Unable to locate audit: `time-to-first-byte`. 17:33:19 Tried to require() from these locations: 17:33:19 /usr/lib/node_modules/lighthouse/lighthouse-core/config 17:33:19 /home/chrome/time-to-first-byte 17:33:19 /home/chrome/configs/time-to-first-byte 17:33:19 17:33:19 17:33:19 Error: Unable to locate audit: `time-to-first-byte`. 17:33:19 Tried to require() from these locations: 17:33:19 /usr/lib/node_modules/lighthouse/lighthouse-core/config 17:33:19 /home/chrome/time-to-first-byte 17:33:19 /home/chrome/configs/time-to-first-byte 17:33:19 at resolveModule (/usr/lib/node_modules/lighthouse/lighthouse-core/config/config-helpers.js:212:9) 17:33:19 at /usr/lib/node_modules/lighthouse/lighthouse-core/config/config-helpers.js:147:32 17:33:19 at Array.map () 17:33:19 at requireAudits (/usr/lib/node_modules/lighthouse/lighthouse-core/config/config-helpers.js:131:37) 17:33:19 at Function.requireAudits (/usr/lib/node_modules/lighthouse/lighthouse-core/config/config.js:754:24) 17:33:19 at new Config (/usr/lib/node_modules/lighthouse/lighthouse-core/config/config.js:347:26) 17:33:19 at generateConfig (/usr/lib/node_modules/lighthouse/lighthouse-core/index.js:60:10) 17:33:19 at lighthouse (/usr/lib/node_modules/lighthouse/lighthouse-core/index.js:43:18) 17:33:19 at runLighthouse (/usr/lib/node_modules/lighthouse/lighthouse-cli/run.js:209:32) 17:33:19 at processTicksAndRejections (internal/process/task_queues.js:97:5) 17:33:19 17:33:19
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.