From ee8264793f85f589636f1b53b7ed93992df83b7e Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Fri, 23 Oct 2026 12:20:26 -0700 Subject: [PATCH 1/2] fix(release): retry stapling when Apple's ticket service drops the connection v2026.10.10-alpha notarized both macOS builds, then stapler failed twice with NSURLErrorDomain -1005 fetching the ticket. Stapling now retries up to five times, 30 s apart; validation and Gatekeeper checks are unchanged. --- scripts/build-macos-app.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/build-macos-app.sh b/scripts/build-macos-app.sh index bbce113c..d21853d8 100755 --- a/scripts/build-macos-app.sh +++ b/scripts/build-macos-app.sh @@ -35,7 +35,13 @@ if [ "$snapshot" != true ]; then jq '{status, statusSummary, issues}' "$build_dir/notary-log.json" jq -e '.status == "Accepted"' "$build_dir/notary-result.json" >/dev/null jq -e '[.issues[]? | select(.severity == "error")] | length == 0' "$build_dir/notary-log.json" >/dev/null - xcrun stapler staple "$app" + # Stapling fetches the ticket from Apple's CDN, which a runner's network + # can drop briefly; notarization itself has already succeeded. + for attempt in 1 2 3 4 5; do + xcrun stapler staple "$app" && break + [ "$attempt" = 5 ] && exit 1 + sleep 30 + done xcrun stapler validate "$app" codesign --verify --deep --strict --verbose=2 "$app" spctl --assess --type execute --verbose=2 "$app" From c00d4999b694eb53db34c02c9b482ac074eba9f4 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Fri, 23 Oct 2026 12:24:22 -0700 Subject: [PATCH 2/2] fix(release): retry ticket validation with stapling stapler validate also fetches the ticket and failed with -1005 after a retried staple succeeded on the signing check. --- scripts/build-macos-app.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/build-macos-app.sh b/scripts/build-macos-app.sh index d21853d8..8d1921c1 100755 --- a/scripts/build-macos-app.sh +++ b/scripts/build-macos-app.sh @@ -35,14 +35,13 @@ if [ "$snapshot" != true ]; then jq '{status, statusSummary, issues}' "$build_dir/notary-log.json" jq -e '.status == "Accepted"' "$build_dir/notary-result.json" >/dev/null jq -e '[.issues[]? | select(.severity == "error")] | length == 0' "$build_dir/notary-log.json" >/dev/null - # Stapling fetches the ticket from Apple's CDN, which a runner's network - # can drop briefly; notarization itself has already succeeded. + # Stapling and validation both fetch the ticket from Apple, which a + # runner's network can drop briefly; notarization has already succeeded. for attempt in 1 2 3 4 5; do - xcrun stapler staple "$app" && break + xcrun stapler staple "$app" && xcrun stapler validate "$app" && break [ "$attempt" = 5 ] && exit 1 sleep 30 done - xcrun stapler validate "$app" codesign --verify --deep --strict --verbose=2 "$app" spctl --assess --type execute --verbose=2 "$app" rm "$submission"