StoreKit 2 – AppStore.sync() fails with StoreKitError.unknown (code 2) in TestFlight**

Subject: StoreKit 2 – AppStore.sync() fails with StoreKitError.unknown (code 2) in TestFlight

Hello Apple Developer forum

We are investigating a reproducible issue with StoreKit 2's AppStore.sync() in our iOS application, Elins Nystan.

Environment

  • App: Elins Nystan
  • Bundle Identifier: poworg.ElinsNystan-2
  • TestFlight version: 1.43 (build 8)
  • Device: iPhone 16
  • Date: November 10, 2026
  • Environment: TestFlight / App Store sandbox
  • StoreKit: StoreKit 2

Problem

The app correctly recognizes an existing subscription and grants Premium access to the account associated with the original purchase.

Premium remains active after restarting the application, and subscription-dependent functionality works correctly.

However, when the user selects “Restore Purchases,” the app calls AppStore.sync(). An Apple account authentication dialog appears and the user enters their password.

After approximately 26 seconds, AppStore.sync() throws an error.

Captured device logs

All timestamps below are UTC:

  • 2026-11-10 21:33:10 — restore.started
  • 2026-11-10 21:33:10 — restore.syncStarted
  • 2026-11-10 21:33:36 — restore.syncFailed

Error details:

Domain: StoreKit.StoreKitError
Code: 2
Classification: unknown

The three log events share the same operation identifier.

The app reports that Restore could not be completed due to an unknown error.

Additional observations

  • Premium was active before Restore.
  • Previous testing confirmed that Premium remained active after a failed Restore.
  • No corresponding backend reconciliation request was observed during an earlier Restore failure.
  • No confirmed application-side cancellation or overlapping Restore request has been identified.
  • AppStore.sync() has been part of the Restore implementation since December 2025.
  • We have not identified a source-code regression that explains the StoreKit error.
  • We have not verified a previously successful Restore under equivalent TestFlight conditions.

We are not attempting to change subscription ownership or bypass purchase verification.

Questions

  1. What conditions can cause AppStore.sync() to throw StoreKitError.unknown (code 2) in TestFlight?
  2. Could this be related to the sandbox Apple Account, authentication, or an existing subscription with multiple renewal transactions?
  3. Are there additional StoreKit or system diagnostics that would help identify the underlying cause?
  4. Is there a recommended way to recover from this error while preserving the existing verified subscription entitlement?
  5. Is this a known TestFlight/sandbox issue, or should we investigate a specific application configuration?

We can provide redacted device logs and additional technical details if required.

Thank you for your assistance.