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

Lighthouse V11.0 not giving proper results for the intended pages #15596

Closed
2 tasks done
prashanthramanna opened this issue Nov 9, 2023 · 4 comments
Closed
2 tasks done

Comments

@prashanthramanna
Copy link

FAQ

URL

https://qa2-now.tirehubonline.com/

What happened?

I am using Lighthouse V11.0 on chrome browser Version 119 and observiong 2 issues
while running it through command line, getting the below error

LH:Navigation:error Provided URL (" ") did not match initial navigation URL (about:blank) +15s
and report is not properly generated. Getting the page score with very less value

Tried to generate report by running lighthouse through dev tools and while running for the intended page, it is just navigating up till the login page and providing the metrics, the screen shot in the view tree just displays the login page and not the intended page that I am looking to check for the performance
I am using Navigation, desktop and performance options while running the lighthouse audit

Not sure what is the issue and why lighthouse is having some strange behavior

could any of you please suggest me the solution for this issue
Thanks in advance

What did you expect?

Tried to check the performance of a specific page after I login to my web application

What have you tried?

while running the lighthouse from dev tool, it is just navigating up to the login page of the application and not for the specific page as I can see on the view tree, So not sure for which page it is providing the metrics
Ex - I am on web page say, URL "XYZ" of my web application and ran the lighthouse audit from dev tools on the chrome browser but when i see the view tree on the report it is displaying the login page of the web apllication and not the URL "XYZ"

How were you running Lighthouse?

CLI, Chrome DevTools

Lighthouse Version

11.0.0

Chrome Version

119

Node Version

18.18.0

OS

Windows

Relevant log output

No response

@prashanthramanna
Copy link
Author

prashanthramanna commented Nov 9, 2023

Log output
D:\Users\p.ramanna.ctr\AppData\Roaming\npm>lighthouse https://qa2tirehubonline.com/ --screenEmulation.disabled --throttling-method=provided --emulatedUserAgent--form-factor desktop --only-categories=performance --port 50275 --view

LH:ChromeLauncher Found existing Chrome already running using port 50275, using that. +0ms
LH:status Connecting to browser +1s
LH:status Navigating to about:blank +64ms
LH:status Benchmarking machine +46ms
LH:status Preparing target for navigation mode +1s
LH:status Navigating to about:blank +39ms
LH:status Preparing target for navigation +52ms
LH:status Cleaning origin data +16ms
LH:status Cleaning browser cache +81ms
LH:status Preparing network conditions +302ms
LH:status Navigating to https://qa2tirehubonline.com/ +569ms
**LH:Navigation:error Provided URL (https://qa2tirehubonline.com/) did not match initial navigation URL (about:blank) +15s**
LH:status Getting artifact: DevtoolsLog +2s
LH:status Getting artifact: Trace +1ms
LH:status Getting artifact: DevtoolsLog +69ms
LH:status Getting artifact: Trace +1ms
LH:status Getting artifact: ConsoleMessages +12ms
LH:status Getting artifact: CSSUsage +7ms
LH:status Getting artifact: DOMStats +1s
LH:status Getting artifact: ImageElements +74ms
LH:status Getting artifact: JsUsage +705ms

@adamraine
Copy link
Member

I verified that Lighthouse doesn't reset the login state on a different page but I can't test the page you provided without user credentials. Any way to provide test credentials for this page?

Also, have you tried unchecking "Clear storage"?

LH:Navigation:error Provided URL (" ") did not match initial navigation URL (about:blank) +15s

Please see #15487. This issue has been fixed and this error message is safe to ignore. It doesn't affect your score in any way.

@prashanthramanna
Copy link
Author

prashanthramanna commented Nov 10, 2023

On using the Lighthouse from dev tools it is working fine now after unchecking the "Clear storage" but when I use lighthouse as extension directly and click on "Generate Report", Report is not generated properly and getting the below message in the report - "There were issues affecting this run of Lighthouse:
The page may not be loading as expected because your test URL () was redirected to . Try testing the second URL directly."

Not sure why it is forming the denied URL which doesn't load the intended page when accessed and redirects to login page

Also in the report could see only the login page being captured and even the URL captured on lighthouse report is not the intended proper URL of the web application
Attached image shows the option that I use to generate report

Lighthouse_Generatereport1

Lighthouse report that I am getting is attached for reference as an image- if you see the page screen shot captured, it displays the login page of the application but I ran the lighthouse audit for a different page and not for login page.
Lighthouse_report1

This same issue occurs when running the lighthouse through CLI
not sure what is cause of this issue

@adamraine
Copy link
Member

Let's back up for a second. By default, Lighthouse CLI, PageSpeed insights, and the Lighthouse browser extension will test your page in a fresh browser profile which does not include any of the session data that maintains you logged in state. Lighthouse in DevTools will reuse the browser profile but it will still clear certain types of page data that could store logged in state (unless you uncheck "Clear storage").

Since you are using the browser extension, the results you are seeing are expected. If you are interested in testing the logged in state outside of DevTools please see /~https://github.com/GoogleChrome/lighthouse/blob/main/docs/authenticated-pages.md.

@adamraine adamraine closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants