From 7bcde59a1dff9ee2188653f7c6e191737bc44ba9 Mon Sep 17 00:00:00 2001 From: zachspartofaday <234074810+zachspartofaday@users.noreply.github.com> Date: Fri, 2 Oct 2026 12:22:27 -0400 Subject: [PATCH] fix(shared): install the T3 Connect relay client on Windows ARM64 Cloudflare publishes no Windows ARM64 cloudflared, so win32-arm64 had no managed release asset and T3 Connect reported the relay as unsupported. Map win32-arm64 to the pinned x64 Windows asset, which Windows 11 on ARM runs under emulation. Fixes #14836 --- packages/shared/src/relayClient.test.ts | 38 +++++++++++++++++++++++++ packages/shared/src/relayClient.ts | 14 +++++---- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/packages/shared/src/relayClient.test.ts b/packages/shared/src/relayClient.test.ts index 404d765ba74c..398f445b1bf6 100644 --- a/packages/shared/src/relayClient.test.ts +++ b/packages/shared/src/relayClient.test.ts @@ -203,6 +203,44 @@ describe("RelayClient", () => { ), ); + it.effect("downloads the pinned x64 Windows asset on Windows ARM64", () => { + const requestedUrls: Array = []; + return Effect.gen(function* () { + const fileSystem = yield* FileSystem.FileSystem; + const baseDir = yield* fileSystem.makeTempDirectoryScoped({ + prefix: "t3-cloudflared-test-", + }); + const manager = yield* makeCloudflaredRelayClient({ baseDir }); + + expect(yield* manager.resolve).toEqual({ status: "missing", version: CLOUDFLARED_VERSION }); + const error = yield* manager.install.pipe(Effect.flip); + expect(requestedUrls).toEqual([ + `https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARED_VERSION}/cloudflared-windows-amd64.exe`, + ]); + expect(error.reason).toBe("invalid_checksum"); + }).pipe( + Effect.scoped, + Effect.provide( + Layer.mergeAll( + NodeServices.layer, + Layer.succeed( + HttpClient.HttpClient, + HttpClient.make((request) => + Effect.sync(() => { + requestedUrls.push(request.url); + return HttpClientResponse.fromWeb(request, new Response(new Uint8Array())); + }), + ), + ), + makeSpawnerLayer([]), + Layer.succeed(HostProcessPlatform, "win32"), + Layer.succeed(HostProcessArchitecture, "arm64"), + ConfigProvider.layer(ConfigProvider.fromEnv({ env: { PATH: "" } })), + ), + ), + ); + }); + it.effect.skipIf(windowsHost)("serializes concurrent installs within one runtime", () => { const commands: Array = []; const bytes = new TextEncoder().encode("test-cloudflared-binary"); diff --git a/packages/shared/src/relayClient.ts b/packages/shared/src/relayClient.ts index 4d1ce988086d..0845081b9808 100644 --- a/packages/shared/src/relayClient.ts +++ b/packages/shared/src/relayClient.ts @@ -68,6 +68,12 @@ export interface CloudflaredReleaseAsset { readonly archive: "binary" | "tgz"; } +const CLOUDFLARED_WINDOWS_AMD64_ASSET: CloudflaredReleaseAsset = { + url: "https://github.com/cloudflare/cloudflared/releases/download/2026.5.2/cloudflared-windows-amd64.exe", + sha256: "20b9638f685333d623798e733effbad2487093f15ba592f6c7752360ff3b7ab7", + archive: "binary", +}; + const CLOUDFLARED_RELEASE_ASSETS: Readonly< Partial> > = { @@ -91,11 +97,9 @@ const CLOUDFLARED_RELEASE_ASSETS: Readonly< sha256: "5286698547f03df745adb2355f04c12dde52ef425491e81f433642d695521886", archive: "binary", }, - "win32-x64": { - url: "https://github.com/cloudflare/cloudflared/releases/download/2026.5.2/cloudflared-windows-amd64.exe", - sha256: "20b9638f685333d623798e733effbad2487093f15ba592f6c7752360ff3b7ab7", - archive: "binary", - }, + "win32-x64": CLOUDFLARED_WINDOWS_AMD64_ASSET, + // Cloudflare publishes no Windows ARM64 build; Windows 11 on ARM runs the x64 one under emulation. + "win32-arm64": CLOUDFLARED_WINDOWS_AMD64_ASSET, }; const INSTALL_LOCK_RETRY_COUNT = 100;