Open Bug 1924469 Opened 1 day ago Updated 14 hours ago

Unexpected alert open error no longer includes the dialog message

Categories

(Remote Protocol :: Agent, defect, P2)

defect
Points:
1

Tracking

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

Tracking Status
firefox-esr128 --- affected
firefox131 --- wontfix
firefox132 --- affected
firefox133 --- affected

People

(Reporter: jdescottes, Unassigned)

References

(Regression, )

Details

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

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]
You need to log in before you can comment on or make changes to this bug.