在com.facebook.react.bridge.NoSuchKeyException中反应本机Android错误 [英] React Native Android error in com.facebook.react.bridge.NoSuchKeyException

查看:316
本文介绍了在com.facebook.react.bridge.NoSuchKeyException中反应本机Android错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Crashlytics中发现了一个错误,几乎在45%的用户中都发生了该错误,但似乎并没有在用户使用该应用但在后台运行时发生.

I'm getting an error caught by Crashlytics and it's happening to almost 45% of the users but it doesn't seem to happen when the user is using the app but when it's in the background.

Crashlytics上显示的堆栈跟踪为:

The stacktrace shown on Crashlytics is:

致命异常:com.facebook.react.bridge.NoSuchKeyException ReadableNativeMap.java:124电话号码

如果是Javascript错误或本机库错误,我不知道是什么原因导致了此问题

I have no clue what can be causing this issue, if it's a Javascript error or a native library error

推荐答案

这是 stacktrace-parser 库引起的nofollow noreferrer>问题由react native在内部使用.基本上,版本0.1.4可以正常工作,而版本0.1.5和0.1.6会导致lineNumber错误.

This is a problem caused by the stacktrace-parser library which is used internally by react native. Basically, release 0.1.4 works fine while releases 0.1.5 and 0.1.6 causes the lineNumber error.

请执行以下操作来解决此问题:

Do the following to fix this:

  1. 如果您使用的是纱线,请将以下内容添加到package.json中:
  1. If you are using yarn add the following to your package.json:

  "resolutions": {
    "stacktrace-parser": "0.1.4"
  },

如果您使用的是 npm ,则将以下内容添加到package.json中:

if you are using npm add the following to your package.json:

"dependencies": {
    ...
    "stacktrace-parser": "0.1.4"

  1. 删除yarn.lock(或package-lock.json)文件和node_modules目录.
  2. 安装软件包 yarn install (或 npm install )
  3. 重建发布版本.

我希望这对其他人有帮助,直到修复该库为止.

I hope this helps others until the library gets fixed.

这篇关于在com.facebook.react.bridge.NoSuchKeyException中反应本机Android错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆