|
7 | 7 | DEVICE_MODEL: 'iPhone 17' |
8 | 8 | IOS_VERSION: '26.2' |
9 | 9 | USE_CCACHE: 1 |
| 10 | + # simslim slimming is temporarily disabled while we confirm whether it is what |
| 11 | + # stops the app from requesting its Metro bundle. Set to 'true' to re-enable. |
| 12 | + SIMSLIM_ENABLED: 'false' |
10 | 13 |
|
11 | 14 | jobs: |
12 | 15 | ios: |
|
48 | 51 | run: yarn pod |
49 | 52 |
|
50 | 53 | - name: "Optimize simulator with simslim" |
| 54 | + if: env.SIMSLIM_ENABLED == 'true' |
51 | 55 | run: | |
52 | 56 | if ! command -v jq &> /dev/null; then |
53 | 57 | brew install jq |
@@ -106,9 +110,43 @@ jobs: |
106 | 110 | sleep 10 |
107 | 111 | echo "Ready to run tests" |
108 | 112 |
|
| 113 | + # Diagnostics for "the app did not request its Metro bundle" failures. The |
| 114 | + # harness only reports that no bundle request arrived, not why, so record the |
| 115 | + # simulator-side state it depends on before the tests run. |
| 116 | + - name: Simulator diagnostics |
| 117 | + run: | |
| 118 | + echo "--- booted devices (more than one makes 'booted' ambiguous) ---" |
| 119 | + xcrun simctl list devices | grep -i booted || echo "(none)" |
| 120 | +
|
| 121 | + echo "--- app install state on ${SIMULATOR_UDID} ---" |
| 122 | + xcrun simctl get_app_container "$SIMULATOR_UDID" mendixnative.example 2>&1 || \ |
| 123 | + echo "::warning::app container not found on target simulator" |
| 124 | +
|
| 125 | + echo "--- simslim status (skipped when slimming is disabled) ---" |
| 126 | + if [ "${SIMSLIM_ENABLED}" = "true" ] && command -v simslim &> /dev/null; then |
| 127 | + simslim status "$SIMULATOR_UDID" || true |
| 128 | + else |
| 129 | + echo "(slimming disabled)" |
| 130 | + fi |
| 131 | +
|
109 | 132 | # Run tests |
110 | 133 | - name: Run Harness E2E tests |
111 | 134 | working-directory: example |
112 | 135 | run: | |
| 136 | + # An earlier run exceeded Node's default ~2GB old-space limit while the |
| 137 | + # harness retried launches. Raising the ceiling keeps a retry loop from |
| 138 | + # presenting as an OOM instead of the real timeout. |
113 | 139 | export NODE_OPTIONS="--max-old-space-size=6144" |
| 140 | + # Harness debug logging names the resolved simulator, the RCT_jsLocation |
| 141 | + # override, and each Metro request — what identifies a missing bundle request. |
| 142 | + export DEBUG="react-native-harness:*" |
114 | 143 | yarn harness:ios |
| 144 | +
|
| 145 | + # Capture the app's own logs when the run fails: if the app launched but never |
| 146 | + # asked Metro for a bundle, the reason shows up on the simulator side. |
| 147 | + - name: Collect app logs on failure |
| 148 | + if: failure() |
| 149 | + run: | |
| 150 | + xcrun simctl spawn "$SIMULATOR_UDID" log show --last 25m --style compact \ |
| 151 | + --predicate 'process == "MendixNativeExample"' 2>&1 | tail -300 || \ |
| 152 | + echo "(no app logs available)" |
0 commit comments