From 8fc6f4776beac126ec088fa673d64c04daedab4d Mon Sep 17 00:00:00 2001 From: Siddarth Kumar Date: Fri, 26 Apr 2024 14:34:04 +0200 Subject: [PATCH] fix store nodes not being found on iOS (#19798) https://github.com/status-im/status-go/compare/90b18d4f...b124e2b4 fixes #19736 Corresponding go PR https://github.com/status-im/status-go/pull/5093 This commit fixes DNS resolution inside status-go by forcing pure go resolver at build time. Reference -> https://pkg.go.dev/net#hdr-Name_Resolution Store nodes must be available on Android & iOS app. - Android - iOS status: ready --- nix/status-go/library/default.nix | 6 ++++++ nix/status-go/mobile/build.nix | 7 ++++++- status-go-version.json | 6 +++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/nix/status-go/library/default.nix b/nix/status-go/library/default.nix index f974c2e5a5..5fa833f923 100644 --- a/nix/status-go/library/default.nix +++ b/nix/status-go/library/default.nix @@ -11,6 +11,12 @@ buildGoPackage { phases = ["unpackPhase" "configurePhase" "buildPhase"]; + # https://pkg.go.dev/net#hdr-Name_Resolution + # https://github.com/status-im/status-mobile/issues/19736 + # https://github.com/status-im/status-mobile/issues/19581 + # TODO: try removing when go is upgraded to 1.22 + GODEBUG = "netdns=cgo+2"; + preBuild = '' pushd go/src/$goPackagePath go run cmd/library/*.go > $NIX_BUILD_TOP/main.go diff --git a/nix/status-go/mobile/build.nix b/nix/status-go/mobile/build.nix index d9b1c2317b..dc1c9a8853 100644 --- a/nix/status-go/mobile/build.nix +++ b/nix/status-go/mobile/build.nix @@ -38,10 +38,15 @@ in buildGoPackage { # Ensure XCode is present for iOS, instead of failing at the end of the build. preConfigure = optionalString isIOS enforceXCodeAvailable; + # https://pkg.go.dev/net#hdr-Name_Resolution + # https://github.com/status-im/status-mobile/issues/19736 + # https://github.com/status-im/status-mobile/issues/19581 + # TODO: try removing when go is upgraded to 1.22 + GODEBUG = "netdns=cgo+2"; + buildPhase = '' runHook preBuild echo -e "\nBuilding $pname for: ${concatStringsSep "," targets}" - gomobile bind \ ${concatStringsSep " " goBuildFlags} \ -ldflags="$ldflags" \ diff --git a/status-go-version.json b/status-go-version.json index ed0864e80f..b1d6244057 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "v0.179.10", - "commit-sha1": "90b18d4f8801b09f68bb5b794a5b6af92001d26e", - "src-sha256": "0dlrnpr7wj9z2ywm90avgdzdr9wg71dy82v5jjc9wmiz537mn7wy" + "version": "v0.179.11", + "commit-sha1": "b124e2b4f27a2aa41ffebb1ccf385475c5e87781", + "src-sha256": "142988smak33gmz0zd21ifkn2kajh9di858hrfffbk0xsxbv59rm" }