lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

runWarning in the lighthouse report with "The page loaded too slowly to finish within the time limit. Results may be incomplete"

Open sashikamw opened this issue 3 years ago • 14 comments

Summary I'm using lighthouse ci to get performance metrics of couple of web paged behind authentication. When I run the lighthouse report for some pages I'm getting the below warning.

  "runWarnings": [
    "The page loaded too slowly to finish within the time limit. Results may be incomplete."
  ],

what is the impact of this warning to the performance audit results? how can configure to avoid this?

Setup details lighouse ci version - lhci/[email protected] authentication - using puppteer script configuration setting -

    ci: {
      collect: {
        "numberOfRuns": 3,
        "headful": false,
        "puppeteerScript": "puppteerlogin.js",
        "puppeteerLaunchOptions": {args:["--window-size=1920,1080", "--no-sandbox", '--disable-setuid-sandbox','--ignore-certificate-errors'], headless: true},
        "url": [`${BASE_URL_TO_TEST}/forgot-password`,`${BASE_URL_TO_TEST}/recent_activity`,`${BASE_URL_TO_TEST}/catalog`],
         "settings": {
            "emulatedFormFactor": "desktop",
            "throttling": {
              "rttMs": 40,
              "throughputKbps": 10240,
              "cpuSlowdownMultiplier": 1
            },
            "disableStorageReset": true,
        }
      },

sashikamw avatar May 31 '22 20:05 sashikamw

In settings try providing maxWaitForLoad. default is 45000 (ms)

connorjclark avatar May 31 '22 20:05 connorjclark

Hi @connorjclark thank you for your answer, I setup the option 'maxWaitForLoad' with multiple values and check the behaviour. I was able to generate the report without the warning just once when the maxWaitForLoad : 300000 is set. But after that I set the maxWaitForLoad up to 600000 multiple times, but still its giving the same warning.

I would like to understand a little bit more about this behaviour as I want to add this as part of the build pipeline. Why does it take so long for the page load? is this some issue with lighthouse or is there anything else I can do to make this better?

sashikamw avatar Jun 01 '22 13:06 sashikamw

I can see the page is properly loading within few seconds. I'm unsure what makes the lighthouse report to trigger that warning

sashikamw avatar Jun 01 '22 15:06 sashikamw

Can you provide a URL, or the artifacts written to latest-run/ when run with the flags -G?

connorjclark avatar Jun 01 '22 17:06 connorjclark

@connorjclark is it possible to provide the -G argument with lighthouse ci? I'm using lhci autorun to execute the audit

sashikamw avatar Jun 01 '22 18:06 sashikamw

Can you try replicating with just Lighthouse CLI? This will be easier to debug.

connorjclark avatar Jun 01 '22 19:06 connorjclark

@connorjclark I tried running the command lhci autorun -G but it doesn't create a folder named latest-run/. I only have the .lighthouseci directory that contains the output report in html and json format with assertion-results.json. Can you let me know what exact artifact you are referring to ?

sashikamw avatar Jun 01 '22 21:06 sashikamw

Please go through the documentation for the lighthouse tool (not Lighthouse CI) and create a repro. Preferably with a URL we can look at, else just the artifacts (lighthouse https://www.example.com -G will create artifacts in ./latest-run/ folder)

connorjclark avatar Jun 02 '22 00:06 connorjclark

@connorjclark please find the requested artifacts (FYI - I changed the application url) latest-run.zip

Also below are the console output

LH:config:warn IFrameElements gatherer requested, however no audit requires it. +0ms
  LH:config:warn FormElements gatherer requested, however no audit requires it. +1ms
  LH:status Connecting to browser +63ms
  LH:status Resetting state with about:blank +32ms
  LH:status Benchmarking machine +16ms
  LH:status Initializing… +1s
  LH:status Running defaultPass pass CSSUsage, JsUsage, ViewportDimensions, ConsoleMessages, AnchorElements, ImageElements, LinkElements, MetaElements, ScriptElements, IFrameElements, FormElements, MainDocumentContent, GlobalListeners, AppCacheManifest, Doctype, DOMStats, OptimizedImages, PasswordInputsWithPreventedPaste, ResponseCompression, TagsBlockingFirstPaint, FontSize, EmbeddedContent, RobotsTxt, TapTargets, Accessibility, TraceElements, InspectorIssues, SourceMaps, FullPageScreenshot +8ms
  LH:status Resetting state with about:blank +0ms
  LH:status Setting up network for the pass trace +6ms
  LH:status Beginning devtoolsLog and trace +6ms
  LH:status Loading page & waiting for onload +2ms
  LH:waitFor:warn Timed out waiting for page load. Checking if page is hung... +2m
  LH:status Gathering in-page: CSSUsage +4ms
  LH:status Gathering in-page: JsUsage +0ms
  LH:status Gathering in-page: ViewportDimensions +0ms
  LH:status Gathering in-page: ConsoleMessages +0ms
  LH:status Gathering in-page: AnchorElements +0ms
  LH:status Gathering in-page: ImageElements +0ms
  LH:status Gathering in-page: LinkElements +0ms
  LH:status Gathering in-page: MetaElements +0ms
  LH:status Gathering in-page: ScriptElements +0ms
  LH:status Gathering in-page: IFrameElements +0ms
  LH:status Gathering in-page: FormElements +0ms
  LH:status Gathering in-page: MainDocumentContent +0ms
  LH:status Gathering in-page: GlobalListeners +0ms
  LH:status Gathering in-page: AppCacheManifest +1ms
  LH:status Gathering in-page: Doctype +0ms
  LH:status Gathering in-page: DOMStats +0ms
  LH:status Gathering in-page: OptimizedImages +0ms
  LH:status Gathering in-page: PasswordInputsWithPreventedPaste +0ms
  LH:status Gathering in-page: ResponseCompression +0ms
  LH:status Gathering in-page: TagsBlockingFirstPaint +0ms
  LH:status Gathering in-page: FontSize +0ms
  LH:status Gathering in-page: EmbeddedContent +0ms
  LH:status Gathering in-page: RobotsTxt +0ms
  LH:status Gathering in-page: TapTargets +1ms
  LH:status Gathering in-page: Accessibility +0ms
  LH:status Gathering in-page: TraceElements +0ms
  LH:status Gathering in-page: InspectorIssues +0ms
  LH:status Gathering in-page: SourceMaps +0ms
  LH:status Gathering in-page: FullPageScreenshot +0ms
  LH:status Gathering trace +1ms
  LH:status Gathering devtoolsLog & network records +3s
  LH:status Gathering: CSSUsage +8ms
  LH:status Gathering: JsUsage +144ms
  LH:status Gathering: ViewportDimensions +160ms
  LH:status Gathering: ConsoleMessages +2ms
  LH:status Gathering: AnchorElements +1ms
  LH:status Gathering: ImageElements +43ms
  LH:status Gathering: LinkElements +1s
  LH:status Gathering: MetaElements +4ms
  LH:status Gathering: ScriptElements +2ms
  LH:status Gathering: IFrameElements +158ms
  LH:status Gathering: FormElements +4ms
  LH:status Gathering: MainDocumentContent +3ms
  LH:status Gathering: GlobalListeners +1ms
  LH:status Gathering: AppCacheManifest +2ms
  LH:status Gathering: Doctype +1ms
  LH:status Gathering: DOMStats +2ms
  LH:status Gathering: OptimizedImages +4ms
  LH:status Gathering: PasswordInputsWithPreventedPaste +1ms
  LH:status Gathering: ResponseCompression +2ms
  LH:status Gathering: TagsBlockingFirstPaint +9ms
  LH:status Gathering: FontSize +2ms
  LH:status Gathering: EmbeddedContent +60ms
  LH:status Gathering: RobotsTxt +4ms
  LH:status Gathering: TapTargets +157ms
  LH:status Gathering: Accessibility +33ms
  LH:status Gathering: TraceElements +440ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +166ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +1ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +1ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +2ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +0ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +0ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +1ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +0ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +0ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +1ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +0ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +0ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +1ms
  LH:method <= browser ERR:error Animation.resolveAnimation  +0ms
  LH:method <= browser ERR:error DOM.resolveNode  +45ms
  LH:method <= browser ERR:error DOM.resolveNode  +0ms
  LH:method <= browser ERR:error DOM.resolveNode  +0ms
  LH:method <= browser ERR:error DOM.resolveNode  +3ms
  LH:method <= browser ERR:error DOM.resolveNode  +0ms
  LH:method <= browser ERR:error DOM.resolveNode  +0ms
  LH:method <= browser ERR:error DOM.resolveNode  +0ms
  LH:method <= browser ERR:error DOM.resolveNode  +1ms
  LH:method <= browser ERR:error DOM.resolveNode  +0ms
  LH:method <= browser ERR:error DOM.resolveNode  +0ms
  LH:method <= browser ERR:error DOM.resolveNode  +1ms
  LH:method <= browser ERR:error DOM.resolveNode  +0ms
  LH:method <= browser ERR:error DOM.resolveNode  +0ms
  LH:method <= browser ERR:error DOM.resolveNode  +1ms
  LH:status Gathering: InspectorIssues +60ms
  LH:status Gathering: SourceMaps +1ms
  LH:status Gathering: FullPageScreenshot +2s
  LH:status Populate base artifacts +396ms
  LH:status Get webapp manifest +0ms
  LH:status Collect stacks +1ms
  LH:status Running offlinePass pass ServiceWorker +26ms
  LH:status Resetting state with about:blank +0ms
  LH:status Setting up network for the pass trace +20ms
  LH:status Beginning devtoolsLog and trace +2ms
  LH:status Loading page & waiting for onload +0ms
  LH:status Gathering in-page: ServiceWorker +747ms
  LH:status Gathering devtoolsLog & network records +0ms
  LH:status Gathering: ServiceWorker +61ms
  LH:status Running redirectPass pass HTTPRedirect +4ms
  LH:status Resetting state with about:blank +0ms
  LH:status Setting up network for the pass trace +96ms
  LH:status Beginning devtoolsLog and trace +1ms
  LH:status Loading page & waiting for onload +0ms
  LH:status Gathering in-page: HTTPRedirect +738ms
  LH:status Gathering devtoolsLog & network records +0ms
  LH:status Gathering: HTTPRedirect +202ms
  LH:status Disconnecting from browser... +121ms
  LH:status Saving artifacts +6ms

sashikamw avatar Jun 02 '22 18:06 sashikamw

@connorjclark any update on this?

sashikamw avatar Jun 08 '22 18:06 sashikamw

I can't determine what version of LH you used there, but it seems older than 8.5 because it is missing the GatherContext artifact.

  1. update, and do lighthouse --version to confirm using 9.6.1
  2. re-do artifacts upload (and provide the exact CLI you used to run)

connorjclark avatar Jun 08 '22 19:06 connorjclark

@connorjclark I'm using lighthouse version - 9.6.1 and lhci version - 0.8.2

I have attached the following

  1. json output from the lhci (lhr-1654884421_lhci_report.json.zip)
  2. latest-run from lighthouse (latest-run_new.zip) Command use: lighthouse https://org/recent_activity -G --disable-storage-reset --port 52752 --preset desktop --max-wait-for-load 60000 --output html --output-path ./report.html For login used : https://github.com/GoogleChrome/lighthouse/blob/HEAD/docs/authenticated-pages.md#option-4-open-a-debug-instance-of-chrome-and-manually-log-in

lhr-1654884421_lhci_report.json.zip

latest-run-new.zip

sashikamw avatar Jun 10 '22 18:06 sashikamw

@connorjclark any update on this?

sashikamw avatar Jun 14 '22 20:06 sashikamw

Won't be able to determine the cause without access to the URL, since the warnings comes from the gathering stage. It seems the report has enough data to be useful though. The warning is just telling you that Lighthouse notices the page is still doing work but we decided to cut it off so we could generate a report and not wait forever. There's a chance we're missing out on further insights. But you can safely ignore it.

connorjclark avatar Jun 14 '22 20:06 connorjclark

Won't be able to determine the cause without access to the URL, since the warnings comes from the gathering stage. It seems the report has enough data to be useful though. The warning is just telling you that Lighthouse notices the page is still doing work but we decided to cut it off so we could generate a report and not wait forever. There's a chance we're missing out on further insights. But you can safely ignore it.

Are there any examples where this same warning comes up (and only this warning) and it won't be safe to ignore it?

Pagan-Idel avatar Jan 13 '23 18:01 Pagan-Idel

For me it was showing when I have the Ad blocker enabled. It doesn't show up if I disable it.

sirajabbas avatar Sep 26 '23 13:09 sirajabbas