gpt4 book ai didi

android - 带有firebase crashlytics的hermes bundle的react-native源图

转载 作者:行者123 更新时间:2023-12-04 23:48:28 27 4
gpt4 key购买 nike

我想从 react-native 应用程序读取 crashlytics 报告,但在 firebase 控制台中根本不可读。来自 Android 的示例崩溃如下所示:

Non-fatal Exception: io.invertase.firebase.crashlytics.UnhandledPromiseRejection
Invalid RegExp pattern: Parenthesized expression not closed
.RegExp ((native):0:0)
.anonymous (address at index.android.bundle:1:2065589)
.ue (address at index.android.bundle:1:2070284)
.ce (address at index.android.bundle:1:2069288)
.Be (address at index.android.bundle:1:2080135)
我启用了爱马仕,并且我签名的构建 apk 生成 index.android.bundle带有源映射文件 build/generated/assets/react/appName/release/index.android.bundle 的预编译格式 ( build/sourcemaps/react/appName/release/index.android.bundle.map) .我尝试使用 npm 包 source-map-explorer 读取这些文件但不幸的是它总是产生以下错误:
source-map-explorer index.android.bundle index.android.bundle.map 
index.android.bundle
Your source map refers to generated column 165922 on line 1, but the source only contains 165920 column(s) on that line.
Check that you are using the correct source map.
  • 我可以将源映射上传到 firebase 以使错误在 firebase 控制台中可读吗?
  • 如何使用 sourcemap 读取 hermes bundle 文件?
  • 最佳答案

    你只需要使用

    npx metro-symbolicate android/app/build/generated/sourcemaps/react/release/index.android.bundle.map < stacktrace.txt
    将您的堆栈跟踪放在 stacktrack.txt 中。 (删除 0:0 使其工作)
    欲了解更多信息,请访问 https://reactnative.dev/docs/next/symbolication

    关于android - 带有firebase crashlytics的hermes bundle的react-native源图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67835466/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com