Skip to main content
Question

Unable to restore purchases on Apple TV with multiple users

  • December 10, 2024
  • 4 replies
  • 53 views

marcosatanaka
Forum|alt.badge.img+3

I’m looking for some guidance on handling a case where a user can’t restore purchases on an Apple TV with multiple users. The setup is:

  • The user who purchased my annual subscription (let’s call them User A) can access all premium features throughout the app. They are not the default user on the Apple TV, but I’m not sure if that matters.
  • The default user on the Apple TV (User B) is using my app without a subscription and is trying to restore purchases to unlock premium features. When they do that, they get a MissingReceiptFileError.
  • My Apple TV app is configured to “Run as Current User”, so it manages separate data for each user on the device (I’m not sure if that’s important to RevenueCat or not).

The user then tried to delete the app and reinstall it, this time using the default Apple TV user (User B). This is what happened:

  1. They get the “A family member has already bought this item” message when downloading the app, and confirm the download
  2. They open the app and try to subscribe to the annual subscription
  3. They confirm the annual subscription on iPhone and get the “A family member has already purchased this subscription” message
  4. They then select “Please Try Again” from above message prompt and nothing happens
  5. They then try to restore the purchase and get a StoreProblemError

Is this scenario of multiple Apple TV users trying to share the same annual subscription (which has Family Sharing enabled) supported out of the box? Or do I need to configure something different in my RevenueCat implementation to support that?

This post has been closed for comments

4 replies

marcosatanaka
Forum|alt.badge.img+3
  • Author
  • New Member
  • 3 replies
  • December 11, 2024

And here’s a screenshot I was sent that shows the error message:

 

 


marcosatanaka
Forum|alt.badge.img+3
  • Author
  • New Member
  • 3 replies
  • December 11, 2024

I was able to reproduce the issue on my Apple TV. Restoring purchases works for the default user, but when I switch to a different user (by holding the TV/Home button on the remote) and try to restore again, the error occurs. Here’s what appears in the console:

DEBUG: ℹ️ Found 0 unsynced attributes for App User ID: <ID>
DEBUG: ℹ️ Force refreshing the receipt to get latest transactions from Apple.
DEBUG: ℹ️ SKReceiptRefreshRequest started
<SKReceiptRefreshRequest: 0x302a85b80>: Finished refreshing receipt with error: Error Domain=ASDErrorDomain Code=507 "Invalid container for application: file:///private/var/containers/Bundle/Application/E3C0046C-86E5-42D5-A85A-3C8FFB2C4C55/Play.app/" UserInfo={NSDebugDescription=Invalid container for application: file:///private/var/containers/Bundle/Application/E3C0046C-86E5-42D5-A85A-3C8FFB2C4C55/Play.app/}
ERROR: 🍎‼️ SKRequest failed: Error Domain=SKErrorDomain Code=0 "An unknown error occurred" UserInfo={NSLocalizedDescription=An unknown error occurred, NSUnderlyingError=0x302410d80 {Error Domain=ASDErrorDomain Code=507 "(null)"}}
WARN: 🍎‼️ Unable to load receipt, ensure you are logged in to a valid Apple account.
Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “sandboxReceipt” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/private/var/PersonaVolumes/62525A47-925B-44EE-9BDC-C756D812E340/Containers/Data/Application/E7D04B91-D098-40D2-82B5-DD1AF87DE3DC/StoreKit/sandboxReceipt, NSURL=file:///private/var/PersonaVolumes/62525A47-925B-44EE-9BDC-C756D812E340/Containers/Data/Application/E7D04B91-D098-40D2-82B5-DD1AF87DE3DC/StoreKit/sandboxReceipt, NSUnderlyingError=0x302435920 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
WARN: 🍎‼️ App running in sandbox without a receipt file. Restoring transactions won't work until a purchase is made to generate a receipt. This should not happen in production unless user is logged out of Apple account.
ERROR: 🍎‼️ The receipt is missing.
Error restoring purchases: The receipt is missing.

 


jeffrey_bunn
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 240 replies
  • December 18, 2024

@marcosatanaka Thanks for sharing the screenshots and logs. Would you mind opening a support ticket and share the app user IDs affected so we can dig into your users logs to see what’s happening? A few other thoughts that I’ll share here in the meantime:

  • You mentioned that it’s an annual subscription, but I just wanted to confirm that this is the case and it’s not a non-subscription or consumable.
  • Have you been able to replicate this in production? The Sandbox can be notoriously difficult (particularly with Family Sharing), and often errors that happen in the sandbox don’t appear in production. But I understand this can make it difficult to test.
  • What version of the SDK are you using? We’ve seen issues with empty receipts in StoreKit2 (which our SDK now uses) in the Sandbox when restoring that don’t appear in production.

Please mention this community post in your support ticket so I can be sure to take this for you. Thanks!


marcosatanaka
Forum|alt.badge.img+3
  • Author
  • New Member
  • 3 replies
  • December 20, 2024

Thanks, ​@jeffrey_bunn, for your help! I’ll try to open a support ticket once I get the app user IDs. It might take some time as I currently don’t have an easy way for users to see or share this information, so I’ll have to include it in my next update (unless there’s another method they could use to get their IDs that I’m not aware of).

Regarding your other points:

  • Users can opt for either the monthly or annual subscription, or the one-time lifetime unlock, which I’ve implemented as a non-consumable. I’m certain that one instance of this occurred with an annual subscription, as the user explicitly mentioned it. I’m not sure about the others. By the way, I’m calling Purchases.shared.restorePurchases in my restore purchases button. Would this also work for non-consumable purchases, or would I need to handle that separately?
  • I’ve only replicated that in development, but it also occurs in production, as I became aware of it through user feedback.
  • I’m currently on version 4.29.0 of the RevenueCat SDK.

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings