jamesmontemagno / InAppBillingPlugin

Cross-platform In App Billing Plugin for .NET
MIT License
651 stars 152 forks source link

Getting "RestoreFailed" error #528

Closed satish-dnv closed 1 year ago

satish-dnv commented 1 year ago

If you are creating an issue for a BUG please fill out this information. If you are asking a question or requesting a feature you can delete the sections below.

Failure to fill out this information will result in this issue being closed. If you post a full stack trace in a bug it will be closed, please post it to http://gist.github.com and then post the link here.

Bug Information

Hello James, Our iOS app being rejected by the app store as they are getting the "RestoreFailed" error. We tried to reproduce the error and also We are getting the error. But, the error occurrence rate is intermittent. We have been facing this issue since last 3 weeks. We were used version 5.6.1(got the error) and currently upgraded to 6.6.1. but, still issue is not resolved. Can you please let us know what are the chances to get this error? Please let us know the solution for this error ASAP. Thank you. Device Tested On: iPhone 13 and iPad Simulator Tested On: NA Version of VS: Visual studio community edition 2019 Version of Xamarin: 5.0.0.2515 Versions of other things you are using:

Steps to reproduce the Behavior

  1. Click on sign-in button
  2. Executes the line var getPurchases = await CrossInAppBilling.Current.GetPurchasesAsync(ItemType.Subscription);

    Expected Behavior

    Get purchase history

    Actual Behavior

    Exception: "RestoreFailed"

    Code snippet

    var getPurchases = await CrossInAppBilling.Current.GetPurchasesAsync(ItemType.Subscription);

    Screenshotst

    screenshot
satish-dnv commented 1 year ago

@PonyOny , @nishitgupta3 Hi. I have seen your comment in closed issue which is related to "restore transaction failed". Is it resolved to you or still you have?

monty250 commented 1 year ago

We are having the same issue utilizing the InAppBilling plug-in. After submitting our build to Apple for release to Production, Apple keeps rejecting the build as they keep conveying during their testing they are receiving the "RestoreFailed" error when they try to Sign In to our App. We are not able to reproduce it. Further, we have had no issues like this over the past year and we have made no changes to the Sign In code and have been submitting new builds at least once per month. @jamesmontemagno - please help and provide your feedback.

jamesmontemagno commented 1 year ago

I haven't seen this at all. Maybe don't display the pop up and just re-try? I have not seen this issue.

jamesmontemagno commented 1 year ago

Please try https://www.nuget.org/packages/Plugin.InAppBilling/6.7.1-beta

hammy33897 commented 1 year ago

I am having the same issue, wondering if and how you were able to resolve this? Nevermind, I got this working ok, I need to read the documentation properly next time!

pulmuone commented 1 year ago

iOS sand-box Test? I set up a subscription sandbox test on iOS like this.

[iPhone Settings] Settings -> App Store >Sandbox Test

Cap 2023-08-14 00-26-21-393

[appstoreconnect.apple.com Settings] https://github.com/jamesmontemagno/InAppBillingPlugin/assets/42885949/0862076d-891b-4e5d-813f-a2ce5448ad89

Before testing, try clearing your purchase history in appstoreconnect.

hammy33897 commented 1 year ago

After getting this issue again, I check for restore failed message, if it occurs then do the same call a second time and it is successful. It's a bit of a performance hit though as the call needs to be made twice