Skip to content

Retry stapling when Apple's ticket service drops the connection - #241

Merged
iliyami merged 1 commit into
mainfrom
ci/retry-stapler
Oct 19, 2026
Merged

iliyami merged 1 commit into
mainfrom
ci/retry-stapler

Conversation

@iliyami

@iliyami iliyami commented Oct 17, 2026

Copy link
Copy Markdown
Owner

The v1.25.3 and v1.25.4 release runs both failed after Apple had accepted the notarization, because xcrun stapler lost its connection to Apple's CloudKit ticket service:

Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." ... api.apple-cloudkit.com ... ticket-delivery
The staple and validate action failed! Error 68.

Both needed a manual re-run of the job.

  • scripts/build-dmg.sh: a stapler_with_retry helper wraps all four stapler staple/validate calls (app and DMG), retrying up to 4 times with a 15/30/45 s delay, then failing loudly.
  • release.yml: drops the extra stapler validate after build-dmg.sh, which already validates the DMG. That duplicate is where v1.25.4 failed.

Tested the helper with a stubbed xcrun (succeeds on the 3rd attempt; fails after 4). bash -n and YAML parse pass. No VERSION bump: release tooling only, the app is unchanged.

Two releases in a row (v1.25.3, v1.25.4) failed after notarization
succeeded, because stapler lost its connection to Apple's CloudKit
ticket service (-1005, error 68). Staple and validate now retry up to
four times with a growing delay, and the release workflow no longer runs
a second, redundant validate after build-dmg.sh has done it.
@iliyami
iliyami merged commit 6730358 into main Oct 19, 2026
2 checks passed
@iliyami
iliyami deleted the ci/retry-stapler branch October 19, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant