-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Serverless (function-as-a-service) & lighthouse (NO_SCREENSHOTS, Load timeout) #14955
Comments
@adamraine , would you have some time by any chance to check this issue? 🙏 Would appreciate it 🙇 |
As for point 1 I think I've found the main reason:
inside https://github.com/GoogleChrome/lighthouse/blob/main/core/gather/driver/wait-for-condition.js#L440 So now only point 2 remains (as for the serverless problem) which I think overall is more important. |
Are you using headless=new ? |
Hey @paulirish, thank you for the reply 💪 |
@paulirish Would you maybe be able to point me to the place where the screenshots are gathered? I guess it's on the gatherers part, but I couldn't find how is it done exactly :/ Maybe I could try to debug it. |
bump on this topic. |
|
Thanks @connorjclark for the reply 🙇
|
I've recently started working with LightHouse user flows and I noticed that that some LH navigation tests work fine and some result in the exact same FYI. @connorjclark / @paulirish |
Could you extract the traces / LH artifacts from these bad runs and upload them here? We don't support running LH on lambda so I can't promise any resolution here, but I can take a look at the trace/artifacts and see if there is anything obviously wrong. |
Thank you @connorjclark for replying 🙇 |
@connorjclark ping 🙏 |
Yes, but it would be better as a zip of
Treat it like it's giving someone full access to anything the browser devtools can show you. In general, this is not an issue. |
@connorjclark Big thanks for the reply Below is a json of the artifacts. Whenever I have time I will also do a run in |
Hello @connorjclark , Artifacts of the failed run in zip: Hopefully that will help you identify the problem. Cheers and big thanks again 🙇 |
Hello 👋
First of all thank you for maintaining this awesome open source tool!
I'm writing this issue to gather the problems that I've stumbled upon so far with using lighthouse on an AWS Lambda.
The setup I'm using is:
@sparticuz/chromium
with the following chrome flags https://github.com/Sparticuz/chromium/blob/master/source/index.ts#L144 + additionally--disable-gpu
(as an AWS Lambda Layer)chrome-launcher
(tried alsopuppeteer
instead)Problems I've faced with running lighthouse on AWS Lambda:
1. Load timeoutThis happens each time, for every test. It looks like one (or more) of the following conditions seem to never pass on a serverless environment and the timeout (45s by default) is always reached. https://github.com/GoogleChrome/lighthouse/blob/main/core/gather/driver/wait-for-condition.js#L405
I haven't investigated yet which one exactly is causing the issue, but maybe you have done it already? If not then I could maybe find some time next week to investigate this.
Read: #14955 (comment)
This problem happens very rarely and it causes the performance score (with the speed index) to not calculate. It's very hard to pinpoint the exact reason of this as it seems very random. It might be related to the opened chrome instance as I've noticed that on one instance all tests would not contain this error, but on a different one all tests would contain this error. However I cannot confirm this theory. If you could point me to the code that actually performs the screenshots and what could potentially fail in that process then maybe I could investigate that also.
I am fully aware of
Avoid function-as-a-service infrastructure (Lambda, GCF, etc)
inside https://github.com/GoogleChrome/lighthouse/blob/main/docs/variability.md#run-on-adequate-hardware , but I would like to know the reason behind this and whether it would be possible to actually support serverless as it's used very often. I'm guessing that someone already did some investigation around this so I would want to avoid duplicating the work and listen to the reasoning behind not supporting serverless infrastructure and if there are any possible fixes for the above issues I have listed. If you lack time to investigate particular parts, but think something should be possible then let us (the community) know so maybe somebody can help out.I've also noticed the following issues, but none of them have provided a perfect solution to the above problems:
Appreciate any replies and help 💪
The text was updated successfully, but these errors were encountered: