React native - connection doesn't matter connection handler error?

I created a new responsive project, and when I launch it on iOS from xcode, the console gives me the following:

2017-05-19 23:25:34.119 [info][tid:main][RCTBatchedBridge.m:77] Initializing <RCTBatchedBridge: 0x6100001a6c80> (parent: <RCTBridge: 0x6100000c46e0>, executor: RCTJSCExecutor) 2017-05-19 23:25:51.287 [info][tid:main][RCTRootView.m:295] Running application test ({ initialProps = { }; rootTag = 1; }) 2017-05-19 23:25:51.289 [info][tid:com.facebook.react.JavaScript] Running application "test" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF 2017-05-19 23:25:51.299771-0400 test[21948:1121429] [] nw_connection_get_connected_socket_block_invoke 3 Connection has no connected handler 2017-05-19 23:25:53.335282-0400 test[21948:1121426] [] nw_connection_get_connected_socket_block_invoke 4 Connection has no connected handler 2017-05-19 23:25:55.349190-0400 test[21948:1120112] [] nw_connection_get_connected_socket_block_invoke 5 Connection has no connected handler 

What does it mean 2017-05-19 23:25:51.299771-0400 test[21948:1121429] [] nw_connection_get_connected_socket_block_invoke 3 Connection has no connected handler these lines and how can I solve the problem?

I first noticed this when I tried using fetch in my application and found that it was not working. I found these messages in the console and later discovered that these messages are happening to all my applications, so I assume this is a configuration problem on my part?

I created a new test program to check what caused this, and found that this was happening in a completely new project. Below my code is that the output of the log above is generated:

 /** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; export default class test extends Component { render() { return ( <View style={styles.container}> <Text style={styles.welcome}> Welcome to React Native! </Text> <Text style={styles.instructions}> To get started, edit index.ios.js </Text> <Text style={styles.instructions}> Press Cmd+R to reload,{'\n'} Cmd+D or shake for dev menu </Text> </View> ); } } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, welcome: { fontSize: 20, textAlign: 'center', margin: 10, }, instructions: { textAlign: 'center', color: '#333333', marginBottom: 5, }, }); AppRegistry.registerComponent('test', () => test); 
+32
ios react-native connection
source share
7 answers

Try below process

Xcode Menu โ†’ Product โ†’ Change Schema ...

Environment Variables โ†’ Add โ†’ Name: "OS_ACTIVITY_MODE", Value: Disable

Launch the application again.

+38
source share

I figured out the solution:

Disable Verbose for OS Activity Mode

  1. In the xcode menu, Project โ†’ Schema โ†’ Edit Schema.
  2. Then select " Run on the left, and then select the" Arguments "tab on the right.
  3. In the Environment Variables add the name OS_ACTIVITY_MODE and the value as disable .

Or see the picture below.

enter image description here

Note: Image credit goes to Ramkrishna Sharma.

+13
source share

This error is most likely due to the websocket built into native-native to connect to response-devtools. If you do not use response-devtools during debugging, you will get this error and also throw a bunch of messages across the bridge complaining about the inability to open the website (you will only see these errors if you use something like rn-snoopy ).

The error will be terminated as soon as you install and open action-devtools. For instructions, see the following instructions: https://github.com/facebook/react-devtools/blob/master/packages/react-devtools/README.md

+9
source share

To disable websocket streams, I did the following:

  • in xcode: Libraries / React.xcodeproj / React / Inspector / RCTInspectorPackagerConnection.m: find - (void)connect { and add return; only after that.

  • in node_modules / reaction-native / Libraries / Core / Devtools / setupDevtools.js: replace if (__DEV__) with if (false)

this is pretty ugly, but much better than the OS_ACTIVITY solution, as it does not hide or prevent any other debugging tools.

+2
source share

In my case, this was due to the use of a firewall (Little Snitch), which never requests access when starting from the application responsible for the reaction. The steps that work for me are:

  • Open the Safari browser in the simulator
  • Visit google.com or any domain
  • Make sure it opens the page. He will request access, etc.
  • Reload the application in the simulator
  • Restarting react-native log-ios

This should help.

0
source share

I had the same problem and the launch of my application was significantly delayed due to this problem. The actual fix for me is described in detail here , but I will rewrite it if the link is broken:

  1. Open xcode
  2. Click Product on the top bar.
  3. Click Scheme , scroll down to Edit Scheme
  4. Choose Run in the left pane, Info in the top tab
  5. Change Build Configuration from Debug to Release

Now the application not only no longer contains errors, but also starts much faster. Other โ€œfixesโ€ only hide the error.

0
source share

The above solutions did not work with testing on real ios devices, so I'm sharing my solution. This is very strange, and I donโ€™t know why I need to do this, but when I turned on debug j remote , it started working.

0
source share

All Articles