Many React Native devs don't know how to get relevant log or crash information for creating issues in open source libs, so here's some tips for y'all! 💡
First; There's multiple types of crashes.
1. In JS there's mostly just Errors which have a message and a stacktrace. Those are easy and can be thrown and caught. The stacktrace shows you where the error originated from (function names file names and even line numbers!)
2. On Android, you'll get Java Exceptions, which are pretty similar to JS-errors, they also have stacktraces (often looks like com.mrousavy..camera.CameraView)
3. On iOS, you'll get NSExceptions (often looks like *** NSInvalidArgumentException: something) which have a code, domain and optionally a user info, but no stacktrace.
4. On both iOS and Android you might also get C segfaults (eg "SIGABRT") which are coming from a LLVM-based language like C or C++. They are not handle-able and crash the app because the code tried to do something which is not possible (eg tried accessing memory which already has been deleted).
👉 For JS and Java errors, always post the stacktrace.
👉 For NSExceptions, always post the exception name (NSInvalidArgumentException), code (helps googling), and domain/message.
👉 For segfaults (eg SIGABRT), run the app in Xcode/Android Studio with a debugger attached (Xcode; just run, Android Studio; press the 🐞 icon), and when the app goes into a segfault you can see a stack trace on the left side of the screen. You can even interactively step through this to see where it is coming from, often you just need to step a few methods back to find the caller.
Also, native logs are needed for more info.
They are not in Flipper or React Dev Tools, they are inside Xcode (bottom logs tab) or Android Studio (logcat window).
Paste them along with your crash info to give more information.