Implement Inspector.targetCrashed
Categories
(Remote Protocol :: CDP, task, P3)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
Details
Puppeteer uses this event to indicate via the page.error event that a crash of the target has happened:
https://github.com/puppeteer/puppeteer/blob/e4de5f10d01b5bfb0ce686b6c32a38b57d80e12c/src/Page.ts#L330
https://github.com/puppeteer/puppeteer/blob/e4de5f10d01b5bfb0ce686b6c32a38b57d80e12c/src/Page.ts#L432
this.emit('error', new Error('Page crashed!'));
Even we don't implement the debugging / inspector capabilities it would be good to have at least this event being sent out. That way consumers of Puppeteer could catch crashes within the tab, and better handle the next steps in their scripts.
| Reporter | ||
Comment 1•6 years ago
|
||
Gabriele, do you know if there is an event we could register for from within a framescript that could tell us when a content crash happened?
Comment 2•6 years ago
|
||
What is a framescript? We usually send two events when a content process crash is detected: the ipc:content-shutdown event that is sent via the observer service and the oop-browser-crashed DOM Event.
The former event is sent also when a process shuts down cleanly, so you have to check that the subject is abnormal for detecting crashes, see the code here. The latter contains less information but should be easier to handle, you can find the code sending it here.
| Assignee | ||
Updated•5 years ago
|
| Reporter | ||
Comment 3•2 years ago
|
||
We are not going to implement this API for CDP.
Description
•