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

Version 10.2.0 fails Unhandled Rejection. Reason: Error: Cannot extract value when objectId is given #15101

Closed
2 tasks done
Lethgir opened this issue May 22, 2023 · 3 comments · Fixed by #15143
Closed
2 tasks done
Assignees

Comments

@Lethgir
Copy link

Lethgir commented May 22, 2023

FAQ

URL

https://gensdeconfiance.com/fr

What happened?

I add headers with the option --extra-headers=custom-headers.json but if this file contains a field User-Agent, Lighthouse crashes with the following error:

Unhandled Rejection. Reason: Error: Cannot extract value when objectId is given

See an example custom-headers.json file content:

{
  "User-Agent": "random",
  "Cookie": "random-cookie=randomValue"
}

What did you expect?

I expect Lighthouse to use a custom User-Agent and run the analysis without crash.

What have you tried?

I tried with and without the User-Agent field in the extra headers JSON.
This behavior works well with 10.1.0 but not with 10.2.0 version.

How were you running Lighthouse?

CLI

Lighthouse Version

10.2.0

Chrome Version

113

Node Version

16

OS

MacOS

Relevant log output

lighthouse https://gensdeconfiance.com/fr --extra-headers=".custom-headers.json"
  LH:ChromeLauncher Waiting for browser. +0ms
  LH:ChromeLauncher Waiting for browser... +0ms
  LH:ChromeLauncher Waiting for browser..... +503ms
  LH:ChromeLauncher Waiting for browser.....✓ +1ms
  LH:status Connecting to browser +198ms
  LH:status Navigating to about:blank +5ms
  LH:status Benchmarking machine +7ms
  LH:status Preparing target for navigation mode +1s
  LH:status Navigating to about:blank +11ms
  LH:status Preparing target for navigation +6ms
  LH:status Cleaning origin data +25ms
  LH:status Cleaning browser cache +3ms
  LH:status Preparing network conditions +22ms
  LH:status Navigating to https://gensdeconfiance.com/fr +43ms
Unhandled Rejection. Reason: Error: Cannot extract value when objectId is given
  LH:ChromeLauncher Killing Chrome instance 40446 +928ms
@adamraine
Copy link
Member

I can't reproduce this with the versions given, only thing I found was a similar bug for puppeteer. We upgraded our puppeteer dependency in 10.2.0 so that is possibly the source of the bug.

Can you reproduce this with the latest Chrome Canary?

@adamraine
Copy link
Member

I just reproduced this with the following command:

lighthouse https://espn.com -G

It seems unrelated to the User-Agent header.

@adamraine adamraine changed the title Version 10.2.0 fails with User-Agent header Version 10.2.0 fails Unhandled Rejection. Reason: Error: Cannot extract value when objectId is given May 22, 2023
@adamraine
Copy link
Member

puppeteer/puppeteer#10224

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.

4 participants