From da77157730d86439cf82f4aafeaaf242079a0a33 Mon Sep 17 00:00:00 2001 From: tommasini <46944231+tommasini@users.noreply.github.com> Date: Tue, 24 Mar 2026 20:17:07 +0000 Subject: [PATCH] chore(runway): cherry-pick fix: disable Branch test instance and debug mode in branch.json cp-7.71.0 (#27879) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** `branch.json` had `useTestInstance: true` and `debugMode: true`, which forced **all builds** — including production RC — to initialize the Branch SDK against the **test environment**. Branch short links (e.g. `metamask.app.link/1WkF6GmE40b`) are created in the **live** Branch dashboard, so the test-instance SDK could never resolve them: the test and live environments are separate databases. This was the root cause of the "This page doesn't exist" error when opening Branch deepview short links (e.g. from Twitter/X). The SDK returned `+clicked_branch_link: false` and `+non_branch_link` with the raw URL because the test environment had no record of live links. The fix sets both values to `false` so the SDK uses the live key from the native configuration (`Info.plist` / `AndroidManifest.xml`), matching the environment where links are actually created. **Note:** The same `branch.json` content is also present at `android/app/src/main/assets/branch.json` — both platforms are affected. This PR fixes the root config; the Android copy should also be verified/updated. ## **Changelog** CHANGELOG entry: Fixed Branch.io deep links not resolving by switching SDK from test to live environment ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: Branch short link deep linking Background: Given I have a production RC build installed And the app is using the live Branch key Scenario: user opens a Branch short link from cold start Given the app is not running When user taps a Branch deepview link (e.g. https://metamask.app.link/1WkF6GmE40b) Then the app should open And the user should be navigated to the intended destination (e.g. Trending page) And the "This page doesn't exist" modal should NOT appear Scenario: user opens a Branch short link from warm start (app backgrounded) Given the app is running in the background When user taps a Branch deepview link Then the app should come to foreground And the user should be navigated to the intended destination Scenario: user opens a direct universal link (non-Branch) Given the app is installed When user taps https://link.metamask.io/trending Then the Trending page should open normally And behavior should be unchanged from before this PR ``` ## **Screenshots/Recordings** ### **Before** N/A ### **After** N/A ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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] > **Low Risk** > Low risk config-only change, but it affects deep link behavior across builds by switching Branch initialization away from the test environment. > > **Overview** > Disables `debugMode` and `useTestInstance` in `branch.json`, ensuring the Branch SDK initializes against the **live** environment rather than the test instance. > > This should restore proper resolution of production Branch short links/deepviews that previously failed when the app was forced to use the test Branch database. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 33fcef144d583a1c9368a13cf57d8e03d887dd98. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- branch.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/branch.json b/branch.json index d64e8345b90..ecceb6254d5 100644 --- a/branch.json +++ b/branch.json @@ -1,6 +1,6 @@ { - "debugMode": true, - "useTestInstance": true, + "debugMode": false, + "useTestInstance": false, "delayInitToCheckForSearchAds": false, "appleSearchAdsDebugMode": false }