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

Page crash in Puppeteer >= 2.6.0 #16243

Open
3 tasks done
LegitTrevorTiernan opened this issue Nov 5, 2024 · 1 comment
Open
3 tasks done

Page crash in Puppeteer >= 2.6.0 #16243

LegitTrevorTiernan opened this issue Nov 5, 2024 · 1 comment

Comments

@LegitTrevorTiernan
Copy link

LegitTrevorTiernan commented Nov 5, 2024

FAQ

URL

cnn.com

What happened?

I was attempting to use puppeteer 23.6.0+ and the latest lighthouse 12.2.1
I ran into an issue where I was getting

page errored! Error: Page crashed!
--
  | 2024-11-05T19:15:18.618Z | at #onTargetCrashed (/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Page.js:384:50)

If I do not run lighthouse, the process is ok with Puppeteer 2.7.0. Although this error does not happen with lighthouse if puppeteer < 23.6.0.
When I did a deeper debug, I got an error similar to
https://stackoverflow.com/questions/49386692/aw-snap-and-asr-no-room-in-socket-buffer-errors-in-chrome
However, I'm using the flag. "--disable-dev-shm-usage",

What did you expect?

I expected the lighthouse audit to complete correctly without a puppeteer page crash.

What have you tried?

I tried running the process without lighthouse, and it worked.
I also tried running with an earlier version of Puppeteer, which did work with a lighthouse.

How were you running Lighthouse?

node

Lighthouse Version

12.2.1

Chrome Version

130.0.6723.58+

Node Version

20

OS

Linux (Amazon ECS task)

Relevant log output

Page errored! Error: Page crashed!
2024-11-05T19:46:33.223Z
at #onTargetCrashed (/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Page.js:379:50)
2024-11-05T19:46:33.223Z
at /node_modules/puppeteer-core/lib/cjs/third_party/mitt/mitt.js:62:7
2024-11-05T19:46:33.223Z
at Array.map (<anonymous>)
2024-11-05T19:46:33.223Z
at Object.emit (/node_modules/puppeteer-core/lib/cjs/third_party/mitt/mitt.js:61:20)
2024-11-05T19:46:33.223Z
at CdpCDPSession.emit (/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js:83:23)
2024-11-05T19:46:33.223Z
at CdpCDPSession._onMessage (/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/CDPSession.js:82:18)
2024-11-05T19:46:33.223Z
at Connection.onMessage (/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:143:25)
2024-11-05T19:46:33.223Z
at WebSocket.<anonymous> (/node_modules/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.js:44:32)
2024-11-05T19:46:33.223Z
at callListener (/node_modules/ws/lib/event-target.js:290:14)
2024-11-05T19:46:33.223Z
at WebSocket.onMessage (/node_modules/ws/lib/event-target.js:209:9)

Error! TargetCloseError: Protocol error (Emulation.setTouchEmulationEnabled): Target closed
at CallbackRegistry.clear (/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:73:36)
at CdpCDPSession._onClosed (/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/CDPSession.js:101:25)
at #onClose (/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:167:21)
at WebSocket.<anonymous> (/node_modules/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.js:49:30)
at callListener (/node_modules/ws/lib/event-target.js:290:14)
at WebSocket.onClose (/node_modules/ws/lib/event-target.js:220:9)
at WebSocket.emit (node:events:519:28)
at WebSocket.emitClose (/node_modules/ws/lib/websocket.js:272:10)
at Socket.socketOnClose (/node_modules/ws/lib/websocket.js:1341:15)
at Socket.emit (node:events:519:28) {
cause: ProtocolError
at <instance_members_initializer> (/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:94:14)
at new Callback (/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:98:16)
at CallbackRegistry.create (/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:23:26)
at Connection._rawSend (/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:90:26)
at CdpCDPSession.send (/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/CDPSession.js:66:33)
at next (/node_modules/puppeteer-extra-plugin-stealth/evasions/sourceurl/index.js:34:41)
at CdpCDPSession.send (/node_modules/puppeteer-extra-plugin-stealth/evasions/sourceurl/index.js:67:18)
at #applyViewport (/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/EmulationManager.js:147:32)
at EmulatedState.<anonymous> (/node_modules/puppeteer-core/lib/cjs/puppeteer/util/decorators.js:154:23)
at /node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/EmulationManager.js:69:33
}
content types: text/html video/mp4
TargetCloseError: Protocol error (Emulation.setTouchEmulationEnabled): Target closed
@adamraine
Copy link
Member

Can you please provide a minimum script or other repro steps for this issue

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

No branches or pull requests

4 participants