WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
289259
REGRESSION(
291284@main
) WebAutomationSession needs to push a command failure as soon as it gets it
https://bugs.webkit.org/show_bug.cgi?id=289259
Summary
REGRESSION(291284@main) WebAutomationSession needs to push a command failure ...
Lauro Moura
Reported
2025-03-06 09:41:25 PST
291284@main
changed WebAutomationSession callbacks to use a Function<T> approach instead of CallbackBase. In the generated code for the dispatchers, currently we get the following for evaluteJavaScriptFunction, which is used by a number of commands like getElementText: m_agent->evaluateJavaScriptFunction(in_browsingContextHandle, in_opt_frameHandle, in_function, in_arguments.releaseNonNull(), WTFMove(in_opt_expectsImplicitCallbackArgument), WTFMove(in_opt_forceUserGesture), WTFMove(in_opt_callbackTimeout), [backendDispatcher = m_backendDispatcher.copyRef(), protocol_requestId](CommandResult<String> result) { if (!result) { ASSERT(!result.error().isEmpty()); backendDispatcher->reportProtocolError(protocol_requestId, BackendDispatcher::ServerError, result.error()); return; } The problem is that `reportProtocolError` just stores the errors to send them later. This might cause clients to hang, given WebDriver Classic's synchronous approach, or even crash, if we have pending errors and the client (the driver) tries to send another command to be dispatched before flushing the errors. Tentative patch incoming.
Attachments
Add attachment
proposed patch, testcase, etc.
Lauro Moura
Comment 1
2025-03-06 09:51:27 PST
Pull request:
https://github.com/WebKit/WebKit/pull/42011
Radar WebKit Bug Importer
Comment 2
2025-03-12 16:56:04 PDT
<
rdar://problem/146900962
>
EWS
Comment 3
2025-03-12 18:17:36 PDT
Committed
292050@main
(cc06097b2c44): <
https://commits.webkit.org/292050@main
> Reviewed commits have been landed. Closing PR #42011 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug