Skip to main content

Hi, I’m testing payments in my app. This has been working for several months as expected. Today however, when testing subscriptions in the iOS simulator I receive an error on `.purchasePackage` and `.restoreTransactions` saying this: `:Error: The receipt is missing.]` 

 

I’ve correctly included my StoreKit configuration in my build, and this was always previously working as expected. I recently upgraded to the new mac, and therefore the latest macOS.

 

Here is what i’m passing into `.purchasePackage`:

{"identifier": "$rc_monthly", "offeringIdentifier": "Full Access", "packageType": "MONTHLY", "product": {"currency_code": "USD", "description": "", "discounts": s], "identifier": "1MONTH", "introPrice": {"cycles": 1, "period": "P2W", "periodNumberOfUnits": 2, "periodUnit": "WEEK", "price": 0, "priceString": "$0.00"}, "intro_price": 0, "intro_price_cycles": 1, "intro_price_period": "P2W", "intro_price_period_number_of_units": 2, "intro_price_period_unit": "WEEK", "intro_price_string": "$0.00", "price": 18.989999771118164, "price_string": "$18.99", "title": ""}}

 

Anyone experiencing this issue?

Can you try creating a new sandbox user in App Store Connect and see if that fixes it? I think there could be an issue with sandbox accounts that had old purchases, then purchased again on newer operating system.


I’ve done that and it didn’t seem to help. Also i thought sandbox users weren’t needed for simulator testing?


Sandbox users are still required for simulator testing, you should be prompted to log in still. Simulators have historically been so unreliable for testing in-app purchases we always recommend testing on a physical device to rule out any simulator issues. Are things working for you on a physical device? 


Ahh, so im not being prompted to login so i assume thats the issue. I’ll test on my physical device now.


One of our engineers is facing this same issue after setting up the project in a M1 Mac. We had understood that purchases in iOS simulators through StoreKit testing didn't involve sandbox users, is there any documentation that explains this relationship?

What is particularly weird in this "missing receipt" error that is happening with one of our engineers is that the error doesn't occur with any other engineer, even though all engineers are using M1 Macs with the same specs and have set up the our project using the same setup scripts. We've already confirmed that the configuration of RevenueCat + StoreKit testing is correctly done in the engineer's machine and we are running out of ideas on how to fix this issue.

The purchase works correctly when the engineer purchases on a physical device, but that is done using a sandbox user and not through StoreKit testing.

Are there any suggestion on what could be happening for this specific engineer? We really appreciate any suggestions.

Thanks!


I am having the same problem while using Storekit on simulator, on device it works no problems. I get 

Error Domain=RevenueCat.ErrorCode Code=9 "The receipt is missing." UserInfo={source_file=RevenueCat/PurchasesOrchestrator.swift:476, NSLocalizedDescription=The receipt is missing., source_function=handlePurchasedTransaction(_:), readable_error_code=MISSING_RECEIPT_FILE}

This was working a few days ago on the same machine with the same simulator


Forgot to mention that I restored Revenuecat back to 4.3.0 (version that was working) and went back to my git commits on the version that worked and still nothing. I tried a different simulator and it was still the same error


Same for me and there is no solution for it.


Apple can't test my app because of this error and I got my 3rd rejection. Is there any solution?


Also seeing this issue @ryan - everything works fine for us when testing in simulator and real devices, but failing for Apple review team with the following error.

The code that is throwing the error is:

await Purchases.purchasePackage(product!.monthly!);
await purchasesService.refreshPurchases();

Any help here would be much appreciated! Have gone through many failed app store reviews now 😅

 

Cheers,

James

 


Oh and we’re using the Flutter SDK client!


Hi Everyone,
Rather than create a new thread with this same error, I will post here. While this thread hasn’t been touched for a year, i’m hoping i may get a resolution here.

I am testing on a physical device and have run into the same problem mentioned above:

oERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(9, The receipt is missing., {message: The receipt is missing., code: 9, underlyingErrorMessage: , readable_error_code: MISSING_RECEIPT_FILE, readableErrorCode: MISSING_RECEIPT_FILE}, null)

The app is live in both stores and working ok. I am updating the app to meet Google’s requirements for Android 14 (API 34) and during testing i’m experiencing this issue on both physical and emulator devices.

I am using purchases_flutter: ^6.30.1
The accounts I am logging in with all have active subscriptions and work fine on the published app. I have even run:

flutter build ios --release

Then installed to the physical device with the same result. 

In this particular app I present a screen stopping all usage if the user hasn’t subscribed. Then they are activate the paywall, choose a subscription and once paid, revenue cat does its bit and the app opens up giving the user full access. 

Right now with the problem I’m getting, I can’t trust the issue won’t go away when I publish the app. Yep, I intend on publishing to testflight first to see how it goes.

Any input on this problem would be greatly appreciated.

Regards all and thanks in advance,


Michael


i reverted to a known operating code base and everything works again as expected. I will compare the differences in time, but for now its operating again.


Reply