Skip to content

fix: remove RiveRenderer.defaultRenderer Canvas override on Android to prevent Earn onboarding crash#31475

Merged
vinnyhoward merged 4 commits into
mainfrom
fix-tmcu-earn-crash-due-to-android-canvas
Jun 10, 2026
Merged

fix: remove RiveRenderer.defaultRenderer Canvas override on Android to prevent Earn onboarding crash#31475
vinnyhoward merged 4 commits into
mainfrom
fix-tmcu-earn-crash-due-to-android-canvas

Conversation

@vinnyhoward

@vinnyhoward vinnyhoward commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Description

Removed the global RiveRenderer.defaultRenderer(..., RiveRendererAndroid.Canvas) call in FoxLoader during app init. Although this lived in the splash-screen loader, defaultRenderer is a process-wide setting that forced every Rive view in the app onto Android's Canvas renderer Surface.lockCanvas path. This caused the Money/Earn onboarding stepper to hard-crash SIGABRT/SIGSEGV on Android when the Rive view tore down during tab navigation, the worker thread called lockCanvas on an already-released Surface, leaving a pending JNI exception that ART aborted on. Tombstone confirmed on Pixel 6a / Android 16. Reverting to the default Rive GPU renderer removes the lockCanvas code path entirely.

iOS is unaffected (already uses the GPU renderer).

Changelog

CHANGELOG entry: Fixed an Android crash when entering Earn onboarding caused by the Rive Canvas renderer being forced app-wide.

Related issues

Fixes: #31166
#31167

Manual testing steps

Feature: Earn onboarding no longer crashes on Android

  Scenario: User enters Earn onboarding on Android after fresh install
    Given the app is built in release mode on a Pixel 6a (or equivalent) running Android 16
    And the user has completed initial app load (FoxLoader splash animation plays)

    When the user taps the Money/Earn tab
    And the Rive onboarding stepper mounts
    Then the app does not crash
    And the onboarding animation renders and steps through normally

  Scenario: Splash animation still plays on Android
    Given a fresh launch on Android
    When the FoxLoader splash screen appears
    Then the fox Rive animation plays to completion without visual regressions

Screenshots/Recordings

Screen.Recording.2026-06-10.at.9.14.14.AM.mov

Before

Crash on open

603585807-7134de62-dd23-40dd-862a-b2234e10cb0a.mov

Crash on close

603582891-910de198-bdec-4acf-8f50-50529c7b9dd0.1.mov

After

Screen.Recording.2026-06-10.at.9.14.14.AM.mov

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
Small splash-only change with process-wide rendering impact on Android; fixes a production crash but may reintroduce any original Canvas-renderer motivation (e.g. splash geometry).

Overview
Removes the Android-only RiveRenderer.defaultRenderer(..., RiveRendererAndroid.Canvas) setup from FoxLoader so Rive is no longer forced app-wide onto the Canvas renderer during splash init.

That global override affected every Rive view (not just the fox splash), which led to SIGABRT/SIGSEGV when Earn/Money onboarding Rive UI tore down during tab navigation (lockCanvas on a released Surface). iOS is unchanged; Android again uses Rive’s default GPU renderer.

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

@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@mm-token-exchange-service mm-token-exchange-service Bot added the team-mobile-ux Mobile UX team label Jun 10, 2026
@github-actions github-actions Bot added size-S risk:medium AI analysis: medium risk labels Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The change removes the Android-specific Rive Canvas renderer initialization from FoxLoader.tsx. This is a rendering backend change (switching from Canvas to default SurfaceView renderer on Android) for the Fox splash screen animation.

Key findings:

  1. E2E tests are unaffected: The FoxLoader component has a dedicated E2E variant (FoxLoaderE2E) that completely bypasses the Rive animation. When hasTestOverrides is true (E2E mode), the simplified component is used instead, which just calls hideAsync() and triggers onAnimationComplete immediately. The removed code (Android renderer initialization) is never executed during E2E tests.

  2. No functional flow changes: This change only affects the rendering backend for the Rive animation on Android. It doesn't change any navigation flows, state management, or user-facing functionality beyond the visual rendering of the splash animation.

  3. No E2E test tags cover this: None of the available E2E test tags specifically test the FoxLoader animation or splash screen rendering behavior.

Since E2E tests bypass the FoxLoader animation entirely, no E2E tags need to be run for this change.

Performance Test Selection:
While FoxLoader is used during app launch and lock screen (which are covered by @PerformanceLaunch and @PerformanceLogin), the change only switches the Rive rendering backend on Android from Canvas to the default SurfaceView. This is a visual rendering change, not a performance-impacting change. The animation timing and app startup sequence remain the same. Performance tests measure timing metrics that would not be meaningfully affected by a renderer backend switch.

View GitHub Actions results

@vinnyhoward vinnyhoward added this pull request to the merge queue Jun 10, 2026
Merged via the queue into main with commit 7929023 Jun 10, 2026
98 of 104 checks passed
@vinnyhoward vinnyhoward deleted the fix-tmcu-earn-crash-due-to-android-canvas branch June 10, 2026 21:33
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 10, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.82.0 Issue or pull request that will be included in release 7.82.0 label Jun 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.82.0 Issue or pull request that will be included in release 7.82.0 risk:medium AI analysis: medium risk size-S team-mobile-ux Mobile UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Earn (Money) onboarding crashes the app on Android when tapping the X close button

3 participants