Skip to content

fix: Patch detox to handle errors when injecting into WebViews#29733

Merged
FrederikBolding merged 3 commits into
chore/drop-snaps-xmlserializer-patchfrom
fb/patch-detox-injection
May 6, 2026
Merged

fix: Patch detox to handle errors when injecting into WebViews#29733
FrederikBolding merged 3 commits into
chore/drop-snaps-xmlserializer-patchfrom
fb/patch-detox-injection

Conversation

@FrederikBolding
Copy link
Copy Markdown
Member

@FrederikBolding FrederikBolding commented May 5, 2026

Description

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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.

Note

Medium Risk
Medium risk because it changes Android test/build wiring for Detox (dependency resolution, Gradle module inclusion, flavor dimensions), which could break CI/e2e builds even though it shouldn’t affect production runtime.

Overview
Ensures Detox’s Android WebView HTML extraction doesn’t fail hard by wrapping the injected GET_HTML_SCRIPT in a try/catch and returning a minimal empty HTML document on error.

Switches the project to consume a Yarn-patched detox@20.51.0 and builds Detox from source in Gradle (include ':detox' + androidTestImplementation(project(path: ":detox"))), removing the old Detox-android Maven repo usage. Android app config is updated to resolve Detox’s flavor via missingDimensionStrategy 'detox', 'full'.

Reviewed by Cursor Bugbot for commit 17e05cb. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 5, 2026
@metamaskbotv2 metamaskbotv2 Bot added the team-core-platform Core Platform team label May 5, 2026
@github-actions github-actions Bot added the size-S label May 5, 2026
@FrederikBolding FrederikBolding removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 5, 2026
@FrederikBolding FrederikBolding added the skip-smart-e2e-selection Skip Smart E2E selection, i.e. select all E2E tests to run label May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - skip-smart-e2e-selection label found

All E2E tests pre-selected.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 5, 2026

@FrederikBolding FrederikBolding marked this pull request as ready for review May 6, 2026 10:46
@FrederikBolding FrederikBolding requested a review from a team as a code owner May 6, 2026 10:46
@FrederikBolding FrederikBolding merged commit 51bbc68 into chore/drop-snaps-xmlserializer-patch May 6, 2026
99 of 110 checks passed
@FrederikBolding FrederikBolding deleted the fb/patch-detox-injection branch May 6, 2026 10:50
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size-S skip-smart-e2e-selection Skip Smart E2E selection, i.e. select all E2E tests to run team-core-platform Core Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant