Skip to content

Commit

Permalink
fix: node17 debugger can't attach
Browse files Browse the repository at this point in the history
  • Loading branch information
rigor789 committed Mar 9, 2022
1 parent 1f6816b commit fc84d92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/common/mobile/ios/simulator/ios-emulator-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ class IosEmulatorServices implements Mobile.IiOSSimulatorService {
data: Mobile.IConnectToPortData
): Promise<net.Socket> {
try {
const socket = net.connect(data.port);
// node v17+ resolves localhost to ::1 (ipv6) instead of 127.0.0.1 (ipv4)
// so we explicitly pass ipv4
const socket = net.connect(data.port, "127.0.0.1");
return socket;
} catch (e) {
this.$logger.debug(e);
Expand Down

0 comments on commit fc84d92

Please sign in to comment.