purchases-flutter icon indicating copy to clipboard operation
purchases-flutter copied to clipboard

iOS Subscription Error: Invalid Receipt - StoreKit Issue

Open arundevops47 opened this issue 1 year ago • 3 comments

I have integrated RevenueCat for in-app subscriptions and it works correctly on Android. However, I am encountering an issue on iOS where the app returns an error related to an invalid receipt during the subscription process.

Previously, the subscription worked fine on iOS, but today it started showing the following error:

Environment

  • [x] Output of flutter doctor

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.22.3, on macOS 14.4.1 23E224 darwin-x64, locale en-IN) [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.4) [✓] Chrome - develop for the web [✓] Android Studio (version 2024.1) [✓] VS Code (version 1.93.1) [✓] Connected device (3 available) [✓] Network resources

• No issues found!

  • [x] Version of purchases-flutter

  • ^6.30.2

  • [x] Testing device version e.g.: iOS 15.5, Android API 30, etc.

  • iOS 17

  • [x] How often the issue occurs- every one of your customers is impacted? Only in dev?

  • Tested only in development.

  • [x] Debug logs that reproduce the issue

  • [x] Steps to reproduce, with a description of expected vs. actual behavior

  • Set up RevenueCat for in-app subscriptions.

  • Test the subscription process on an iOS device.

  • Attempt to purchase a subscription.

  • Observe the error message.

Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

Describe the bug

flutter: Error: PlatformException(8, The receipt is not valid. The purchased product was missing in the receipt. This is typically due to a bug in StoreKit., {userCancelled: false, underlyingErrorMessage: The purchased product was missing in the receipt. This is typically due to a bug in StoreKit., readable_error_code: INVALID_RECEIPT, message: The receipt is not valid. The purchased product was missing in the receipt. This is typically due to a bug in StoreKit., readableErrorCode: INVALID_RECEIPT, code: 8}, null) flutter: Platform Exception: The receipt is not valid. The purchased product was missing in the receipt. This is typically due to a bug in StoreKit.

Additional Information

  • No issues are occurring on Android.
  • The issue started today without any changes to the subscription logic.
  • The error message suggests a problem related to StoreKit and receipt validation on iOS.

arundevops47 avatar Sep 22 '24 10:09 arundevops47

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

RCGitBot avatar Sep 22 '24 10:09 RCGitBot

Hi @arundevops47, Is it something that happens constantly or only a hiccup? Since it happened only in sandbox it could be a temporary issue on Apple servers.

nyeu avatar Sep 25 '24 09:09 nyeu

I think it happens sometimes. Now it is working fine.

On Wed, 25 Sept 2024 at 15:15, nyeu @.***> wrote:

Hi @arundevops47 https://github.com/arundevops47, Is it something that happens constantly or only a hiccup? Since it happened only in sandbox it could be a temporary issue on Apple servers.

— Reply to this email directly, view it on GitHub https://github.com/RevenueCat/purchases-flutter/issues/1170#issuecomment-2373593779, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ55SXFQ2CBOEKZSMGHBQNLZYKA3NAVCNFSM6AAAAABOUNW6T6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZTGU4TGNZXHE . You are receiving this because you were mentioned.Message ID: @.***>

arundevops47 avatar Sep 25 '24 12:09 arundevops47