Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

React Native app crashes on launch in iOS simulator with assertion failed: 18G95 16G73

$
0
0

When running my React Native app (0.61.2) through the terminal or XCode, it will crash on launch after bundle has fully loaded. The only clue is from react-native log-ios to get a glimpse of why it's crashing.

<Error>: assertion failed: 18G95 16G73: libxpc.dylib + 80528 [5846A329-63C0-3B4F-BC91-F30AF4CA6E30]: 0x7d
Unknown[5116] <Error>:

The most XCode gives me before the crash of the app on launch is:

2019-10-29 17:33:41.028898+0800 my_app[6277:117010] [AppCenterCrashes] WARNING: -[MSCrashes configureCrashReporterWithUncaughtExceptionHandlerEnabled:]/656 Detecting crashes is NOT enabled due to running the app with a debugger attached.
2019-10-29 17:33:41.035744+0800 my_app[6277:117010] [AppCenter] WARNING: -[MSAuthTokenContext authTokenHistory]/210 Failed to retrieve history state or none was found.
2019-10-29 17:33:41.035901+0800 my_app[6277:117010] [AppCenter] WARNING: -[MSAuthTokenContext setAuthTokenHistory:]/225 Failed to save new history state.

In the terminal, it is simply being started with react-native run-ios. This is an ejected app.

This works in the Android emulator, but it crashes on iOS. To be clear, creating a build for deployment works as well with this exact codebase (we utilize App Center for building and deployment). Only difference is the node version is 8 on App Center whereas locally it's 12.

What I've tried so far is:

  1. Removing node_modules and pods folder completely

  2. Clearing haste cache with rm -rf /tmp/haste-map-react-native-package-*

  3. Reset metro bundler cache rm -rf /tmp/metro-bundler-cache-*

System setup is as follows:

System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
    Memory: 40.67 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.6.0 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5692245
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.2 => 0.61.2 
  npmGlobalPackages:
    react-native-cli: 2.0.1

To note, another React Native project albeit at version 0.60 has no issues running in the same simulator in XCode.

Expected output

The app should run without crashing in the iOS simulator when running the command react-native run-ios. At the very least the crash should have an identifiable stacktrace but right now I can't even obtain that.

Are there any other steps I can try to further identify where the issue originates from?

If there is a way to to enable Debug JS Remotely before even starting the app to maybe capture a glimpse of the issue in the debugger would also be a great help but this does not seem to be possible.


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>