# Fix 'Broken Functionality: App Crashes, Freezes, or Fails to Load During Review'

> Exact Error: `Broken functionality: App crashes, freezes, or fails to load during review`

- **Canonical URL**: https://staging.gootester.com/errors/broken-functionality-pre-launch-crash-rejection

## Step-by-Step Resolution
1. **Download stack traces and video recordings from `Pre-launch report -> Details`**: Open `Test and release -> Testing -> Pre-launch report` in Play Console, inspect every device marked with a crash/ANR, watch the exact Robo video recording up to the crash second, and read the deobfuscated stack trace.
2. **Upload ProGuard/R8 `mapping.txt` and Native Debug Symbols so traces are readable**: Enable `ndk.debugSymbolLevel = "FULL"` in `build.gradle.kts` so `Class.a.b()` obfuscated frames and native `libc` `SIGSEGV` addresses resolve to exact Kotlin/Dart/C++ line numbers.
3. **Reproduce locally from your exact `.aab` using `bundletool build-apks` + `adb logcat -b crash`**: Never debug a release crash using `flutter run` or Android Studio's Debug button! Extract split APKs directly from `app-release.aab` via `bundletool`, install onto a wiped device, and capture `adb logcat -b crash`.
4. **Fix R8 `-keep` rules, null guards, 16 KB NDK r28+ flags, and Play Signing SHA-1 keys**: Add `@Keep` annotations or `proguard-rules.pro` entries for reflected DTOs, add defensive offline/error UI fallbacks with retry buttons (never infinite spinners), and register your Play App Signing SHA-1 in Firebase/GCP.
5. **Validate on physical ARM64 hardware before rolling out the incremented `versionCode`**: Verify cold startup, `0` crashes, `0` ANRs, and healthy RAM/frame budgets via physical-device ADB QA (included separately on GOOtester $12 Standard and $20 Premium campaigns) before submitting for review.

```bash
#!/usr/bin/env bash
set -euo pipefail
AAB_PATH="app/build/outputs/bundle/release/app-release.aab"
APKS_OUT="/tmp/release-test.apks"
PACKAGE_ID="com.example.app"

# 1. Build split APKs matching exact Play Store delivery from the release .aab
bundletool build-apks --bundle="${AAB_PATH}" --output="${APKS_OUT}" --connected-device --overwrite
bundletool install-apks --apks="${APKS_OUT}"

# 2. Clear crash buffer, cold-launch, and exercise Monkey/UI intents
adb logcat -b crash -c
adb shell am start -S -W "${PACKAGE_ID}/.MainActivity"
sleep 5

# 3. Assert zero fatal exceptions in crash ring buffer
CRASH_LINES=$(adb logcat -b crash -d)
if [[ -n "${CRASH_LINES}" ]]; then
  echo "FATAL CRASH DETECTED IN RELEASE BUNDLE:"
  echo "${CRASH_LINES}"
  exit 1
fi
echo "PASS: Release AAB booted cleanly with 0 fatal exceptions."
```

## Why 'It Works on My Emulator' Still Fails Google Play's Broken Functionality Gate

Every week, thousands of solo builders test their app for hours inside an Android Studio `x86_64` debug emulator or Expo Go client, see zero errors, build a release `.aab`, and get hit 48 hours later with `Broken functionality: App crashes, freezes, or fails to load during review`. The disconnect is almost always the gap between a JIT-compiled debug environment and a minified, Play-re-signed ARM64 release split APK.
In release builds, Android Gradle Plugin activates **R8 code shrinking and obfuscation**, stripping any Kotlin data class, Gson model, or Capacitor/Flutter bridge method not statically referenced unless protected by `-keep` rules. Simultaneously, Google Play strips your upload key and re-signs the APK with your **Play App Signing key** — breaking Firebase Auth, Google Maps, or backend Play Integrity checks if you only allowlisted your laptop's debug keystore SHA-1.
Testing your actual `app-release.aab` via `bundletool build-apks --connected-device` catches R8 crashes in three minutes on your desk instead of losing five days in Google Play review.

## Infinite Spinners, Dead Buttons, and AI Wrapper Timeout Crashes

Notice that Google Play's Broken Functionality policy covers three failure modes, not just Java `NullPointerException` stack traces: **crashes**, **freezes (ANRs / infinite loading states)**, and **dead or placeholder UI controls**. Vibe-coded apps and LLM wrappers frequently trigger rejection when an unauthenticated user or offline reviewer device hits a blank white React error boundary or an uncancelable spinner waiting on an unconfigured API endpoint.
Audit every button visible on your navigation bar and settings screen: remove 'Coming Soon' stub buttons before uploading to Play Console, wrap every network call in a 10-to-15-second timeout with a friendly human-readable retry card, and verify your app renders a graceful offline banner when airplane mode is toggled.

## Pairing Pre-Launch Reports with Separate Physical-Device ARM64 ADB QA

Whenever you upload a Closed Testing `.aab`, check `Play Console -> Pre-launch report` within an hour of upload to inspect Firebase Test Lab Robo crawler results across real Pixel, Samsung, and Xiaomi devices — and fix even 'minor' single-device crashes before applying for Production Access.
On GOOtester Standard ($12) and Premium ($20) campaigns, our automated physical-device ARM64 ADB QA pipeline measures cold launch latency (`am start -W`), RAM PSS (`dumpsys meminfo`), UI frame jank (`dumpsys gfxinfo`), and `logcat -b crash` / ANR counts — kept strictly separate from your 15 or 25 consented human testers — so you catch release regressions early and document clean stability in Production Access Question 3.
