MetaMask / MetaMask/metamask-mobile

token-approve Appium smoke suite fails on main with "confirm-button not in hierarchy"

Open
#34,581 2 comments 0 reactions 0 assignees View on GitHub
INVALID-ISSUE-TEMPLATE ta-needs-engineer-escalation ta-triaged team-confirmations tests
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

## **Description**

The token-approve Appium smoke suite fails consistently on `main` with `Element "confirm-button" not in hierarchy after 3000ms`. The confirm button on the approve confirmation never appears, so every approve confirmation spec times out after retries.

This is red on `main` itself, not tied to a single PR, so it currently blocks any PR whose Appium confirmations jobs are required.

Affected specs (Android smoke):

- `tests/smoke-appium/confirmations/transactions/token-approve/approve.spec.ts` (ERC721)
- `tests/smoke-appium/confirmations/transactions/token-approve/set-approval-for-all.spec.ts` (ERC721 and ERC1155, incl. revoke)
- `tests/smoke-appium/confirmations/transactions/token-approve/increase-allowance.spec.ts` (ERC20)

## **Technical Details**

Failure signature (6 retries then fail):

```
Last error: Element "confirm-button" not in hierarchy after 3000ms
```

When it started:

- Last green main run: `037bcafad` (both `appium-confirmations-android-smoke` jobs passed).
- First red main run: `885a6d4b9`, and consistently red since.

The token-approve suites were skipped in #34387 (unstable), then re-enabled in #34448 (stabilize and unskip). #34448 was already present in the last green run, so the suite did pass once before going consistently red.

The only repo commit between the last green and first red run is #34536 (remove custom toast background color), a one file watchlist change that cannot affect the token-approve confirm button, so it is not the cause. The likely driver is the re-enabled suite still being unstable, or a CI environment condition around that time. Someone from confirmations should confirm whether the confirm button testID or the approve confirmation screen regressed, or whether the suite should be re-skipped until stable.

cc @vivek-consensys (re-enabled the suite in #34448)

## **Acceptance Criteria**

- Root cause of the missing `confirm-button` on the approve confirmation is identified.
- The token-approve Appium smoke suite passes on `main`, or is re-skipped with a tracking note until it can be stabilized.
- `appium-confirmations-android-smoke` jobs are green on `main`.

## **References**

- Last green run: https://github.com/MetaMask/metamask-mobile/actions/runs/31387783175
- First red run: https://github.com/MetaMask/metamask-mobile/actions/runs/31392370350
- Recent red run: https://github.com/MetaMask/metamask-mobile/actions/runs/31429502502
- Re-enable PR: #34448
- Prior skip PR: #34387

Contributor guide

Open the contributing guide

Research direction

Start with the three affected specs under tests/smoke-appium/confirmations/transactions/token-approve/ and reproduce the missing confirm-button failure in the appium-confirmations-android-smoke job. Compare the last green run 037bcafad with the first red run 885a6d4b9, and review #34387 and #34448 for the suite’s skip and re-enable context. Done means the root cause is documented and the jobs pass on main, or the suite is re-skipped with a tracking note.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
ci-cd, mobile-dev, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.