TypeError - null 不是对象(评估“t.data")[React Native 0.59.5 Android] [英] TypeError - null is not an object (evaluating 't.data') [React Native 0.59.5 Android]

查看:64
本文介绍了TypeError - null 不是对象(评估“t.data")[React Native 0.59.5 Android]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将我的 React Native 应用程序更新到 0.59.5 后,我看到有几个人在 Android 用户的随机位置崩溃(iOS 用户没问题).我正在使用 Sentry 来跟踪崩溃的位置,错误显示:

After updating my React Native application to 0.59.5, I am seeing several people are crashing in random places for Android users (iOS users are fine). I am using Sentry to track the crash places and the error says:

TypeError readAsText(react-native/Libraries/Blob/FileReader)

以下是 Sentry 仪表板中报告的堆栈.

Following is the stack reported in Sentry dashboard.

当我检查 BREADCRUMBS 时,我看到以下内容.

When I check BREADCRUMBS, I see the following.

我使用 fetch 进行 HTTP 调用.有没有人遇到过这个问题?我们的 API 恢复正常.这个问题发生在随机的地方.是否有任何情况触发了这个问题?我一整天都在使用我的应用程序,但它尚未崩溃.因此,如果有人之前遇到过这个问题并提出任何解决方案,我将不胜感激.

I am using fetch for HTTP calls. Has anyone faced this problem before? Our API is returning fine. The issue is happening in random places. Is there any situation that triggered this problem? I am using my app the whole day and it is not crashing on me yet. So, if anyone faced this problem before and suggest any solution, I would appreciate a lot.

PS:我尝试使用 404 和 400 代码模拟从 API 返回的错误.崩溃不是这种格式.

PS: I tried to simulate errors return from API with 404 and 400 codes. The crash is not this format.

推荐答案

实际上,您为什么需要 Reactotron 进行生产?最好仅将其用于开发.那么你就不会有这个问题了:

Actually why do you need reactotron for production? Better use that only for develop. Then you won't have this issue:

if (__DEV__) {
  import('./ReactotronConfig');
}

这篇关于TypeError - null 不是对象(评估“t.data")[React Native 0.59.5 Android]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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