[SOLVED] MetroBundler ERROR: HTTP load failed, 0/0 bytes (error code: -1001 [1:60]) && nw_socket_handle_socket_event [C2.1:1] Socket SO_ERROR [61: Connection refused]
See original GitHub issueI really don’t know what cause this error but it’s occurs since yesterday. And it happens suddenly. I’m opening the project, debug on real device with no problem and this errors happens suddenly, even I didn’t anything wrong.
Like I said, it’s happens when I try to debug on real device, works simulator with no problem. Main problem because of internet connection change but it happens even I still connect the same wi-fi. When this error happens Metro Bundler stops to load JS bundle.
I clean & run project on Xcode, reset internet, delete project on device … etc. not working but know what? It suddenly works!
I trying to fix it for 2 days… When this errors happens I tried to start it on fresh project, but no hope. So this error not about project.
It gives not any error on bundler or console. Only on Xcode. It gives these outputs:
2019-10-24 12:30:49.267803+0300 bshMobile[516:84562] Connection 1: received failure notification
2019-10-24 12:30:49.268025+0300 bshMobile[516:84562] Connection 1: failed to connect 1:60, reason -1
2019-10-24 12:30:49.268150+0300 bshMobile[516:84562] Connection 1: encountered error(1:60)
2019-10-24 12:30:49.272681+0300 bshMobile[516:84562] Task <AABA240F-A83D-43E4-BFF6-7294871AB3A4>.<1> HTTP load failed, 0/0 bytes (error code: -1001 [1:60])
2019-10-24 12:30:49.373 [info][tid:main][RCTRootView.m:293] Running application bshMobile ({
initialProps = {
};
rootTag = 1;
})
2019-10-24 12:30:49.433194+0300 bshMobile[516:84563] [] nw_socket_handle_socket_event [C2.1:1] Socket SO_ERROR [61: Connection refused]
2019-10-24 12:30:49.441099+0300 bshMobile[516:84563] [] nw_socket_connect [C2.2:1] connectx(6, [srcif=0, srcaddr=<NULL>, dstaddr=::1.8081], SAE_ASSOCID_ANY, 0, NULL, 0, NULL, SAE_CONNID_ANY) failed: [61: Connection refused]
2019-10-24 12:30:49.441790+0300 bshMobile[516:84563] [] nw_socket_connect [C2.2:1] connectx failed (fd 6) [61: Connection refused]
2019-10-24 12:30:49.450014+0300 bshMobile[516:84563] [] nw_socket_connect connectx failed [61: Connection refused]
2019-10-24 12:30:49.451198+0300 bshMobile[516:84562] [] nw_connection_get_connected_socket [C2] Client called nw_connection_get_connected_socket on unconnected nw_connection
2019-10-24 12:30:49.451270+0300 bshMobile[516:84562] TCP Conn 0x2819c5ec0 Failed : error 0:61 [61]
2019-10-24 12:30:49.466269+0300 bshMobile[516:84563] [] nw_socket_handle_socket_event [C3.1:1] Socket SO_ERROR [61: Connection refused]
2019-10-24 12:30:49.472205+0300 bshMobile[516:84563] [] nw_socket_handle_socket_event [C3.2:1] Socket SO_ERROR [61: Connection refused]
2019-10-24 12:30:49.472656+0300 bshMobile[516:84567] [] nw_connection_get_connected_socket [C3] Client called nw_connection_get_connected_socket on unconnected nw_connection
2019-10-24 12:30:49.472817+0300 bshMobile[516:84567] TCP Conn 0x2819c1140 Failed : error 0:61 [61]
2019-10-24 12:30:49.790593+0300 bshMobile[516:84561] [] nw_socket_handle_socket_event [C4.1:1] Socket SO_ERROR [61: Connection refused]
2019-10-24 12:30:49.791979+0300 bshMobile[516:84561] [] nw_socket_handle_socket_event [C4.2:1] Socket SO_ERROR [61: Connection refused]
2019-10-24 12:30:49.793566+0300 bshMobile[516:84562] [] nw_connection_get_connected_socket [C4] Client called nw_connection_get_connected_socket on unconnected nw_connection
2019-10-24 12:30:49.793644+0300 bshMobile[516:84562] TCP Conn 0x2819c8840 Failed : error 0:61 [61]
2019-10-24 12:30:49.880 [info][tid:com.facebook.react.JavaScript] Running "bshMobile" with {"rootTag":1,"initialProps":{}}
2019-10-24 12:30:50.100822+0300 bshMobile[516:84364] [framework] CoreUI: RunTimeThemeRefForBundleIdentifierAndName() couldn't find Assets.car in bundle with identifier: 'org.reactjs.native.example.bshMobile'
2019-10-24 12:30:50.100971+0300 bshMobile[516:84364] [framework] CoreUI: RunTimeThemeRefForBundleIdentifierAndName() couldn't find Assets.car in bundle with identifier: 'org.reactjs.native.example.bshMobile'
Versions
"react": "16.9.0",
"react-native": "0.61.2"
SOLVED
Probably it happens because of build caches. Looks like cleaning the build cache (Shift + Alt + CMD + K) and re-build the project solving the problem. I’m not sure it’s certainly the solution, but it works for me.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top GitHub Comments
I have received the same error and I am also unsure why it occurs. It is handled for me and results in a “the request timed out” error.
@RevanthM @ninjz
Probably it happens because of build caches. Looks like cleaning the build cache (Shift + Alt + CMD + K) and re-build the project via Xcode solving the problem. I’m not sure it’s certainly the solution, but it works for me.