Repository navigation
Commit 44ba3fe
authored
test: enable Firefox 159 WebDriver system access via MOZ_REMOTE_ALLOW_SYSTEM_ACCESS (#47589)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
**Problem**
Some Firefox Selenium E2E test is failing during driver setup with
UnsupportedOperationError: Navigation to "about:debugging#addons" is not
allowed in this context. The cause is GitHub's new Ubuntu 24.04 runner
image (ubuntu24/20261101.360), which upgraded the preinstalled Firefox
from 158.0.1 to 159.0. Firefox 159 removed the
--remote-allow-system-access command-line flag (Firefox bug 2054896).
Our workaround from
[#44946](#44946) and
[#45014](#45014)
relied on that flag, since geckodriver's --allow-system-access just
passes it on to Firefox. Without system access, Firefox blocks
navigation to about:debugging, where we read the extension's internal
ID. The new image is still rolling out, so failures depend on which
image a runner gets, not on branch changes.
**Temp Fix**
Set MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1 in the geckodriver service
environment (test/e2e/webdriver/firefox.js). Firefox inherits it when
geckodriver launches it. --allow-system-access stays in place so Firefox
158 and older keep working. I confirmed it locally with Firefox 159.0
and geckodriver 0.36.0: without the variable, Firefox throws the same
error as CI; with it, about:debugging#addons loads.
Eventually migrate to Playwright and use newer versions
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry:
## **Related issues**
Fixes:
## **Manual testing steps**
1. Check ci
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Test-only WebDriver bootstrap change with no production or user-facing
impact.
>
> **Overview**
> Fixes Firefox Selenium E2E setup on **Firefox 159+** (e.g. new Ubuntu
24.04 CI images), where navigation to `about:debugging#addons` fails
because Mozilla removed the `--remote-allow-system-access` CLI flag that
geckodriver used to pass through via `--allow-system-access`.
>
> The geckodriver service in `test/e2e/webdriver/firefox.js` now sets
**`MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1`** on the service environment so
Firefox inherits it at launch. **`--allow-system-access`** is unchanged
for **Firefox 153–158**. Comments were updated to document both paths
and link Mozilla bug 2054896.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
d8a3ab9. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent f693520 commit 44ba3fe
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
170 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
171 | 174 | | |
| 175 | + | |
172 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
173 | 181 | | |
174 | 182 | | |
175 | 183 | | |
| |||
0 commit comments