We were unable to review your app as it crashed on launch

Expo app is working fine on iOS real device so I built IPA and submitted to App store. They replied with “We were unable to review your app as it crashed on launch”. I went through the logs that they provided but couldn’t really extract much info about the reason of the crash. Attached is the logfile.

{"app_name":"ComRaziSnsfitness","timestamp":"2020-08-18 09:13:18.00 -0700","app_version":"1.0.0","slice_uuid":"b77b98be-bc0d-36dd-a1ca-ac6b97fd3e4c","adam_id":1527827259,"build_version":"2.0.0","bundleID":"com.razi.snsfitness","share_with_app_devs":0,"is_first_party":0,"bug_type":"109","os_version":"iPhone OS 13.5.1 (17F80)","incident_id":"9EF13627-A0E0-449C-A9AA-53682CA68DFB","name":"ComRaziSnsfitness"}
Incident Identifier: 9EF13627-A0E0-449C-A9AA-53682CA68DFB
CrashReporter Key:   be5bf217cd77f22a30cac60daf16aa15a9f6d2bc
Hardware Model:      xxx
Process:             ComRaziSnsfitness [6503]
Path:                /private/var/containers/Bundle/Application/BDF3BD1C-C04F-40B9-81A1-008E9847755F/ExpoKitApp.app/ComRaziSnsfitness
Identifier:          com.razi.snsfitness
Version:             2.0.0 (1.0.0)
AppStoreTools:       11E707
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.razi.snsfitness [2154]


Date/Time:           2020-08-18 09:13:18.1344 -0700
Launch Time:         2020-08-18 09:13:17.5412 -0700
OS Version:          iPhone OS 13.5.1 (17F80)
Release Type:        User
Baseband Version:    n/a
Report Version:      104

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

Last Exception Backtrace:
(0x1bda6f794 0x1bd791bcc 0x100fd2084 0x100ff129c 0x1bd735524 0x1bd6e8180 0x1bd735524 0x1bd6e75b4 0x1bd9ed7fc 0x1bd9e86d0 0x1bd9e7ce8 0x1c7b3238c 0x1c1b16444 0x100e09358 0x1bd86f8f0)

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001bd864d88 0x1bd83f000 + 155016
1   libsystem_pthread.dylib       	0x00000001bd77d1e8 0x1bd77b000 + 8680
2   libsystem_c.dylib             	0x00000001bd6d09b0 0x1bd65e000 + 469424
3   libsystem_c.dylib             	0x00000001bd6d0940 0x1bd65e000 + 469312
4   libc++abi.dylib               	0x00000001bd838cc0 0x1bd826000 + 76992
5   libc++abi.dylib               	0x00000001bd82ae10 0x1bd826000 + 19984
6   libobjc.A.dylib               	0x00000001bd791e80 0x1bd78c000 + 24192
7   libc++abi.dylib               	0x00000001bd83814c 0x1bd826000 + 74060
8   libc++abi.dylib               	0x00000001bd8380e4 0x1bd826000 + 73956
9   libdispatch.dylib             	0x00000001bd735538 0x1bd6da000 + 374072
10  libdispatch.dylib             	0x00000001bd6e8180 0x1bd6da000 + 57728
11  libdispatch.dylib             	0x00000001bd735524 0x1bd6da000 + 374052
12  libdispatch.dylib             	0x00000001bd6e75b4 0x1bd6da000 + 54708
13  CoreFoundation                	0x00000001bd9ed7fc 0x1bd945000 + 690172
14  CoreFoundation                	0x00000001bd9e86d0 0x1bd945000 + 669392
15  CoreFoundation                	0x00000001bd9e7ce8 0x1bd945000 + 666856
16  GraphicsServices              	0x00000001c7b3238c 0x1c7b2f000 + 13196
17  UIKitCore                     	0x00000001c1b16444 0x1c10e8000 + 10675268
18  ComRaziSnsfitness             	0x0000000100e09358 0x100e04000 + 21336
19  libdyld.dylib                 	0x00000001bd86f8f0 0x1bd86e000 + 6384
.........

I tried running this command inside a folder containing ExpoKitApp.app and crash_report.crash :

atos -arch arm64 -o ExpoKitApp.app/ComRaziSnsfitness 0x1bda6f794

but it just printed out 0x1bda6f794 back to me.

My app.js is trying to make use of expo push notifications and I believe the error has something to do with that. Attaching my app.js as well.

import AppContainer from “./src/navigations/AppNavigation”;

import * as Notifications from “expo-notifications”;

import Constants from “expo-constants”;

import * as Permissions from “expo-permissions”;

import React from “react”;

import * as firebase from “firebase”;

// Initialize Firebase

var firebaseConfig = {

apiKey: “my_key”,

authDomain: “domain”,

databaseURL: “DB”,

projectId: “ID”,

storageBucket: “bucket”,

messagingSenderId: “id”,

appId: “id”,

measurementId: “G-JYNKX65MGK”,

};

if (!firebase.apps.length) {

firebase.initializeApp(firebaseConfig);

}

Notifications.setNotificationHandler({

handleNotification: async () => ({

shouldShowAlert: true,

shouldPlaySound: true,

shouldSetBadge: true,

}),

});

const rootRef = firebase.database().ref(“expoTokens/” + Constants.deviceId);

export default class App extends React.Component {

componentDidMount() {

this.registerForPushNotificationsAsync().then((token) => {

  if (typeof token === "undefined" || token == null) return;

  try {

    rootRef.set(token);

  } catch (error) {

    alert(error);

  }

});

Notifications.addNotificationReceivedListener(this._handleNotification);

Notifications.addNotificationResponseReceivedListener(

  this._handleNotificationResponse

);

}

_handleNotification = (notification) => {

this.setState({ notification: notification });

this.props.navigation.navigate("Notices");

};

_handleNotificationResponse = (response) => {

this.props.navigation.navigate("Notices");

};

async registerForPushNotificationsAsync() {

let token;

if (Constants.isDevice) {

  const { status: existingStatus } = await Permissions.getAsync(

    Permissions.NOTIFICATIONS

  );

  let finalStatus = existingStatus;

  console.log(finalStatus);

  if (existingStatus !== "granted") {

    const { status } = await Permissions.askAsync(

      Permissions.NOTIFICATIONS

    );

    finalStatus = status;

  }

  if (finalStatus !== "granted") {

    alert("You won't receive any notifications about the SnS Fitness");

    return;

  }

  token = (await Notifications.getExpoPushTokenAsync()).data;

} else {

  alert("Must use physical device for Push Notifications");

}

if (Platform.OS === "android") {

  Notifications.setNotificationChannelAsync("default", {

    name: "default",

    importance: Notifications.AndroidImportance.MAX,

    vibrationPattern: [0, 250, 250, 250],

    lightColor: "#FF231F7C",

  });

}

return token;

}

render() {

return <AppContainer />;

}

}

I thought the issue was with push-notifications so I removed that code and built again but it still got rejected with the same message.
I have been stuck here for a week now. Any help is appreciated

hi there, i’d recommend checking out Debugging - Expo Documentation for more tips on how to debug

[Solved] I tried everything from debugging to removing parts of code and adding sentry but nothing worked.
Finally I figured out the problem, the app is developed on windows platform and ipa is generated using macos. The node_modules were messing the app. I had to copy the windows node_modules into macos and boom it worked.

:flushed:

I’m glad you got it working.

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