Reactotron: HTTP 204 Responses crash React Native

Created on 21 Aug 2018  路  9Comments  路  Source: infinitered/reactotron

screen shot 2018-08-21 at 3 48 57 pm

Using React Native version 0.54.3 and Reactotron 2.1.0

Whenever we get a HTTP 204 response from our server, our app crashes with the error:

null is not an object (evaluating 'blob.data')
need info question react-native

Most helpful comment

I'm using react-native 0.59.10 and just updated my reactotron-react-native to the latest version (3.6.4 right now) and solved the issue.

All 9 comments

Hmm... I haven't seen that before.

I do know React Native had some blob issues fixed recently.

Are you using a different character encoding by any chance?

Also what's the 2nd frame in that stack? Is that Reactotron?

Closing this for now. @bryansills if you are still encountering this please let us know.

I'm seeing a variation of this. When I put an Android device into Airplane mode, the app crashes with the same exception described here the first time fetch is used. If you dismiss the error screen, the exception reappears. Looking at logs with react-native log-android shows an endless number null is not an object (evaluating 'blob.data') exceptions.

The crash happens for me in both development builds and in release builds. Though, I would expect the release crash not to happen if I weren't using reactotron-redux because, barring that, nothing reactotron related would be imported in those builds.

Some environment information:

react-native: 0.59.2
reactotron-react-native: 3.2.1
reactotron-redux: 3.1.0

Minimal reproduction:

import React, { Component } from 'react'
import { View } from 'react-native'
import Reactotron from 'reactotron-react-native'

// Commenting this out fixes the crash
Reactotron
  .configure({ name: 'CrashityCrashCrash '})
  .useReactNative()
  .connect()

export default class App extends Component {
  componentDidMount() {
    // This triggers the crash
    fetch('https://www.google.com/').catch(console.warn)
  }

  render() {
    return <View style={{flex: 1, backgroundColor: 'red'}} />
  }
}

If you run this on an Android device, close the app, turn airplane mode on, and open it again, you should see the same exception reported by @bryansills.

@thomasw Could you try out this version of reactotron-react-native?

https://github.com/infinitered/reactotron-react-native/releases/tag/v3.2.2-beta.2%40beta

I just tested using rn 0.59.4 and 3.2.2-beta.3 and it does seem to be fixed. Thanks!

I have the same problem tested with 3.2.2

Reopening as I am hearing this issue still exists. I am hoping someone will be able to provide a reproduction case that I can dig into

I know that the next words will sound strange (at least...) but I have to tell you all that I have kind of solved this issue by unminifying reactotron-react-native/dist/index.js.

I was getting a null blob when reradAsText was called. I tried to debug reactotron-react-native but the index.js was minified. So I went to https://unminify.com and unminified the file. I changed the file, reloaded the application and it worked.
I even reproduce the issue again by cleaning my project and solved it in the same way.

Obviously, this is not a fix but a workaround

I'm using react-native 0.59.10 and just updated my reactotron-react-native to the latest version (3.6.4 right now) and solved the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nonameolsson picture nonameolsson  路  5Comments

Eyesonly88 picture Eyesonly88  路  4Comments

itaied246 picture itaied246  路  4Comments

tolu360 picture tolu360  路  5Comments

Ashoat picture Ashoat  路  4Comments