10

React Native 0.61

I'm trying to figure out where I broke something in XCode or in my iPhone. A couple of days ago everything worked fine - I pressed Run -> Build was successful -> and everything works via wifi (hot reload).

But today when I press Run - Build is successful but it is not launching an app. After repeated Run, an app is launching but without connection to metro builder.

I tried to use the same combination in the other office. There everything works fine.

An app on any android device is launching perfect and connecting to metro builder. All emulators (including via XCode) is working fine. Same WiFi.

Output in XCode:

2020-01-30 01:20:57.299821+0200 TestApp[417:22121] Task <6DD1500D-484C-4290-9543-30284F360671>.<1> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x280250060 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=http://192.168.1.70:8081/status, NSErrorFailingURLKey=http://192.168.1.70:8081/status, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}

2020-01-30 01:20:57.337180+0200 TestApp[417:22123] Task <6DD1500D-484C-4290-9543-30284F360671>.<1> HTTP load failed, 0/0 bytes (error code: -999 [1:89])

2020-01-30 01:20:57.367 [info][tid:main][RCTRootView.m:293] Running application TestApp ({
    initialProps =     {
    };
    rootTag = 1;
})

2020-01-30 01:20:57.428562+0200 TestApp[417:22122] [] nw_socket_handle_socket_event [C2.1:1] Socket SO_ERROR [61: Connection refused]

2020-01-30 01:20:57.429765+0200 TestApp[417:22122] [] nw_socket_handle_socket_event [C2.2:1] Socket SO_ERROR [61: Connection refused]

2020-01-30 01:20:57.430440+0200 TestApp[417:22121] [] nw_connection_get_connected_socket [C2] Client called nw_connection_get_connected_socket on unconnected nw_connection

2020-01-30 01:20:57.430482+0200 TestApp[417:22121] TCP Conn 0x283904f00 Failed : error 0:61 [61]

2020-01-30 01:20:57.434875+0200 TestApp[417:22121] [] nw_socket_handle_socket_event [C3.1:1] Socket SO_ERROR [61: Connection refused]

2020-01-30 01:20:57.435620+0200 TestApp[417:22121] [] nw_socket_handle_socket_event [C3.2:1] Socket SO_ERROR [61: Connection refused]

2020-01-30 01:20:57.435873+0200 TestApp[417:22122] [] nw_connection_get_connected_socket [C3] Client called nw_connection_get_connected_socket on unconnected nw_connection

2020-01-30 01:20:57.435906+0200 TestApp[417:22122] TCP Conn 0x283906100 Failed : error 0:61 [61]

2020-01-30 01:20:57.572 [warn][tid:com.facebook.react.JavaScript] Warning: AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/async-storage' instead of 'react-native'. See https://github.com/react-native-community/react-native-async-storage

2020-01-30 01:20:57.634403+0200 TestApp[417:22123] [] nw_socket_handle_socket_event [C4.1:1] Socket SO_ERROR [61: Connection refused]

2020-01-30 01:20:57.634990+0200 TestApp[417:22123] [] nw_socket_handle_socket_event [C4.2:1] Socket SO_ERROR [61: Connection refused]

2020-01-30 01:20:57.635253+0200 TestApp[417:22121] [] nw_connection_get_connected_socket [C4] Client called nw_connection_get_connected_socket on unconnected nw_connection

2020-01-30 01:20:57.635296+0200 TestApp[417:22121] TCP Conn 0x283910180 Failed : error 0:61 [61]

2020-01-30 01:20:57.780 [info][tid:com.facebook.react.JavaScript] Running "TestApp" with {"rootTag":1,"initialProps":{}}

2020-01-30 01:20:57.912 [info][tid:com.facebook.react.WebSocketModuleQueue][RCTSRWebSocket.m:518] SocketRocket: In debug mode.  Allowing connection to any root cert

I even tried to test with just a new project - react-native init, where I've got the same issue.

Where should I check?

Max Kalik
  • 473
  • 6
  • 15
  • It's also happening with me in Android, and the Reason is I installed a wrong node module , I uninstalled it and then app works fine. Check your node modules once. – Anuj Sharma Jan 30 '20 at 02:24
  • Try again after quitting the running metro bundler and uninstall the existing app @Max – Harish Singh Jan 30 '20 at 09:59
  • I tried all these options. It doesn't work. – Max Kalik Jan 30 '20 at 10:00
  • Hey have you found out the solution? as I am having same problem. and internet is no help. – Kiran Ashraf Feb 05 '20 at 15:42
  • @user3243481 Hey. Still trying to found out. Definitely it something happened inside of xCode – Max Kalik Feb 06 '20 at 07:45
  • I can confirm it's definitely something related to Xcode. I can even run in an iOS simulator just fine, but that's not exactly helpful when I need to test BLE code. JS code runs fine on Android and the bit that can run in the iOS sim works fine so it's not a syntax issue – Goigle Feb 10 '21 at 01:02
  • I just created a clean 0.63.4 project, this issue still happened and only for physical iOS devices. Android works on phys / emulator and iOS works on the simulator but not phys device. There's an open issue on github: https://github.com/facebook/react-native/issues/29396 – Goigle Feb 10 '21 at 02:06

1 Answers1

-1

Go to XCode and check build logs. It might be some syntax issue in your JS.

Adi
  • 158
  • 1
  • 6
  • Even when I tried just react-native init? I don't think so.. I noted: "I even tried to test with just a new project - react-native init, where I've got the same issue." – Max Kalik Feb 07 '20 at 11:49
  • What are the steps to `check build logs`? – ksav Jan 27 '21 at 05:45