Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging app crashes in react native

Tags:

I'm new to react native, and I'm trying to install the react native Facebook SDK so that I can do Facebook login with my app.

I followed the steps listed here: https://tylermcginnis.com/installing-the-facebook-sdk-into-a-react-native-android-and-ios-app/

The problem is that when I run react-native run-android, the app crashes immediately. How do I debug this crash? I don't know where to look for crash logs. Running react-native log-android doesn't show me anything useful.

Edit:

I know that this a Java issue rather than a JS issue. How can I find Java crash logs?

like image 689
Joseph Fakelastname Avatar asked Mar 26 '17 23:03

Joseph Fakelastname


People also ask

How do I handle an app crash in react native?

Enable or disable App Center Crashes at runtime If you disable it, the SDK won't do any crash reporting for the app. await Crashes. setEnabled(false); To enable App Center Crashes again, use the same API but pass true as a parameter.

What is Flipper react native?

What is Flipper? Flipper is a highly extensible mobile app debugger used to debug iOS, Android and React Native applications. It lets you inspect, control, and visualize your application from its desktop application.

How do I disable debug in react native?

If you are using on MS : ctrl + m , MAC OS : cmd + m , iPhone/android: shake your device then look for the "disable Remote Debug JS" and click it. Show activity on this post. Go to your android settings and clear app data and cache and reload the app remote debugging will be turned off.


1 Answers

To see Java logs, open AndroidStudio, and click on AndroidMonitor at the bottom of the screen.

I was able to see the crash stack trace. My problem is that I need to set a valid facebook app id in AndroidManifest.

like image 158
Joseph Fakelastname Avatar answered Sep 20 '22 10:09

Joseph Fakelastname