【问题标题】:React Native App Play Store JavascriptExceptionReact Native App Play Store JavascriptException
【发布时间】:2021-09-28 09:32:47
【问题描述】:

我在 Play 商店中有一个 React Native 应用程序,但在过去一个月中,它在某些设备上崩溃了 1000 次。我从未使用自己的设备或模拟器遇到过这种崩溃。我不确定如何进行调试。

我启用了 Pro Guard 和 Hermes,这是当我转到 Google Play 控制台下的崩溃和 ANR 部分时得到的堆栈跟踪。

com.facebook.react.common.JavascriptException: TypeError: Cannot read property 'setNativeProps' of undefined, js engine: hermes, stack:
anonymous@1:1025689
anonymous@1:502947
value@1:55572
value@1:65672
anonymous@1:64155
value@1:65118
value@1:64113

at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(Unknown Source
  at java.lang.reflect.Method.invoke (Native Method)
  at com.facebook.react.bridge.JavaMethodWrapper.invoke (Unknown Source:147)
  at com.facebook.react.bridge.JavaModuleWrapper.invoke (Unknown Source:21)
  at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (Unknown Source)
  at android.os.Looper.loop (Looper.java:246)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (Unknown Source:37)
  at java.lang.Thread.run (Thread.java:923)

【问题讨论】:

    标签: android reactjs react-native facebook crash


    【解决方案1】:

    我在研究 React Native 文档 https://reactnative.dev/docs/next/symbolication 后发现了这个。

    通过将上述堆栈跟踪复制到 txt 文件中,然后运行命令:npx metro-symbolicate android/app/build/generated/sourcemaps/react/release/index.android.bundle.map < stacktrace.txt,我能够生成更易于阅读的堆栈跟踪。

    【讨论】:

      猜你喜欢
      • 2019-06-11
      • 1970-01-01
      • 1970-01-01
      • 2022-12-17
      • 1970-01-01
      • 2021-09-24
      • 1970-01-01
      • 1970-01-01
      • 2022-10-21
      相关资源
      最近更新 更多