Expo managed app crashing on start in TestFlight

Please provide the following:

  1. SDK Version: 41.0.1
  2. Platforms(Android/iOS/web/all): iOS
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

I am lost in trying to find the cause of immediate crash in my app in TestFlight. Runs fine on iOS device in Expo Go, as well as iOS simulators. Viewing the crash log is of no help to me as I have no idea what I am looking at. Could someone please help me with this issue. It is a managed app built and submitted via EAS.

Here is the crash log… (some of it anyway)

Incident Identifier: 94D8F06F-476D-41AE-AA80-B0782EFB345C
Hardware Model:      iPhone12,1
Process:             id [30641]
Path:                /private/var/containers/Bundle/Application/A5FD0B86-41FD-4EDA-9580-B2955A57E474/id.app/id
Identifier:          imagine.city.app.ios.id
Version:             1 (1.0.5)
AppStoreTools:       12E506
AppVariant:          1:iPhone12,1:14
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           imagine.city.app.ios.id [10092]


Date/Time:           2021-07-14 00:02:59.8188 -0700
Launch Time:         2021-07-14 00:02:59.7600 -0700
OS Version:          iPhone OS 14.2 (18B92)
Release Type:        User
Baseband Version:    2.02.04
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Last Exception Backtrace:
0   CoreFoundation                	0x1a7ce4878 __exceptionPreprocess + 220 (NSException.m:199)
1   libobjc.A.dylib               	0x1bc23ac50 objc_exception_throw + 60 (objc-exception.mm:565)
2   CoreFoundation                	0x1a7beb95c -[NSObject(NSObject) doesNotRecognizeSelector:] + 144 (NSObject.m:146)
3   CoreFoundation                	0x1a7ce7444 ___forwarding___ + 1444 (NSForwarding.m:3597)
4   CoreFoundation                	0x1a7ce9740 _CF_forwarding_prep_0 + 96
5   UIKitCore                     	0x1aa6ba19c -[UIApplication _checkBackgroundRefreshAPIAdoption] + 184 (UIApplication.m:13705)
6   UIKitCore                     	0x1aa695f38 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1040 (UIApplication.m:4172)
7   UIKitCore                     	0x1a9ced910 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 152 (_UISceneLifecycleMultiplexer.m:436)
8   UIKitCore                     	0x1aa25b404 _UIScenePerformActionsWithLifecycleActionMask + 112 (_UISceneLifecycleState.m:109)
9   UIKitCore                     	0x1a9cee4a8 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 224 (_UISceneLifecycleMultiplexer.m:549)
10  UIKitCore                     	0x1a9cedeb0 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 300 (_UISceneLifecycleMultiplexer.m:498)
11  UIKitCore                     	0x1a9cee2b8 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 768 (_UISceneLifecycleMultiplexer.m:548)
12  UIKitCore                     	0x1a9cedaf4 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 340 (_UISceneLifecycleMultiplexer.m:454)
13  UIKitCore                     	0x1a9cf6040 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block... + 196 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:72)
14  UIKitCore                     	0x1aa168030 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 892 (BSAnimationSettings+UIKit.m:50)
15  UIKitCore                     	0x1aa273b2c _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 272 (_UISceneSettingsDiffAction.m:23)
16  UIKitCore                     	0x1a9cf5d38 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 384 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:57)
17  UIKitCore                     	0x1a9b1dbb4 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 776 (UIScene.m:1413)
18  UIKitCore                     	0x1a9b1c528 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 256 (UIScene.m:1134)
19  UIKitCore                     	0x1a9b1d7dc -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 248 (UIScene.m:1380)
20  UIKitCore                     	0x1aa6941a4 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 572 (UIApplication.m:3694)
21  UIKitCore                     	0x1aa19185c -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 388 (UIApplicationSceneClientAgent.m:45)
22  FrontBoardServices            	0x1b6fed47c -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 432 (FBSScene.m:435)
23  FrontBoardServices            	0x1b7018dc4 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.200 + 128 (FBSWorkspaceScenesClient.m:365)
24  FrontBoardServices            	0x1b6ffc560 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:355)
25  FrontBoardServices            	0x1b7018a88 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 372 (FBSWorkspaceScenesClient.m:364)
26  libdispatch.dylib             	0x1a78d8db0 _dispatch_client_callout + 20 (object.m:559)
27  libdispatch.dylib             	0x1a78dc738 _dispatch_block_invoke_direct + 268 (queue.c:468)
28  FrontBoardServices            	0x1b7041310 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:184)
29  FrontBoardServices            	0x1b7040fa0 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 448 (FBSSerialQueue.m:227)
30  FrontBoardServices            	0x1b70414f4 -[FBSSerialQueue _performNextFromRunLoopSource] + 32 (FBSSerialQueue.m:258)
31  CoreFoundation                	0x1a7c6076c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1967)
32  CoreFoundation                	0x1a7c60668 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2011)
33  CoreFoundation                	0x1a7c5f960 __CFRunLoopDoSources0 + 268 (CFRunLoop.c:2048)
34  CoreFoundation                	0x1a7c59a8c __CFRunLoopRun + 824 (CFRunLoop.c:2925)
35  CoreFoundation                	0x1a7c5921c CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242)
36  GraphicsServices              	0x1becd8784 GSEventRunModal + 164 (GSEvent.c:2259)
37  UIKitCore                     	0x1aa692200 -[UIApplication _run] + 1072 (UIApplication.m:3266)
38  UIKitCore                     	0x1aa697a74 UIApplicationMain + 168 (UIApplication.m:4738)
39  id                            	0x104324b5c main + 88 (main.m:7)
40  libdyld.dylib                 	0x1a79196c0 start + 4

Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001d4be3414 __pthread_kill + 8
1   libsystem_pthread.dylib       	0x00000001f10fbb40 pthread_kill + 272 (pthread.c:1388)
2   libsystem_c.dylib             	0x00000001b1008b74 abort + 104 (abort.c:110)
3   libc++abi.dylib               	0x00000001bc340cf8 abort_message + 132 (abort_message.cpp:76)
4   libc++abi.dylib               	0x00000001bc331e4c demangling_terminate_handler() + 308 (cxa_default_handlers.cpp:67)
5   libobjc.A.dylib               	0x00000001bc23af64 _objc_terminate() + 144 (objc-exception.mm:701)
6   libc++abi.dylib               	0x00000001bc3400e0 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
7   libc++abi.dylib               	0x00000001bc34006c std::terminate() + 44 (cxa_handlers.cpp:88)
8   libdispatch.dylib             	0x00000001a78d8dc4 _dispatch_client_callout + 40 (object.m:562)
9   libdispatch.dylib             	0x00000001a78dc738 _dispatch_block_invoke_direct + 268 (queue.c:468)
10  FrontBoardServices            	0x00000001b7041310 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:184)
11  FrontBoardServices            	0x00000001b7040fa0 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 448 (FBSSerialQueue.m:227)
12  FrontBoardServices            	0x00000001b70414f4 -[FBSSerialQueue _performNextFromRunLoopSource] + 32 (FBSSerialQueue.m:258)
13  CoreFoundation                	0x00000001a7c6076c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1967)
14  CoreFoundation                	0x00000001a7c60668 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2011)
15  CoreFoundation                	0x00000001a7c5f960 __CFRunLoopDoSources0 + 268 (CFRunLoop.c:2048)
16  CoreFoundation                	0x00000001a7c59a8c __CFRunLoopRun + 824 (CFRunLoop.c:2925)
17  CoreFoundation                	0x00000001a7c5921c CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242)
18  GraphicsServices              	0x00000001becd8784 GSEventRunModal + 164 (GSEvent.c:2259)
19  UIKitCore                     	0x00000001aa692200 -[UIApplication _run] + 1072 (UIApplication.m:3266)
20  UIKitCore                     	0x00000001aa697a74 UIApplicationMain + 168 (UIApplication.m:4738)
21  id                            	0x0000000104324b5c main + 88 (main.m:7)
22  libdyld.dylib                 	0x00000001a79196c0 start + 4

Thread 1:
0   libsystem_pthread.dylib       	0x00000001f1103754 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib       	0x00000001f1103754 start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib       	0x00000001f1103754 start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib       	0x00000001f1103754 start_wqthread + 0

Thread 5 name:
Thread 5:
0   libsystem_kernel.dylib        	0x00000001d4bbf2d0 mach_msg_trap + 8
1   libsystem_kernel.dylib        	0x00000001d4bbe660 mach_msg + 76 (mach_msg.c:103)
2   CoreFoundation                	0x00000001a7c5fc30 __CFRunLoopServiceMachPort + 380 (CFRunLoop.c:2641)
3   CoreFoundation                	0x00000001a7c59c14 __CFRunLoopRun + 1216 (CFRunLoop.c:2974)
4   CoreFoundation                	0x00000001a7c5921c CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242)
5   Foundation                    	0x00000001a8f05df0 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232 (NSRunLoop.m:374)
6   Foundation                    	0x00000001a8f05cbc -[NSRunLoop(NSRunLoop) runUntilDate:] + 92 (NSRunLoop.m:421)
7   UIKitCore                     	0x00000001aa745fe4 -[UIEventFetcher threadMain] + 516 (UIEventFetcher.m:836)
8   Foundation                    	0x00000001a9077a34 __NSThread__start__ + 864 (NSThread.m:724)
9   libsystem_pthread.dylib       	0x00000001f10fab40 _pthread_start + 320 (pthread.c:881)
10  libsystem_pthread.dylib       	0x00000001f1103768 thread_start + 8

Thread 6:
0   libsystem_pthread.dylib       	0x00000001f1103754 start_wqthread + 0

Thread 7:
0   libsystem_pthread.dylib       	0x00000001f1103754 start_wqthread + 0

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x000000016badde60   x5: 0x000000016bade410   x6: 0x000000000000006e   x7: 0x0000000000000600
    x8: 0x00000000000005b9   x9: 0x20e349bcf37bcc3a  x10: 0x0000000000000002  x11: 0x0000000000000003
   x12: 0x0000000000000000  x13: 0x0000000000000001  x14: 0x0000000000000010  x15: 0x0000000000000005
   x16: 0x0000000000000148  x17: 0x0000000104b578c0  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000000407  x21: 0x0000000104b579a0  x22: 0x0000000000000000  x23: 0x0000000104b579a0
   x24: 0x00000001fd70f000  x25: 0x0000000000000000  x26: 0x000000016badec60  x27: 0x0000000207464000
   x28: 0x00000001fd70f000   fp: 0x000000016bade370   lr: 0x00000001f10fbb40
    sp: 0x000000016bade350   pc: 0x00000001d4be3414 cpsr: 0x40000000
   esr: 0x56000080  Address size fault

I will provide any other information necessary requested.

Apps can crash for a lot of different reasons, the best way to investigate is either through looking at the logs through the Console app during the crash (if you have a mac), or narrowing down the code that’s causing the crash by taking out pieces of your app until you’ve isolated the bad code.

here’s a guide on debugging production errors, and here’s a guide to manual debugging

Thank your for the reply. I took your advice and piece by piece removed code and did a EAS build (ad-hoc) over and over. The only progress made was instead of instantly crashing, I get splash screen for up to 5 seconds before crash. This makes no sense to me because i literally can’t remove any more code. Here is what i’m down to:

import * as React from "react";
import { View, Text } from "react-native";

const App = () => {
  return (
    <View
      style={{
        height: "100%",
        width: "100%",
        justifyContent: "center",
        alignItems: "center",
      }}
    >
      <Text>debug</Text>
    </View>
  );
};

export default App;

And here is some lines from console messages from iPhone used:

error	18:25:44.303677-0700	SpringBoard	[application<imagine.city.app.ios.id>:31556] Provision violated for watchdog scene-create: <FBSProcessResourceProvision: 0x283da2c00; allowance: <; FBSProcessResourceAllowance; type: realTime; timeValue: 19.97s>; violated: YES>
error	18:25:44.342559-0700	runningboardd	RBSStateCapture remove item called for untracked item <RBProcessMonitorObserver| qos:0 qos:(null) configs:{
	}>
error	18:25:44.345412-0700	SpringBoard	Unable to get short BSD proc info for 31556: No such process
error	18:25:44.358578-0700	SpringBoard	Unable to get short BSD proc info for 31556: No such process
error	18:25:44.378263-0700	SpringBoard	Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
error	18:25:44.410439-0700	SpringBoard	Error creating the CFMessagePort needed to communicate with PPT.
error	18:25:44.412956-0700	SpringBoard	HW kbd: Failed to set keyboard focus pid:0 ((null)) scene:(null)
error	18:25:44.413023-0700	SpringBoard	HW kbd: Failed to set keyboard focus pid:0 ((null)) scene:(null)
error	18:25:44.434747-0700	runningboardd	RBSStateCapture remove item called for untracked item 13731-13758-443559 (target:[application<imagine.city.app.ios.id>:31556](UIScene:com.apple.frontboard.systemappservices::sceneID%3Aimagine.city.app.ios.id-default))

Package.json (I have not gone through and removed unused dependencies):

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@babel/preset-env": "^7.12.17",
    "@babel/preset-react": "^7.13.13",
    "@expo-google-fonts/annie-use-your-telescope": "^0.1.0",
    "@expo-google-fonts/inter": "^0.1.0",
    "@react-native-async-storage/async-storage": "^1.15.5",
    "@react-native-community/masked-view": "0.1.10",
    "@react-native-community/netinfo": "^6.0.0",
    "@react-navigation/bottom-tabs": "^5.11.11",
    "@react-navigation/drawer": "^5.12.5",
    "@react-navigation/material-bottom-tabs": "^5.3.15",
    "@react-navigation/native": "^5.9.4",
    "@react-navigation/stack": "^5.14.5",
    "@stripe/stripe-react-native": "0.1.1",
    "amazon-cognito-identity-js": "^5.0.3",
    "aws-amplify": "^4.1.0",
    "aws-amplify-react-native": "^5.0.2",
    "aws-sdk": "^2.932.0",
    "expo": "~41.0.1",
    "expo-app-loading": "^1.0.3",
    "expo-application": "~3.1.2",
    "expo-constants": "~10.1.3",
    "expo-device": "~3.2.0",
    "expo-font": "~9.1.0",
    "expo-notifications": "^0.11.6",
    "expo-splash-screen": "^0.10.2",
    "expo-status-bar": "~1.0.4",
    "expo-updates": "~0.5.4",
    "html-entities": "^2.3.2",
    "react": "16.13.1",
    "react-icons": "^4.2.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
    "react-native-confetti-cannon": "^1.5.2",
    "react-native-elements": "^3.4.1",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-mask-text": "^0.1.5",
    "react-native-paper": "^4.9.1",
    "react-native-reanimated": "~2.1.0",
    "react-native-safe-area-context": "^3.2.0",
    "react-native-screens": "~3.0.0",
    "react-native-vector-icons": "^8.1.0",
    "react-native-webview": "^11.6.5",
    "sentry-expo": "^3.1.0"
  },
  "devDependencies": {
    "@babel/core": "^7.9.0",
    "@babel/plugin-proposal-class-properties": "^7.12.13",
    "@babel/preset-typescript": "^7.12.17",
    "@babel/register": "^7.13.16",
    "@types/react": "~16.9.35",
    "@types/react-native": "~0.63.2",
    "ts-node": "^10.0.0",
    "typescript": "~4.0.0"
  },
  "private": true
}

App.json:

{
  "expo": {
    "name": "imagine-city-app",
    "slug": "imagine-city-app",
    "version": "1.0.5",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/imagine_app_splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "icon": "./assets/icon.png",
      "supportsTablet": false,
      "bundleIdentifier": "imagine.city.app.ios.id",
      "infoPlist": {
        "NSLocationAlwaysUsageDescription": "location not currently used. Future updated may include location use for new features.",
        "NSLocationWhenInUseUsageDescription": "location not currently used. Future updated may include location use for new features.",
        "NSCameraUsageDescription": "camera not currently used. Future updated may include camera use for new features such as user submitted photos/videos."
      }
    },
    "android": {
      "versionCode": 5,
      "icon": "./assets/icon.png",
      "googleServicesFile": "./google-services.json",
      "adaptiveIcon": {
        "foregroundImage": "./assets/playstore-icon.png",
        "backgroundColor": "#FFFFFF"
      },
      "package": "imagine.city.app.android.id"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "hooks": {
      "postPublish": [
        {
          "file": "sentry-expo/upload-sourcemaps",
          "config": {
            "organization": ( I removed this ),
            "project":( I removed this ),
            "authToken": ( I removed this )
          }
        }
      ]
    },
    "plugins": [
      [
        "@stripe/stripe-react-native",
        {
          "merchantIdentifier": ( I removed this ),
          "enableGooglePay": false
        }
      ],
      [
        "expo-notifications",
        {
          "icon": "./assets/icon.png",
          "color": "#ffffff",
          "sounds": [
            "./assets/kid-laugh.wav"
          ],
          "mode": "production"
        }
      ],
      "sentry-expo"
    ]
  }
}

What am I doing wrong?

Sorry, but I can’t say what you’re doing wrong just by hearing that the app is crashing.

However, those logs don’t look related- if your app is crashing there’s almost definitely a “fatal exception” or “fatal " or " exception” somewhere in the logs. If you expo init a brand new project and build it and install on the same device, I’m guessing it does not crash?

I have created a brand new expo app via expo init. I added ZERO code of my own, and did a EAS ad-hoc build for my device and still crash.

Can you do a simulator build? That way I can install it on my end and search through the logs

I am currently building a simulator build for the new bare app, as well as my current app and will provide the links when builds are done.

Here are the simulator build links:

New expo app

My app

the first simulator build you linked does not crash on startup for me, it works fine. Tested on iOS 12.4 iphone X simulator

Second one crashes and if you search the logs for “exception” as I suggested, you will find:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x6000017adaa0'

your app is making some sort of call on startup that is causing this crash. You can debug further by running it locally with expo run:ios

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.