Closed Bug 1930090 Opened 13 days ago Closed 9 days ago

Retry dispatching single event if navigation aborted a dispatch

Categories

(Remote Protocol :: WebDriver BiDi, defect, P2)

defect
Points:
2

Tracking

(firefox134 fixed)

RESOLVED FIXED
134 Branch
Tracking Status
firefox134 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: whimboo)

References

(Blocks 2 open bugs)

Details

(Keywords: intermittent-failure, intermittent-testcase, Whiteboard: [webdriver:m13])

Attachments

(1 file)

This is a new test as introduced with my work on bug 1921314. It shows that when a navigation happens while we are in the middle of sending the mouse event through EventUtils we raise an error like:

[task 2024-11-03T10:03:32.578Z] 10:03:32     INFO - E       webdriver.bidi.error.UnknownErrorException: unknown error ([Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowUtils.sendMouseEvent]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://remote/content/external/EventUtils.js :: synthesizeMouseAtPoint :: line 788"  data: no])
[task 2024-11-03T10:03:32.578Z] 10:03:32     INFO - E       
[task 2024-11-03T10:03:32.578Z] 10:03:32     INFO - E       Remote-end stacktrace:
[task 2024-11-03T10:03:32.578Z] 10:03:32     INFO - E       
[task 2024-11-03T10:03:32.578Z] 10:03:32     INFO - E       synthesizeMouseAtPoint@chrome://remote/content/external/EventUtils.js:788:32
[task 2024-11-03T10:03:32.578Z] 10:03:32     INFO - E       event.synthesizeMouseAtPoint@chrome://remote/content/shared/webdriver/Event.sys.mjs:83:30
[task 2024-11-03T10:03:32.578Z] 10:03:32     INFO - E       _dispatchEvent@chrome://remote/content/webdriver-bidi/modules/windowglobal/input.sys.mjs:154:20
[task 2024-11-03T10:03:32.578Z] 10:03:32     INFO - E       handleCommand@chrome://remote/content/shared/messagehandler/MessageHandler.sys.mjs:257:33
[task 2024-11-03T10:03:32.578Z] 10:03:32     INFO - E       receiveMessage@chrome://remote/content/shared/messagehandler/transports/js-window-actors/MessageHandlerFrameChild.sys.mjs:78:37
[task 2024-11-03T10:03:32.578Z] 10:03:32     INFO - 
[task 2024-11-03T10:03:32.578Z] 10:03:32     INFO - cmd_name   = 'input.performActions'
[task 2024-11-03T10:03:32.578Z] 10:03:32     INFO - future     = <Future finished exception=UnknownErrorException(unknown error, [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowUtils.sendMouseEvent]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://remote/content/external/EventUtils.js :: synthesizeMouseAtPoint :: line 788"  data: no], synthesizeMouseAtPoint@chrome://remote/content/external/EventUtils.js:788:32
[task 2024-11-03T10:03:32.578Z] 10:03:32     INFO - event.synthesizeMouseAtPoint@chrome://remote/content/shared/webdriver/Event.sys.mjs:83:30
[task 2024-11-03T10:03:32.579Z] 10:03:32     INFO - _dispatchEvent@chrome://remote/content/webdriver-bidi/modules/windowglobal/input.sys.mjs:154:20
[task 2024-11-03T10:03:32.579Z] 10:03:32     INFO - handleCommand@chrome://remote/content/shared/messagehandler/MessageHandler.sys.mjs:257:33
[task 2024-11-03T10:03:32.579Z] 10:03:32     INFO - receiveMessage@chrome://remote/content/shared/messagehandler/transports/js-window-actors/MessageHandlerFrameChild.sys.mjs:78:37
[task 2024-11-03T10:03:32.579Z] 10:03:32     INFO - )>

We as well have quite a few meta data entries for this test:
https://searchfox.org/mozilla-central/source/testing/web-platform/meta/webdriver/tests/bidi/input/perform_actions/navigation.py.ini

Depends on: 1921314

There are as well upstream failures with Chrome. Given the results the pointer action on the new page hasn't been sent.

I need to further investigate.

For this particular issue we are not getting a clear error type from the platform code, but I think that based on a NS_ERROR_FAILURE we should consider to just retry the command because it is dispatching a single event only and it was not successful.

To accomplish that we could throw an AbortError exception so that the RootTransport implementation understands it as a JSWindowActor disconnect and would retry the command a given number of times. That would allow us to continue the action sequence while in the other hand will finally throw that error if it is permanent.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Severity: S4 → --
Priority: P5 → --
Severity: -- → S3
Points: --- → 2
Priority: -- → P2
Whiteboard: [webdriver:m13]
Summary: Intermittent /webdriver/tests/bidi/input/perform_actions/navigation.py | test_pointer - webdriver.bidi.error.UnknownErrorException: unknown error (["Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowUtils.sendMouseEvent]"]) → Retry dispatching single event if navigation aborted a dispatch
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e96c75cc6b8e [webdriver-bidi] Retry dispatching single event if navigation aborted a dispatch. r=webdriver-reviewers,Sasha
Status: ASSIGNED → RESOLVED
Closed: 9 days ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: