harlan-zw / unlighthouse

Scan your entire site with Google Lighthouse in 2 minutes (on average). Open source, fully configurable with minimal setup.
https://unlighthouse.dev
MIT License
3.65k stars 105 forks source link

Mismatch between test site url and x-default causes no pages to be scanned #215

Open will-me opened 1 month ago

will-me commented 1 month ago

Describe the bug

When site url is different from x-default url, tests fail to run.

Scenario Test site url is: "https://testing.brand-mg4kapdsn.vercel.app/en-us/products" x-default value is: "https://preprod.brand.com/en-us/products"

Test is ignored and logs out:

[debug] [Unlighthouse] HTML extract of 'https://testing.brand-mg4kapdsn.vercel.app/en-us/products' response succeeded. 
[debug] [Unlighthouse] Page has an alternative lang, ignoring '/en-us/products': 'https://preprod.brand.com/en-us/products'
[debug] [Unlighthouse] Ignoring route '/en-us/products'.

This is using a supplied list of urls not using the site crawler.

Reproduction

No response

System / Nuxt Info

No response

adamkoppede commented 1 month ago

Sounds like the behavior documented for scanner.ignoreI18nPages = true, which is the default. Setting it to false worked for me. I also provided an explicit list of URLs when I got bit by it.

will-me commented 1 month ago

@adamkoppede Yes you are correct, setting this to false did fix the issue. However we have dozens (and eventually hundreds) of pipelines that need to run this config. Setting this to false on a site with 15 locales will slow down the pipelines too much.