repack
repack copied to clipboard
Connection Refused [ios]
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' }
Facing same issue on Tester App.
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]
It seems to work only with the --host [ip]
parameter.
I hope that helps you @namdao
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.
I have try again, and I missing set env with hmr = true in webpack.config.mjs
. It's work.
Thanks
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,
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.
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
.