TypeError - null is not an object (evaluating 't.data') [React Native 0.59.5 Android]

浪尽此生 提交于 2019-12-08 10:54:02

问题


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)

Following is the stack reported in Sentry dashboard.

When I check BREADCRUMBS, I see the following.

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: I tried to simulate errors return from API with 404 and 400 codes. The crash is not this format.


回答1:


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');
}


来源:https://stackoverflow.com/questions/56426641/typeerror-null-is-not-an-object-evaluating-t-data-react-native-0-59-5-and

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!