femtopixel / docker-google-lighthouse

Google Lighthouse - Docker Image
https://brands.jaymoulin.me/femtopixel/docker-google-lighthouse
MIT License
70 stars 23 forks source link

LHError: PROTOCOL_TIMEOUT and/or The page loaded too slowly #24

Closed pattarika closed 2 years ago

pattarika commented 3 years ago

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:

  1. call docker run
  2. review all json and html output
  3. Running 20 websites took 6 minutes in v5.6. In v6.5 and 7+, timing increases to almost 30 minutes.

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)
jaymoulin commented 2 years ago

I don't think this is related to the docker image as nothing changes but the google lighthouse version