Closed Bug 1924469 Opened 1 year ago Closed 1 year ago

Unexpected alert open error no longer includes the dialog message

Categories

(Remote Protocol :: Marionette, defect, P2)

defect
Points:
1

Tracking

(firefox-esr128 wontfix, firefox131 wontfix, firefox132 wontfix, firefox133 fixed)

RESOLVED FIXED
133 Branch
Tracking Status
firefox-esr128 --- wontfix
firefox131 --- wontfix
firefox132 --- wontfix
firefox133 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Regression, )

Details

(Keywords: regression, Whiteboard: [webdriver:m13][webdriver:relnote])

Attachments

(1 file)

Per WebDriver spec https://www.w3.org/TR/webdriver2/#dfn-annotated-unexpected-alert-open-error:

An annotated unexpected alert open error is an error with error code unexpected alert open and an optional error data dictionary with the
following entries:

"text"
The current user prompt's message.

Since Bug 1884650 we replaced the following errors
https://searchfox.org/mozilla-central/rev/d981e5ac5332707e7cc4942b06510b293ae4f783/remote/marionette/driver.sys.mjs#2836-2838,2846-2848

throw new lazy.error.UnexpectedAlertOpenError(
  `Accepted user prompt dialog: ${textContent}`
);
...
throw new lazy.error.UnexpectedAlertOpenError(
  `Dismissed user prompt dialog: ${textContent}`
);

By https://searchfox.org/mozilla-central/rev/82fa67b1ebdb6f3c05ef24dbfa65abadcc23ff25/remote/marionette/driver.sys.mjs#2887-2892

throw new lazy.error.UnexpectedAlertOpenError(
  `Unexpected ${promptType} dialog detected. Performed handler "${handler.handler}"`,
  {
    text: textContent,
  }
);

And we no longer expose the dialog message, whereas Chrome still does. See related geckodriver issue: https://github.com/mozilla/geckodriver/issues/2204

Set release status flags based on info from the regressing bug 1884650

:whimboo, since you are the author of the regressor, bug 1884650, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

So it's not per-se a bug but an improvement to align better with the specification. But it looks like that geckodriver doesn't correctly forward the text property of the error. We probably want to fix that in M13. Lets discuss today in the triage meeting.

Component: Agent → geckodriver
Flags: needinfo?(hskupin)
Product: Remote Protocol → Testing

Let's just update the error message to align with Chrome for now, and we will fix geckodriver separately to align with the spec.

Severity: -- → S3
Points: --- → 1
Component: geckodriver → Agent
Priority: -- → P2
Product: Testing → Remote Protocol
Whiteboard: [webdriver:m13]

Consumers seem to depend on having the dialog text in the error message, so we restore it here.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Blocks: 1925934
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/be3b2042dfad [marionette] Include dialog text in unexpected alert open error message r=webdriver-reviewers,whimboo
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch

The patch landed in nightly and beta is affected.
:jdescottes, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox132 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(jdescottes)

I think it's a bit late for uplifts and this should not impact too many consumers. Let's ride the trains here.

Flags: needinfo?(jdescottes)
Whiteboard: [webdriver:m13] → [webdriver:m13][webdriver:relnote]
Component: Agent → Marionette
You need to log in before you can comment on or make changes to this bug.