firebase - react native 堆栈跟踪

标签 firebase react-native stack-trace

我有 React Native App与 Firebase Crashlytics 相关联。
问题是 firebase 发送不可读的堆栈跟踪,如下所示。有任何方法可以读取这种错误。

我只想知道什么时候抛出错误。

这是我的堆栈跟踪

Fatal Exception: com.facebook.react.common.JavascriptException: Invariant Violation: Invariant Violation: Invariant Violation: inputRange must be monotonically non-decreasing 0,-1

This error is located at: in n in RCTView in t in t in Connect(t) in t in RCTView in RCTView in RCTView in n in r in t in n in RCTView in RCTView in t in t in RCTView in t in n in n in r in n in t in RCTView in AndroidDrawerLayout in DrawerLayoutAndroid in t in n in n in e in t in Connect(t) in n in Unknown in RCTView in RCTView in t

This error is located at: in n in t in RCTView in AndroidDrawerLayout in DrawerLayoutAndroid in t in n in n in e in t in Connect(t) in n in Unknown in RCTView in RCTView in t

This error is located at: in n in e in t in Connect(t) in n in Unknown in RCTView in RCTView in t, stack: v@178:1977 p@178:269 e@178:2406 value@188:720 _renderIndicator@718:1582 value@718:5454 qn@106:40634 tr@106:46334 Nr@106:56528 Ur@106:56960 ui@106:61804 oi@106:61224 Ue@106:68050 Ie@106:14248 We@106:14421 receiveTouches@106:15235 value@18:3352 @18:935 value@18:2621 value@18:907

   at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
   at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
   at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
   at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
   at android.os.Handler.handleCallback(Handler.java:808)
   at android.os.Handler.dispatchMessage(Handler.java:101)
   at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
   at android.os.Looper.loop(Looper.java:166)
   at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
   at java.lang.Thread.run(Thread.java:784)

最佳答案

这叫混淆,你的意思符号 替换为无意义的,以减少生产中的文件大小。通常,当您构建应用程序时,它会生成反混淆文件(通常采用 .dSYM 文件的形式),可用于 象征你的应用程序。

获取 .dSYM 因您使用的平台而异,但 firebase has a handy guide that should be able to further help in this specific case.

出于文档目的,我将对本答案中提供的步骤进行硬编码。

IOS

Open your project in Xcode, and select the project file in the Xcode Navigator.

Select your main build target from the Select a project or target dropdown.

Open the target's Build Settings tab.

Click All near the top of the tab.

Search for "debug information format".

Set Debug Information Format to DWARF with dSYM File.

安卓

To preserve the info Crashlytics needs for readable crash reports, add the following lines to your Proguard or Dexguard config file:


-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception

关于firebase - react native 堆栈跟踪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53012370/

相关文章:

ios - Firebase crashlytics 不自动上传 dysm

swift - 尝试更改个人资料照片时应用程序崩溃

react-native - 在 React Native 中播放音频的库

objective-c - 是什么导致我的 iPad 应用程序出现此 EXC_CRASH?

c# - StackTrace/StackFrame 不返回生产环境中的预期信息

c++ - 是否可以从 ELF Core 文件中删除堆?

firebase - 获取按值排序的 Firebase 数据

firebase - Flutter firestore 快照始终为 null 或空列表

react-native - 如何在 react-native-element 中获得这种搜索栏样式?

javascript - React Navigation header onPress - this.setState 不是一个函数