Bug 292738

Summary: [WebDriver][BiDi] Driver segfault waiting for relay response when browser abruptly closes
Product: WebKit Reporter: Lauro Moura <lmoura>
Component: WebDriverAssignee: Lauro Moura <lmoura>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Lauro Moura
Reported 2025-05-08 13:29:36 PDT
- 294391@main added support to relay BiDi commands into the browser with the inspector protocol method `Automation.processBidiMessage`. - While the proper command reply is sent by the browser as a separate `Automation.bidiMessageSent` inspector event, the call to `Automation.processBidiMessage` stores its callback to wait for eventual errors during the relay process (e.g. unknown methods). - In the case of a browser crash, `SessionHost::inspectorDisconnected` is called and flushes the pending callbacks with empty error payload. - At the same time, `SessionHost::relayBidiCommand` assumes a `"message"` field is always present. As such, it crashes in this empty error scenario. Patch incoming.
Attachments
Lauro Moura
Comment 1 2025-05-08 21:01:48 PDT
EWS
Comment 2 2025-05-11 14:53:08 PDT
Committed 294769@main (c89929f28371): <https://commits.webkit.org/294769@main> Reviewed commits have been landed. Closing PR #45148 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2025-05-11 14:54:12 PDT
Note You need to log in before you can comment on or make changes to this bug.