question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RCTNetworking - didReceiveNetworkIncrementalData error w/ RN 0.31

See original GitHub issue

Greetings,

I am getting redbox using NetInfo on RN 0.31. I do not get this error when I downgrade to RN 0.30. I am using code very similar to the NetInfo example in the RN documentation to check connectivity status. Let me know if you need any additional details.

image

Here’s the code I am using to check connectivity status:

NetInfo.isConnected.addEventListener(
      'change',
      this.handleConnectivityChange.bind(this)
    );

handleConnectivityChange(isConnected) {
    switch (isConnected) {
    case true:
      this.setState({
        connectivity: true
      });
      break;
    case false: 
      this.setState({
        connectivity: false
      });
      break;
    }
  }

componentWillUnmount() {
    NetInfo.isConnected.removeEventListener(
      'change',
      this.handleConnectivityChange.bind(this)
    );

System info

  • OSX 10.11.3
  • RN 0.31
  • iOS 9.3, running on simulator and device

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
Richard-Caocommented, Aug 6, 2016

if you use react-native run-ios report this error.

try use Xcode to run.

0reactions
lackercommented, Dec 15, 2016

It seems like a number of people have found these workarounds valid so I am going to close this issue. Thanks folks for reporting this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native update to 0.31.0 RCTNetwork error - Stack Overflow
I update react-native to 0.31.0, redbox as follow: enter image description here. After remove the fetch method in my project, the error box ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found