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

Error rendering html report when running cli performance audit. #14001

Closed
2 tasks done
ChristopherPHolder opened this issue May 13, 2022 · 3 comments · Fixed by #14002
Closed
2 tasks done

Error rendering html report when running cli performance audit. #14001

ChristopherPHolder opened this issue May 13, 2022 · 3 comments · Fixed by #14002
Assignees

Comments

@ChristopherPHolder
Copy link
Contributor

FAQ

URL

https://daomaker.com

What happened?

Running "lighthouse https://daomaker.com/ --view" returns a blank page.

The console log reveals this error:

[Error] TypeError: null is not an object (evaluating 'n.width.toString')
	render (daomaker.com_2022-05-13_15-48-53.report.html:102:2731)
	renderNode (daomaker.com_2022-05-13_15-48-53.report.html:118:7083)
	_renderTableRow (daomaker.com_2022-05-13_15-48-53.report.html:118:5168)
	_renderTableRowsFromItem (daomaker.com_2022-05-13_15-48-53.report.html:118:5437)
	_renderTable (daomaker.com_2022-05-13_15-48-53.report.html:118:6201)
	populateAuditValues (daomaker.com_2022-05-13_15-48-53.report.html:81:2151)
	_renderOpportunity (daomaker.com_2022-05-13_15-48-53.report.html:139:1540)
	(anonymous function) (daomaker.com_2022-05-13_15-48-53.report.html:139:5581)
	forEach
	render (daomaker.com_2022-05-13_15-48-53.report.html:139:5538)
	_renderReport (daomaker.com_2022-05-13_15-48-53.report.html:174:5757)
	renderReport (daomaker.com_2022-05-13_15-48-53.report.html:174:1323)
	(anonymous function) (daomaker.com_2022-05-13_15-48-53.report.html:259:821)
	(anonymous function) (daomaker.com_2022-05-13_15-48-53.report.html:259:858)
	Global Code (daomaker.com_2022-05-13_15-48-53.report.html:261)

However, "lighthouse https://daomaker.com/ --output=json --output-path=./report.json --save-assets" does return e-report-0.devtoolslog.json report-0.trace.json report.json and does not seem to have any errors.

The error is also present when using https://pagespeed.web.dev/report?url=https%3A%2F%2Fdaomaker.com%2F where it returns Error: LHR failed to render.

However, it does show historical data.

What did you expect?

An HTML Rendered lighthouse report or a proper error message to help fix the bug in my code.

What have you tried?

I have tried running the same command on a different domain which worked.

I have tried adding options to the CLI command and it still failed. The options I tried were:

--screenEmulation.disabled 
--throttling-method=provided 
--no-emulatedUserAgent
--only-categories=performance 
--enable-error-reporting 
--view 
--chrome-flags='--window-size=412,660'"

I have also tried downgrading the CLI version and got no results.

How were you running Lighthouse?

CLI

Lighthouse Version

"lighthouse": "^9.6.1"

Chrome Version

Version 101.0.4951.64 (Official Build) (x86_64)

Node Version

v16.14.2

OS

No response

Relevant log output

[Error] TypeError: null is not an object (evaluating 'n.width.toString')
	render (daomaker.com_2022-05-13_15-48-53.report.html:102:2731)
	renderNode (daomaker.com_2022-05-13_15-48-53.report.html:118:7083)
	_renderTableRow (daomaker.com_2022-05-13_15-48-53.report.html:118:5168)
	_renderTableRowsFromItem (daomaker.com_2022-05-13_15-48-53.report.html:118:5437)
	_renderTable (daomaker.com_2022-05-13_15-48-53.report.html:118:6201)
	populateAuditValues (daomaker.com_2022-05-13_15-48-53.report.html:81:2151)
	_renderOpportunity (daomaker.com_2022-05-13_15-48-53.report.html:139:1540)
	(anonymous function) (daomaker.com_2022-05-13_15-48-53.report.html:139:5581)
	forEach
	render (daomaker.com_2022-05-13_15-48-53.report.html:139:5538)
	_renderReport (daomaker.com_2022-05-13_15-48-53.report.html:174:5757)
	renderReport (daomaker.com_2022-05-13_15-48-53.report.html:174:1323)
	(anonymous function) (daomaker.com_2022-05-13_15-48-53.report.html:259:821)
	(anonymous function) (daomaker.com_2022-05-13_15-48-53.report.html:259:858)
	Global Code (daomaker.com_2022-05-13_15-48-53.report.html:261)
@connorjclark
Copy link
Collaborator

image

Very unusual. This should never return a non-number value:
https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/lib/page-functions.js#L436

@brendankenny
Copy link
Member

is the site overriding getBoundingClientRect()? NaN gets turned into null through JSON.stringify(), but it shouldn't be returning NaN either.

@connorjclark
Copy link
Collaborator

uh... yup :)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants