RevenueCat / purchases-flutter

Flutter plugin for in-app purchases and subscriptions. Supports iOS, macOS and Android.
https://www.revenuecat.com/
MIT License
601 stars 167 forks source link

'StoreProblemError' and 'IneligibleError' in production #347

Open esconts opened 2 years ago

esconts commented 2 years ago

Describe the bug

A long time ago we implemented in app purchases in our application through RevenueCat and it was working fine until we got this two issues from users.

1)First -

errorCode: PurchasesErrorCode.storeProblemError,

details: {code: 2, message: There was a problem with the App Store., readable_error_code: STORE_PROBLEM, userCancelled: false, underlyingErrorMessage: An unknown error occurred, readableErrorCode: STORE_PROBLEM},

It appears in logs when users are trying to press "subscription buy button".

We didn’t touch any implementation of this and configuration in App Store Connect or RevenueCat so it’s just happening for some reasons of App Store?

Also, maybe this information will be helpful - previous build was rejected in first attempt because of ‘cannot locate iAP’ after build was approved but in this build appeared this issue.

2)Second -

errorCode: PurchasesErrorCode.ineligibleError,

details: {code: 18, message: The User is ineligible for that action., underlyingErrorMessage: User is ineligible for promotional offer., readable_error_code: INELIGIBLE_ERROR, readableErrorCode: INELIGIBLE_ERROR},

Also a few users are getting this issue in the logs, we have condition for checking Eligibility Status and it was working fine, but in build after rejection we see issue in the logs in production. It can be related to the first issue of AppStore or why this can appears?

if (isEligible.values.first.status == IntroEligibilityStatus.introEligibilityStatusEligible) 
{
 purchaserInfo = await Purchases.purchaseDiscountedPackage(familyPackage, paymentDiscount); 
} 
else 
{
 purchaserInfo = await Purchases.purchasePackage(familyPackage); 
}

In Sandbox environment everything is still working fine.

Looking forward for your reply!

Thank you, Andrew

joshdholtz commented 2 years ago

@esconts Thanks for the report! I'll be looking into this today and get back to you when I have something 😊

joshdholtz commented 2 years ago

@esconts Forgot that I needed a bit more info! Which version of the SDK are you using and do you know what version of iOS these issues are happening on? Thanks!

esconts commented 2 years ago

@esconts Forgot that I needed a bit more info! Which version of the SDK are you using and do you know what version of iOS these issues are happening on? Thanks!

@joshdholtz we use 3.8.0 version of SDK and one of the user has iOS 14.7.1, but we get these issues from many of users and they probably have different iOS versions.

tmaihoff commented 1 year ago

Any update on this?

I get feedback from users saying that they don't see my in-app-products meaning the revenuecat initialization fails on Android 13 device.

I am using: purchases_flutter: ^4.4.3

I see the followin error in Crashlytics:

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: PlatformException(2, There was a problem with the store., {code: 2, message: There was a problem with the store., readableErrorCode: StoreProblemError, readable_error_code: StoreProblemError, underlyingErrorMessage: Error updating purchases. DebugMessage: . ErrorCode: 2., userCancelled: false}, null). Error thrown iap_purchase_error.
       at StandardMethodCodec.decodeEnvelope(message_codecs.dart:653)
       at MethodChannel._invokeMethod(platform_channel.dart:296)
       at Purchases._invokeReturningMap(purchases_flutter.dart:722)
       at Purchases._invokeReturningCustomerInfo(purchases_flutter.dart:706)
       at Purchases.purchaseProduct(purchases_flutter.dart:256)
ChrisElliotUK commented 1 year ago

+1

codykerns commented 1 year ago

@tmaihoff 👋 happy to help here. Is this happening with every user? If it's working correctly for other users, then these types of store problem issues on Android are typically an issue with Google Play directly - and not something related to the SDK or your configuration.

tmaihoff commented 1 year ago

@tmaihoff 👋 happy to help here. Is this happening with every user? If it's working correctly for other users, then these types of store problem issues on Android are typically an issue with Google Play directly - and not something related to the SDK or your configuration.

Thanks for reaching out. This is not happening for everyone, I received feedback only from one user so far. Any idea which advice I could give the user to get it working? Reinstalling and using a different Google account both did not work for him.

ChrisElliotUK commented 1 year ago

Is there any update on this?

BenBach commented 8 months ago

@ChrisElliotUK Having the same problem. Did you find a solution?

ChrisElliotUK commented 8 months ago

I have changed the check to if they are not ineligible then purchase the discounted package seems to be holding