React Native app crashes without any error log

Narek Malkhasyan picture Narek Malkhasyan · Mar 18, 2018 · Viewed 19.8k times · Source

React Native app crashing without any error log. No output on "react-native log-android" terminal, no red screen with error, Android emulator just crashes. Tried running with Expo, again crashes with no error

Happens when working with TextInput. I have some ideas how I can fix the code, but want to understand why is app crashing without error log and making debugging so much harder?

Answer

B. Kwok picture B. Kwok · Apr 13, 2018

Run adb logcat

You can find your app name in your package.json, under the name field.

Also when looking for errors specifically dealing with react native, try running

adb logcat | grep 'redbox'

This way you don't have to scan the entire logfile.

Or try the method shown in this article. https://medium.com/@taufiq_ibrahim/using-adb-logcat-for-react-native-debugging-38256bda007c