question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Lighthouse performance is returning NULL most of the time

See original GitHub issue

Environment

  • chrome-aws-lambda Version: 7.0.0
  • puppeteer / puppeteer-core Version: 7.1.0
  • OS: Mac
  • Node.js Version: 12.x
  • Lambda / GCF Runtime: nodejs12.x

Expected Behavior

Google Lighthouse executed successfully and always returns Performance score

Current Behavior

Google Lighthouse executed successfully BUT most of the time Performance score is null.

Screenshot 2021-02-18 at 5 25 49 PM

Steps to Reproduce

I created a github repo to help reproduce the error.

https://github.com/wafendy/aws-lambda-lighthouse-docker

main branch: Using the latest version which is v7.0.0 last-known-working branch: Using version v3.1.1

v3.1.1 is last known stable version for my setup.

Possible Solution

chrome-aws-lambda v3.1.1 is the last known working version, but it has may security vulnerabilities and no more updates to addresss the vulnerabilities.

Perhaps, I’m using it wrongly or there is missing configuration.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

2reactions
ACAHNNcommented, Mar 16, 2021

In case this is helpful for anyone. I was having this issue when driving lighthouse via puppeteer. What fixed it for me was removing an argument that is passed to chromium. Specifically, I was using the --single-process flag. Commenting this out did the trick for me.

[code]

await puppeteer.launch({
	    ignoreHTTPSErrors: true,
	    headless: true,
	    args: [//'--single-process',
		   '--no-zygote',
		   '--no-sandbox',
		  ]
	});

[configuration]

node: 14.16.0 lighthouse: 7.2.0 puppeteer: 8.0.0 platform(s): macOS Big Sur (local), Ubuntu 20.04 (remote EC2 instance)

1reaction
louist7commented, May 27, 2022

We found that increasing the memory on the lambda function to 2048 MB, and the timeout to 300 seconds, improved the reliability of the results enough for us to be able to use it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Lighthouse results
There are a number of reasons why your Lighthouse scores in SpeedCurve might be different from the scores you see in other tools,...
Read more >
Performance monitoring with Lighthouse CI - web.dev
A single Lighthouse report provides a snapshot of a web page's performance at the time that it is run; Lighthouse CI shows how...
Read more >
PageSpeed Insights won't return a result — Lighthouse error
This reason you are getting timeout error is due to the extremely slow page load is exceeding PageSpeed timeout limits.
Read more >
Using Lighthouse to improve page load performance
# JavaScript Boot-up Time is High. When too much JavaScript is loaded, the page can become unresponsive as the browser parses, compiles, and ......
Read more >
Resolve blocking problem caused by lock escalation - SQL ...
Summary. Lock escalation is the process of converting many fine-grained locks (such as row or page locks) to table locks. Microsoft SQL Server ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found