Closed Bug 1645894 Opened 6 years ago Closed 2 years ago

Implement Inspector.targetCrashed

Categories

(Remote Protocol :: CDP, task, P3)

task

Tracking

(Not tracked)

RESOLVED WONTFIX

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.

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?

Flags: needinfo?(gsvelto)

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.

Flags: needinfo?(gsvelto)
Component: CDP: Inspector → CDP

We are not going to implement this API for CDP.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.