hyochan/flutter_inapp_purchase

getAvailablePurchases() not responding

Closed this issue · 5 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 AvailableItems =
await flutterInAppPurchase.getAvailablePurchases() ?? [];
print("AvailableItems: " + AvailableItems.toString());

did you solve this?

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.

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

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.

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 .