我想要从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)
我已启用Hermes并且使用签名版本的构建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捆绑文件?