Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS crash in testFlight on open

When running the app in test fight it crashes upon opening. The app runs well if tested directly in the simulator or on the device.

I did clean, archive and upload the app again and there was no difference. The Valid Architecture is set only to arm64

This is the error in the console

Attempt to add an app with insufficient id, info {
BKSApplicationStateAppIsFrontmost = 1;
BKSApplicationStateExtensionKey = 0;
SBApplicationStateDisplayIDKey = "org.mydomain.name";
SBApplicationStateKey = 8;
SBApplicationStateProcessIDKey = 677;
SBMostElevatedStateForProcessID = 8;
}

The app is build in react-native

React Native Environment Info:

System:
  OS: macOS High Sierra 10.13.6
  CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  Memory: 3.59 GB / 16.00 GB
  Shell: 3.2.57 - /bin/bash
Binaries:
  Node: 8.9.3 - /usr/local/bin/node
  npm: 6.1.0 - /usr/local/bin/npm
  Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
  iOS SDK:
    Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
  Android SDK:
    Build Tools: 23.0.1, 25.0.2, 25.0.3, 26.0.2, 27.0.3
    API Levels: 16, 19, 22, 23, 25, 26, 27
IDEs:
  Android Studio: 3.0 AI-171.4443003
  Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
  react: 16.3.1 => 16.3.1
  react-native: ^0.56.0 => 0.56.0
npmGlobalPackages:
  create-react-native-app: 1.0.0
  react-native-cli: 2.0.1
  react-native-rename: 2.2.2

I have fallowed the guid for release from here https://facebook.github.io/react-native/docs/running-on-device

Any thoughts on how to fix this?

like image 218
Cristian Tr Avatar asked Sep 27 '18 22:09

Cristian Tr


People also ask

Why is my app crashing right when I open it iOS?

Most often, apps crash because they aren't updated and have unaddressed bugs. To fix this, go to the Updates section of the App Store and update the app if an update is available.

Why does my app keep crashing when I try to open it?

If your Android apps keep crashing or freezing it's usually because you're low on space or running too many apps at once. Other reasons for crashing apps include a spotty Wi-Fi connection or an old version of the app that hasn't been updated.


2 Answers

That could be signature or bitcode problem. First, you can regenerate your certificate and provisioning profile, create new build and upload it to TestFlight again. Then, if that didn't work, you can disable bitcode in project setting and create new build. The thing is when bitcode is ON TestFlight rebuilds apps before distribution.

like image 136
shpasta Avatar answered Oct 05 '22 23:10

shpasta


It turns the crash was because of a framework '@rpath/XCTest.framework/XCTest' not being loaded, and the errors I got in the console were misleading.

I was able to see the reason after submitting the app for beta review and getting back the crashlogs.

To fix this I deleted the derivedData folder and added XCTest framework in Liked Frameworks as optional. dyld: Library not loaded: @rpath/XCTest.framework/XCTest

like image 33
Cristian Tr Avatar answered Oct 06 '22 01:10

Cristian Tr