App Crashes on TestFlight but Works in Simulator (Expo React Native App)

Hi,

I’m experiencing an issue where my React Native (Expo) app crashes immediately in TestFlight after launching, but it works fine in Expo Go and the iOS Simulator. This is my first time building an IOS app, so I'm not sure where I'm going wrong.

Are there known issues with JS bundle loading, native module compatibility, or API entitlements that could be causing this? What tools or logs should I use to track the exact source of failure? Any guidance would be greatly appreciated! Thank you.

Steps Taken:

The app runs fine in Expo Go (npx expo start --no-dev --minify) and in the iOS Simulator (npx expo run:ios --clean). I also did (npx expo-doctor) and it passed all 15 checks. After building with EAS (eas build --platform ios --profile production), the TestFlight build crashes on launch.

I checked Xcode logs (Devices & Simulators > View Device Logs) and found this error:

`Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: SIGNAL 6 Abort trap: 6 Terminating Process: LoungeNavigator [4666]

Triggered by Thread: 6 Thread 6 name: Thread 6 Crashed:

Thread 6 crashed with ARM Thread State (64-bit): x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000

My app.json file:

  "expo": {
    "name": "appname",
    "slug": "app",
    "owner": "baint",
    "version": "0.5.2",
    "orientation": "portrait",
    "icon": "./assets/images/IOS-App-Icon.png",
    "scheme": "myapp",
    "userInterfaceStyle": "automatic",
    "newArchEnabled": true,
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "bundleIdentifier",
      "icon": "./assets/images/IOS-App-Icon.png",
      "buildNumber": "7",
      "infoPlist": {
        "NSLocationAlwaysAndWhenInUseUsageDescription": "This app requires access to your location at all times.",
        "NSLocationAlwaysUsageDescription": "This app needs your location even when the app is in the background.",
        "NSLocationWhenInUseUsageDescription": "We need your location.",
        "ITSAppUsesNonExemptEncryption": false
      }
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/images/IOS-App-Icon.png",
        "backgroundColor": "#ffffff"
      },
      "package": "identifier"
    },
    "web": {
      "bundler": "metro",
      "output": "static",
      "favicon": "./assets/images/favicon.png"
    },
    "plugins": [
      "expo-router",
      [
        "expo-splash-screen",
        {
          "image": "./assets/images/IOS-App-Icon.png",
          "imageWidth": 200,
          "resizeMode": "contain",
          "backgroundColor": "#ffffff"
        }
      ],
      "expo-asset",
      [
        "@rnmapbox/maps",
        {
          "RNMapboxMapsImpl": "mapbox",
          "ios": {
            "RNMapboxMapsDownloadToken": "token",
            "RNMapboxMapsAccessToken": "token",
            "NSLocationAlwaysAndWhenInUseUsageDescription": "This app requires access to your location at all times.",
            "NSLocationAlwaysUsageDescription": "This app needs your location even when the app is in the background.",
            "NSLocationWhenInUseUsageDescription": "We need your location."
          }
        }
      ],
      [
        "expo-build-properties",
        {
          "ios": {
            "useFrameworks": "static",
            "useModularHeaders": true
          }
        }
      ]
    ],
    "experiments": {
      "typedRoutes": true
    },
    "extra": {
      "router": {
        "origin": false
      },
      "eas": {
        "projectId": "projectid"
      }
    }
  }
}

My eas.json file:


  "cli": {
    "version": ">= 14.7.1",
    "appVersionSource": "remote"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "distribution": "internal"
    },
    "internal": {
      "distribution": "store",
      "ios": {
        "credentialsSource": "remote"
      }, 
      "autoIncrement": true,
      "env": {
        "EXPO_PUBLIC_NODE_ENV": "production"
      }
    },
    "production": {
      "autoIncrement": true, 
      "distribution": "store",
      "env": {
        "EXPO_PUBLIC_NODE_ENV": "production"
      }
    }
  },
  "submit": {
    "production": {
      "ios": {
        "ascAppId": "ascAppId",
        "appleId": "appleId",
        "ascApiKeyPath": "ascApiKeyPath"
      }
    }
  }
  
}

There are limits to how much I can help you with third-party tooling, but I’m happy to look at a crash report and genera advice based on that. Please post an example crash report, using the instructions in Posting a Crash Report.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi, here's my crash report. Thanks.

Thread 6 Crashed:
0   libsystem_kernel.dylib        	0x00000001f3f832d4 __pthread_kill + 8 (:-1)
1   libsystem_pthread.dylib       	0x000000022d5d959c pthread_kill + 268 (pthread.c:1721)
2   libsystem_c.dylib             	0x00000001aa698b08 abort + 128 (abort.c:122)
3   libc++abi.dylib               	0x000000022d4ff5b8 abort_message + 132 (abort_message.cpp:78)
4   libc++abi.dylib               	0x000000022d4edb90 demangling_terminate_handler() + 320 (cxa_default_handlers.cpp:72)
5   libobjc.A.dylib               	0x000000019fdc72d4 _objc_terminate() + 172 (objc-exception.mm:499)
6   libc++abi.dylib               	0x000000022d4fe87c std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59)
7   libc++abi.dylib               	0x000000022d4fe820 std::terminate() + 108 (cxa_handlers.cpp:88)
8   libdispatch.dylib             	0x00000001aa5defbc _dispatch_client_callout + 40 (object.m:579)
9   libdispatch.dylib             	0x00000001aa5e65cc _dispatch_lane_serial_drain + 768 (queue.c:3934)
10  libdispatch.dylib             	0x00000001aa5e7124 _dispatch_lane_invoke + 380 (queue.c:4025)
11  libdispatch.dylib             	0x00000001aa5f238c _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:7193)
12  libdispatch.dylib             	0x00000001aa5f1bd8 _dispatch_workloop_worker_thread + 540 (queue.c:6787)
13  libsystem_pthread.dylib       	0x000000022d5d4680 _pthread_wqthread + 288 (pthread.c:2696)
14  libsystem_pthread.dylib       	0x000000022d5d2474 start_wqthread + 8 (:-1)

Thread 6 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0xffffffffffffd7ba   x5: 0x000000000000001a   x6: 0x0000000000000058   x7: 0x0000000000003fff
    x8: 0x5279bdcbe9c144a8   x9: 0x5279bdca866b34a8  x10: 0x000000000000007f  x11: 0x0000000000000900
   x12: 0x00000000000007fb  x13: 0x00000000000007fd  x14: 0x00000000ec414813  x15: 0x00000000ec2147fb
   x16: 0x0000000000000148  x17: 0x000000016faa7000  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000003603  x21: 0x000000016faa70e0  x22: 0x0000000000000000  x23: 0x0000000000000114
   x24: 0x00000003010b1de8  x25: 0x0000000000000000  x26: 0x000000016faa70e0  x27: 0x0000000302be2640
   x28: 0x0000000302be25c0   fp: 0x000000016faa6770   lr: 0x000000022d5d959c
    sp: 0x000000016faa6750   pc: 0x00000001f3f832d4 cpsr: 0x40001000
   esr: 0x56000080  Address size fault

Hmmm, the crash report your attached says:

Triggered by Thread:  6

but doesn’t include the backtrace for thread 6 (just threads 0 and 13). Did you edit that crash report somehow?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

App Crashes on TestFlight but Works in Simulator (Expo React Native App)
 
 
Q