Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,25 @@ builds:
secrets: *secrets
code_fencing: *code_fencing_main

# BrowserStack performance builds — base config (device build, no IS_SIM_BUILD).
# Used internally by build.sh via loadBuildConfig when building bs variants.
# IS_SIM_BUILD is intentionally omitted so the build produces an IPA (device build)
# rather than a simulator .app, which is required for BrowserStack App Automate.
main-e2e-bs:
github_environment: build-e2e
signing: *signing_uat
env:
<<: *public_envs
METAMASK_ENVIRONMENT: 'e2e'
METAMASK_BUILD_TYPE: 'main'
IS_BROWSERSTACK_BUILD: 'true'
DISABLE_NOTIFICATION_PROMPT: 'true'
E2E_MOCK_OAUTH: 'true'
IS_PERFORMANCE_TEST: 'true'
RAMP_INTERNAL_BUILD: 'true'
secrets: *secrets
code_fencing: *code_fencing_main
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BrowserStack override prevents device build from producing IPA

High Severity

The new main-e2e-bs config correctly omits IS_SIM_BUILD, but the existing BrowserStack override at build.sh line 948 sets IS_SIM_BUILD="false" for all BrowserStack builds. In generateIosBinary, the device build condition at line 451 uses [ -z "$IS_SIM_BUILD" ], which tests for an empty string — the string "false" has length 5, so -z returns false. With IS_DEVICE_BUILD also unset, neither the simulator nor device build block executes, producing no IPA at all. The override needs to unset IS_SIM_BUILD instead of setting it to "false", or be removed entirely now that main-e2e-bs no longer sets IS_SIM_BUILD.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 45e9884. Configure here.


# BrowserStack performance builds — seedless onboarding (E2E_MOCK_OAUTH baked in)
# IS_PERFORMANCE_TEST suppresses E2E startup overhead (ReadOnlyNetworkStore, command
# polling, Sentry mock) while keeping METAMASK_ENVIRONMENT='e2e' so this build works
Expand All @@ -235,7 +254,7 @@ builds:
RAMP_INTERNAL_BUILD: 'true'
secrets: *secrets
code_fencing: *code_fencing_main

# BrowserStack performance builds — with pre-imported wallet (ADDITIONAL_SRP_1 baked in)
# IS_PERFORMANCE_TEST suppresses E2E startup overhead (ReadOnlyNetworkStore, command
# polling, Sentry mock) while keeping METAMASK_ENVIRONMENT='e2e' so this build works
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"build:android:main:dev": "./scripts/build.sh android main dev",
"build:android:main:test": "./scripts/build.sh android main test",
"build:android:main:e2e": "./scripts/build.sh android main e2e",
"build:android:main:e2e:bs:with:srp": "./scripts/build.sh android main e2e",
"build:android:main:e2e:bs:without:srp": "./scripts/build.sh android main e2e",
"build:android:main:e2e:bs:with:srp": "./scripts/build.sh android main e2e-bs",
"build:android:main:e2e:bs:without:srp": "./scripts/build.sh android main e2e-bs",
"build:android:main:exp:with:srp": "./scripts/build.sh android main exp",
"build:android:main:exp:without:srp": "./scripts/build.sh android main exp",
"build:android:flask:prod": "./scripts/build.sh android flask production",
Expand All @@ -73,8 +73,8 @@
"build:ios:main:rc": "./scripts/build.sh ios main rc",
"build:ios:main:exp": "./scripts/build.sh ios main exp",
"build:ios:main:e2e": "./scripts/build.sh ios main e2e",
"build:ios:main:e2e:bs:with:srp": "./scripts/build.sh ios main e2e",
"build:ios:main:e2e:bs:without:srp": "./scripts/build.sh ios main e2e",
"build:ios:main:e2e:bs:with:srp": "./scripts/build.sh ios main e2e-bs",
"build:ios:main:e2e:bs:without:srp": "./scripts/build.sh ios main e2e-bs",
"build:ios:main:exp:with:srp": "./scripts/build.sh ios main exp",
"build:ios:main:exp:without:srp": "./scripts/build.sh ios main exp",
"build:ios:main:dev": "./scripts/build.sh ios main dev",
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ checkParameters(){
fi

# Check if the METAMASK_ENVIRONMENT is valid
VALID_METAMASK_ENVIRONMENTS="production|beta|rc|exp|test|e2e|dev"
VALID_METAMASK_ENVIRONMENTS="production|beta|rc|exp|test|e2e|e2e-bs|dev"
case "${METAMASK_ENVIRONMENT}" in
production|beta|rc|exp|test|e2e|dev)
production|beta|rc|exp|test|e2e|e2e-bs|dev)
# Valid environment - continue
;;
*)
Expand Down
Loading