flutter_inapp_purchase icon indicating copy to clipboard operation
flutter_inapp_purchase copied to clipboard

getAvailablePurchases() not responding

Open multiicons opened this issue 3 years ago • 3 comments

Version of flutter_inapp_purchase

5.1.2

Platforms you faced the error (IOS or Android or both?)

IOS

Expected behavior

Purchased item list

Actual behavior

Unhandled Exception: PlatformException(E_UNKNOWN, An unknown or unexpected error has occured. Please try again later., null, null)

Tested environment (Emulator? Real Device?)

both

Steps to reproduce the behavior

List<PurchasedItem> AvailableItems = await flutterInAppPurchase.getAvailablePurchases() ?? []; print("AvailableItems: " + AvailableItems.toString());

multiicons avatar Apr 25 '22 10:04 multiicons

did you solve this?

khizar1556 avatar May 16 '22 14:05 khizar1556

Can you post more code? It's not possible to check if it's correctly implemented. Also you need to set up your App Store developer Account correctly to make it work. The example code of the project works perfectly.

soarescaique avatar May 18 '22 13:05 soarescaique

same problem, when i called like:

List<PurchasedItem> purchasedItems =
        await FlutterInappPurchase.instance.getAvailablePurchases();

and didn't return any result.

I tried many times, but get thepurchasedItems only once.

flutter_inapp_purchase version is 5.1.2

litang0908 avatar May 21 '22 11:05 litang0908

This issue is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days.

github-actions[bot] avatar Aug 20 '22 02:08 github-actions[bot]

I solve this issue by making my own google play API with my server to check the previous history now it is fixed. now i am not calling getAvailablePurchases i just call my own api for restore .

khizar1556 avatar Aug 21 '22 15:08 khizar1556