repack icon indicating copy to clipboard operation
repack copied to clipboard

Connection Refused [ios]

Open Kida007 opened this issue 2 years ago • 1 comments

Environment

Platform: ios "@callstack/repack":"next", "react-native": "0.66.2",

Description

after successful bundling to 100% , ios throws a runtime error:

2022-08-09 01:55:07.494364+0530 MyApp[87087:3112490] [connection] nw_socket_handle_socket_event [C5.1:1] Socket SO_ERROR [61: Connection refused]
2022-08-09 01:55:07.495782+0530 MyApp[87087:3112490] [connection] nw_socket_handle_socket_event [C5.2:1] Socket SO_ERROR [61: Connection refused]
2022-08-09 01:55:07.499188+0530 MyApp[87087:3112508] [connection] nw_connection_get_connected_socket [C5] Client called nw_connection_get_connected_socket on unconnected nw_connection
2022-08-09 01:55:07.499855+0530 MyApp [87087:3112508] TCP Conn 0x6000007dca50 Failed : error 0:61 [61]
2022-08-09 01:55:07.540148+0530 MyApp [87087:3112510] [javascript] '[HMRClient] Connecting...', { url: 'ws://localhost:8081/__hmr?platform=ios' }

Kida007 avatar Aug 08 '22 20:08 Kida007

Facing same issue on Tester App.

Kida007 avatar Aug 09 '22 11:08 Kida007

the same issue with example project "Module federation". Any update @RafikiTiki .

2023-01-31 13:54:00.099228+0700 host[51868:3212564] [connection] nw_socket_handle_socket_event [C11.1:1] Socket SO_ERROR [61: Connection refused]
2023-01-31 13:54:00.100760+0700 host[51868:3212564] [connection] nw_socket_handle_socket_event [C11.2:1] Socket SO_ERROR [61: Connection refused]
2023-01-31 13:54:00.101358+0700 host[51868:3212566] [connection] nw_connection_get_connected_socket [C11] Client called nw_connection_get_connected_socket on unconnected nw_connection
2023-01-31 13:54:00.101475+0700 host[51868:3212566] TCP Conn 0x600001888000 Failed : error 0:61 [61]
2023-01-31 13:54:02.115605+0700 host[51868:3212563] [connection] nw_socket_handle_socket_event [C12.1:1] Socket SO_ERROR [61: Connection refused]
2023-01-31 13:54:02.117472+0700 host[51868:3212563] [connection] nw_socket_handle_socket_event [C12.2:1] Socket SO_ERROR [61: Connection refused]
2023-01-31 13:54:02.118219+0700 host[51868:3212566] [connection] nw_connection_get_connected_socket [C12] Client called nw_connection_get_connected_socket on unconnected nw_connection
2023-01-31 13:54:02.118381+0700 host[51868:3212566] TCP Conn 0x60000188c160 Failed : error 0:61 [61]
2023-01-31 13:54:12.206628+0700 host[51868:3212563] [connection] nw_socket_handle_socket_event [C13.1:1] Socket SO_ERROR [61: Connection refused]

namdao avatar Jan 31 '23 07:01 namdao

It seems to work only with the --host [ip] parameter. I hope that helps you @namdao

khadorkin avatar Jan 31 '23 10:01 khadorkin

hi @khadorkin , you mean I go to command react-native web-start --host 127.0.0.1 and run Xcode again? Unfortunately, It's not working.

namdao avatar Jan 31 '23 15:01 namdao

I have try again, and I missing set env with hmr = true in webpack.config.mjs. It's work. Thanks

namdao avatar Jan 31 '23 15:01 namdao

Hi @namdao i have been stuck in here. I can't connect to the local dev server. Can you share your webpack.config.mjs?

NSLocalizedDescription=Could not connect to the server., NSErrorFailingURLStringKey=http://localhost:9004/app1.container.bundle?platform=ios,

huytd2510 avatar Oct 24 '23 17:10 huytd2510

This issue has been marked as stale because it has been inactive for 30 days. Please update this issue or it will be automatically closed in 14 days.

github-actions[bot] avatar Feb 23 '24 00:02 github-actions[bot]

Hey all, sorry for the late response on this issue.

This is all most likely due to Re.Pack dev-server listening on IPv6 by default only, we've fixed this in https://github.com/callstack/repack/pull/465 and this will be published in 4.0 release of Re.Pack.

jbroma avatar Feb 29 '24 14:02 jbroma