问题
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