Q: Flutter getting an exception when calling queryPastPurchases (in_app_purchase plugin): Cannot find receipt for the current main bundle I'm trying to utilise the in_app_purchase plugin (https://pub.dev/packages/in_app_purchase) for my Flutter App.
Calling a queryProductDetails(ids) works just fine,
but when calling the queryPastPurchases() I get the following exception:
PlatformException (PlatformException(storekit_no_receipt, Cannot find receipt for the current main bundle., null))

Seems like this is the source for the exception:
https://github.com/flutter/plugins/blob/master/packages/in_app_purchase/ios/Classes/FIAPReceiptManager.m
Worth mentioning:
I've setup an IAP in App-Store-Connect.
This IAP hasn't been sent for Apple approval yet.
App is in development, tested using TestFlight with beta testers.
Another issue is that this exception doesn't get cought in the try-catch statement (see code below), but only by the environment when checking the "All Exceptions" option in VSCode...
Tested on Emulator and real device.
[UPDATE]:
Added a breakpoint to the objective-c code of the plugin, and saw that the receiptURL refers to "sandboxReceipt". So maybe it's because I don't use sandbox users?
Future<void> _getPastPurchases() async {
    try {
      final QueryPurchaseDetailsResponse response = await InAppPurchaseConnection.instance.queryPastPurchases();
      if (response.error != null) {
          // Handle the error
          print(response.error.toString());
      }
      print('response = ' + response.toString());

      for (PurchaseDetails purchase in response.pastPurchases) {
        if (Platform.isIOS) {
          //InAppPurchaseConnection.instance.completePurchase(purchase);
        }
      }

      setState(() {
        _purchases = response.pastPurchases;
      });
    } on PlatformException catch(err) {
      print(err.toString());
    }
    catch (err) {
      print(err.toString());
    }
  }

