Closed Bug 1773939 Opened 2 years ago Closed 2 years ago

Add a trace log when MarionetteCommandsActorProxy returns null

Categories

(Remote Protocol :: Marionette, task, P1)

Default
task
Points:
1

Tracking

(firefox103 fixed)

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

(Whiteboard: [webdriver:m4][webdriver:external])

Attachments

(1 file)

The MarionetteCommandsActorProxy might return null if a JSWindowActor query fails for an AbortError, if the command is part of the list of NO_RETRY_METHODS.

This can be confusing, especially when its for a command that in theory can not return null (eg an executeScript which should always return a boolean).

We should at least add a trace log here to make investigations easier. We could also consider bubbling up the initial error instead of swallowing and returning null.

I wonder if in case of Execute Script we should catch the AbortError already in the JSWindowActor parent implementation of executeScript and transform it to a JavascriptError?

Or in case of such a case we should raise an unknown error instead? That would clearly result in an error and state what's wrong.

Adding the trace.log is a conservative approach, but I'm also in favor of throwing here.
Individual commands can then decide what to do upon an AbortError. I imagine the actions-related commands commands are fine with swallowing the error.

Having a trace log entry first for this case would be great. Then we can file bugs for individual commands to let them handle a custom behavior in such a situation. Would you be able to create a quick patch for it? I'm happy to review.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8b975128d2fc
[marionette] Add a trace log when MarionetteCommandsActorProxy returns null r=webdriver-reviewers,whimboo
Points: --- → 1
Priority: -- → P1
Whiteboard: [webdriver:m4]
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
Whiteboard: [webdriver:m4] → [webdriver:m4][webdriver:external]
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: