Skip to content

Commit fc84d92

Browse files
committed
fix: node17 debugger can't attach
1 parent 1f6816b commit fc84d92

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/common/mobile/ios/simulator/ios-emulator-services.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ class IosEmulatorServices implements Mobile.IiOSSimulatorService {
6666
data: Mobile.IConnectToPortData
6767
): Promise<net.Socket> {
6868
try {
69-
const socket = net.connect(data.port);
69+
// node v17+ resolves localhost to ::1 (ipv6) instead of 127.0.0.1 (ipv4)
70+
// so we explicitly pass ipv4
71+
const socket = net.connect(data.port, "127.0.0.1");
7072
return socket;
7173
} catch (e) {
7274
this.$logger.debug(e);

0 commit comments

Comments
 (0)