Invalid receipt on production (No sandbox)
Closed this issue · 4 comments
- I have updated Purchases SDK to the latest version
- I have read the Contribution Guidelines
- I have searched the Community
- I have read docs.revenuecat.com
- I have searched for existing Github issues
Describe the bug
A clear and concise description of what the bug is. The more detail you can provide the faster our team will be able to triage and resolve the issue. Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.
-
Environment
- Platform: ios
- SDK version: 4.41.2
- StoreKit version:
- StoreKit 1
- StoreKit 2 (enabled with
usesStoreKit2IfAvailable(true)
)
- OS version: 17.5.1
- Xcode version: 15.2
- Device and/or simulator:
- Device
- Simulator
- Environment:
- Sandbox
- TestFight
- Production
- How widespread is the issue. Percentage of devices affected. -> 3 users today at 9 a.m UTC
-
Steps to reproduce, with a description of expected vs. actual behavior
The user tries to purchase, and seem it has purchased but doesn't work.
- Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
Key | Value for this event |
---|---|
nserror-code | 8 |
nserror-domain | RevenueCat.ErrorCode.RevenueCat.ErrorCode, 8 |
NSLocalizedDescription | The receipt is not valid. The purchased product was missing in the receipt. This is typically due to a bug in StoreKit. |
NSUnderlyingError | Error Domain=RevenueCat.BackendErrorCode Code=7712 "The purchased product was missing in the receipt. This is typically due to a bug in StoreKit." UserInfo={NSLocalizedDescription=The purchased product was missing in the receipt. This is typically due to a bug in StoreKit., rc_backend_error_code=7712} |
rc_backend_error_code | 7712 |
rc_response_status_code | 422 |
readable_error_code | INVALID_RECEIPT |
source_file | RevenueCat/HTTPClient.swift:699 |
source_function | parseUnsuccessfulResponse() |
SwiftError | RevenueCat.ErrorCode, 8 |
PurchasesOrchestrator.swift - Line 418
closure in PurchasesOrchestrator.purchase(sk1Product:payment:package:wrapper:completion:) + 418
- Additional context
Add any other context about the problem here.
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Hi @jesus-mg-ios, in production this error just means Apple won't accept the receipt because something is wrong with it. It could be due to something like a jailbroken device, or there could be a genuine error. Either way, this is an error that Apple's returning and there's not much we can do about it SDK-side.
One thing you can try is to delete the user from RevenueCat, you can do this either from the dashboard or via the REST API. Then, have the user delete and reinstall the app and attempt to purchase again. This should resync them with our servers and could clear the error.
As information, the device is not jailbroken, I can assure that because we have a check.
Would be great don't manage each case manually.
Hi @jesus-mg-ios,
Thanks for the additional information - the example of a jailbroken device is just a possibility, among others. As Ryan said, we don't have much insight into why this receipt was not accepted beyond the fact that it is invalid or malformed. As long as your configuration is correct (bundle ID and shared secret set correctly), the best next step is to retry syncing the receipt.
I'm going to close out this Issue but if you'd like to continue discussing the error, I'd recommend opening a support ticket from your RevenueCat dashboard.