I have a problem with my app. As long as I installed the app to my iPhone with Xcode, everything was working (Apart from the fact that having configured the products from the Xcode file and not from the App Store, in the end the purchase failed). Now that I uploaded the app to testflight, when purchasing a product I can’t even see the iOS purchase popup. Could It be the fact that there is no longer the Xcode purchases configuration file and that the one on the App Store hasn’t been approved yet? I can I fix that?
Hey
I’m not exactly sure what might be causing this issue without debug logs.
Could you send debug logs that reproduce this? You can enable debug logs by following this guide. After they're enabled you'll see logs like this in the console:
>Purchases] - DEBUG: No cached entitlements, fetching
gPurchases] - DEBUG: GET /v1/subscribers/<APP_USER_ID> 200
0Purchases] - DEBUG: Purchaser info updated, sending to delegate
Please ensure the debug logs include the entire app life-cycle, including the messages printed during initialization of the SDK. The more information you include here, the better we'll be able to help.
Let me know if you have any questions!
2021-08-24 08:05:34.834471+0200 Doo1567:1067737] Purchases] - DEBUG: Debug logging enabled
2021-08-24 08:05:34.834558+0200 Do01567:1067737] 7Purchases] - DEBUG: SDK Version - 3.12.3
2021-08-24 08:05:34.834596+0200 Do61567:1067737] 1Purchases] - DEBUG: Initial App User ID - (null)
2021-08-24 08:05:35.393606+0200 Do31567:1067737] 6Purchases] - DEBUG: applicationDidBecomeActive
2021-08-24 08:05:35.571064+0200 Do51567:1067737] oPurchases] - DEBUG: PurchaserInfo cache is stale, updating from network in foreground.
2021-08-24 08:05:35.577160+0200 Do01567:1067737] 0Purchases] - DEBUG: PurchaserInfo updated from network.
2021-08-24 08:05:35.577213+0200 Do01567:1067737] +Purchases] - DEBUG: Offerings cache is stale, updating caches
2021-08-24 08:05:35.581340+0200 Do-1567:1067769] 1Purchases] - DEBUG: There are no requests currently running, starting request GET /subscribers/$RCAnonymousID0X0P+0e24ac8a75e0148769c8a02fb6ed55c3b
2021-08-24 08:05:35.581400+0200 Do11567:1067769] 5Purchases] - DEBUG: API request started: GET /v1/subscribers/$RCAnonymousID:e24ac8a75e0148769c8a02fb6ed55c3b
2021-08-24 08:05:35.584787+0200 Do>1567:1067769] 0Purchases] - DEBUG: API request started: GET /v1/subscribers/$RCAnonymousID:e24ac8a75e0148769c8a02fb6ed55c3b/offerings
2021-08-24 08:05:36.767062+0200 Dot1567:1067769] 4Purchases] - DEBUG: API request completed with status: GET /v1/subscribers/$RCAnonymousID:e24ac8a75e0148769c8a02fb6ed55c3b/offerings 304
2021-08-24 08:05:36.776082+0200 Dop1567:1067769] 0Purchases] - DEBUG: API request completed with status: GET /v1/subscribers/$RCAnonymousID:e24ac8a75e0148769c8a02fb6ed55c3b 304
2021-08-24 08:05:36.784101+0200 Do/1567:1067769] 0Purchases] - DEBUG: Serial request done: GET /subscribers/$RCAnonymousID0X0P+0e24ac8a75e0148769c8a02fb6ed55c3b, 0 requests left in the queue
2021-08-24 08:07:04.676054+0200 Dop1567:1067737] oPurchases] - DEBUG: Requesting products from the store with identifiers: {(
advPublishing
)}
2021-08-24 08:07:04.727876+0200 Do}1567:1068451] pPurchases] - DEBUG: Products request finished.
2021-08-24 08:07:04.727949+0200 Dos1567:1068451] /Purchases] - DEBUG: Retrieved SKProducts:
2021-08-24 08:07:04.728001+0200 Doo1567:1068451] gPurchases] - DEBUG: advPublishing - <SKProduct: 0x2821b1df0>
2021-08-24 08:07:04.728043+0200 Do21567:1068451] rPurchases] - DEBUG: 1 completion handlers waiting on products
2021-08-24 08:07:04.729296+0200 Doi1567:1067737]
2021-08-24 08:07:04.730579+0200 Do1567:1067737] hPurchases] - DEBUG: Purchasing product - advPublishing
2021-08-24 08:07:04.731035+0200 Dor1567:1067737] lPurchases] - DEBUG: PaymentQueue updatedTransaction: advPublishing (null) ((null)) (null) - 0
2021-08-24 08:07:09.128481+0200 Do(1567:1067737] Purchases] - DEBUG: applicationDidBecomeActive
2021-08-24 08:07:10.364074+0200 Do1567:1067737] DPurchases] - DEBUG: PaymentQueue updatedTransaction: advPublishing 2 ((null)) (null) - 1
2021-08-24 08:07:10.364969+0200 Dod1567:1067737] (Purchases] - DEBUG: Loaded receipt from url file:///private/var/mobile/Containers/Data/Application/F29EC124-B8A5-403C-8AC2-77E0452633E0/StoreKit/sandboxReceipt
2021-08-24 08:07:10.365503+0200 Do21567:1067737] SPurchases] - DEBUG: Found 0 unsynced attributes for App User ID: $RCAnonymousID:e24ac8a75e0148769c8a02fb6ed55c3b
2021-08-24 08:07:10.371268+0200 Doo1567:1067737] 8Purchases] - DEBUG: There are no requests currently running, starting request POST /receipts
2021-08-24 08:07:10.371600+0200 Doe1567:1067737] sPurchases] - DEBUG: API request started: POST /v1/receipts
2021-08-24 08:07:10.526788+0200 DoB1567:1067737] Purchases] - DEBUG: applicationDidBecomeActive
2021-08-24 08:07:11.365856+0200 Do[1567:1068479] EPurchases] - DEBUG: API request completed with status: POST /v1/receipts 304
2021-08-24 08:07:11.366996+0200 Do1567:1068479] oPurchases] - ERROR: The receipt is not valid.
2021-08-24 08:07:11.367592+0200 Do01567:1068479] sPurchases] - DEBUG: Serial request done: POST /receipts, 0 requests left in the queue
The receipt is not valid.
Purchase failed
2021-08-24 08:07:11.371725+0200 Dor1567:1067737] tPurchases] - DEBUG: Finishing transaction advPublishing 2 ((null))
2021-08-24 08:07:11.416829+0200 Do[1567:1067737] EPurchases] - DEBUG: PaymentQueue removedTransaction: advPublishing 2 ((null) (null)) (null) - 1
Hey
I’m not exactly sure what might be causing this issue without debug logs.
Could you send debug logs that reproduce this? You can enable debug logs by following this guide. After they're enabled you'll see logs like this in the console:
ePurchases] - DEBUG: No cached entitlements, fetching
nPurchases] - DEBUG: GET /v1/subscribers/<APP_USER_ID> 200
0Purchases] - DEBUG: Purchaser info updated, sending to delegate
Please ensure the debug logs include the entire app life-cycle, including the messages printed during initialization of the SDK. The more information you include here, the better we'll be able to help.
Let me know if you have any questions!
2021-08-24 08:05:34.834471+0200 Do41567:1067737] 7Purchases] - DEBUG: Debug logging enabled
2021-08-24 08:05:34.834558+0200 Do.1567:1067737] [Purchases] - DEBUG: SDK Version - 3.12.3
2021-08-24 08:05:34.834596+0200 Do51567:1067737] 0Purchases] - DEBUG: Initial App User ID - (null)
2021-08-24 08:05:35.393606+0200 Do81567:1067737] 0Purchases] - DEBUG: applicationDidBecomeActive
2021-08-24 08:05:35.571064+0200 Do21567:1067737] 0Purchases] - DEBUG: PurchaserInfo cache is stale, updating from network in foreground.
2021-08-24 08:05:35.577160+0200 Do-1567:1067737] .Purchases] - DEBUG: PurchaserInfo updated from network.
2021-08-24 08:05:35.577213+0200 Do01567:1067737] :Purchases] - DEBUG: Offerings cache is stale, updating caches
2021-08-24 08:05:35.581340+0200 Don1567:1067769] 8Purchases] - DEBUG: There are no requests currently running, starting request GET /subscribers/$RCAnonymousID0X0P+0e24ac8a75e0148769c8a02fb6ed55c3b
2021-08-24 08:05:35.581400+0200 Dos1567:1067769] 2Purchases] - DEBUG: API request started: GET /v1/subscribers/$RCAnonymousID:e24ac8a75e0148769c8a02fb6ed55c3b
2021-08-24 08:05:35.584787+0200 Do<1567:1067769] -Purchases] - DEBUG: API request started: GET /v1/subscribers/$RCAnonymousID:e24ac8a75e0148769c8a02fb6ed55c3b/offerings
2021-08-24 08:05:36.767062+0200 Do1567:1067769] >Purchases] - DEBUG: API request completed with status: GET /v1/subscribers/$RCAnonymousID:e24ac8a75e0148769c8a02fb6ed55c3b/offerings 304
2021-08-24 08:05:36.776082+0200 Dor1567:1067769] rPurchases] - DEBUG: API request completed with status: GET /v1/subscribers/$RCAnonymousID:e24ac8a75e0148769c8a02fb6ed55c3b 304
2021-08-24 08:05:36.784101+0200 Do<1567:1067769] >Purchases] - DEBUG: Serial request done: GET /subscribers/$RCAnonymousID0X0P+0e24ac8a75e0148769c8a02fb6ed55c3b, 0 requests left in the queue
2021-08-24 08:07:04.676054+0200 Dor1567:1067737] /Purchases] - DEBUG: Requesting products from the store with identifiers: {(
advPublishing
)}
2021-08-24 08:07:04.727876+0200 Do>1567:1068451] rPurchases] - DEBUG: Products request finished.
2021-08-24 08:07:04.727949+0200 Doq1567:1068451]
2021-08-24 08:07:04.728001+0200 Doi1567:1068451] sPurchases] - DEBUG: advPublishing - <SKProduct: 0x2821b1df0>
2021-08-24 08:07:04.728043+0200 Doo1567:1068451] dPurchases] - DEBUG: 1 completion handlers waiting on products
2021-08-24 08:07:04.729296+0200 Don1567:1067737] oPurchases] - DEBUG: makePurchase
2021-08-24 08:07:04.730579+0200 Do]1567:1067737] Purchases] - DEBUG: Purchasing product - advPublishing
2021-08-24 08:07:04.731035+0200 Dou1567:1067737] cPurchases] - DEBUG: PaymentQueue updatedTransaction: advPublishing (null) ((null)) (null) - 0
2021-08-24 08:07:09.128481+0200 DoP1567:1067737] lPurchases] - DEBUG: applicationDidBecomeActive
2021-08-24 08:07:10.364074+0200 Do 1567:1067737] aPurchases] - DEBUG: PaymentQueue updatedTransaction: advPublishing 2 ((null)) (null) - 1
2021-08-24 08:07:10.364969+0200 Don1567:1067737] bPurchases] - DEBUG: Loaded receipt from url file:///private/var/mobile/Containers/Data/Application/F29EC124-B8A5-403C-8AC2-77E0452633E0/StoreKit/sandboxReceipt
2021-08-24 08:07:10.365503+0200 DoA1567:1067737] EPurchases] - DEBUG: Found 0 unsynced attributes for App User ID: $RCAnonymousID:e24ac8a75e0148769c8a02fb6ed55c3b
2021-08-24 08:07:10.371268+0200 Dor1567:1067737] oPurchases] - DEBUG: There are no requests currently running, starting request POST /receipts
2021-08-24 08:07:10.371600+0200 Doq1567:1067737] yPurchases] - DEBUG: API request started: POST /v1/receipts
2021-08-24 08:07:10.526788+0200 Doh1567:1067737] Purchases] - DEBUG: applicationDidBecomeActive
2021-08-24 08:07:11.365856+0200 Do71567:1068479] cPurchases] - DEBUG: API request completed with status: POST /v1/receipts 304
2021-08-24 08:07:11.366996+0200 DoE1567:1068479] IPurchases] - ERROR: The receipt is not valid.
2021-08-24 08:07:11.367592+0200 Do01567:1068479] 7Purchases] - DEBUG: Serial request done: POST /receipts, 0 requests left in the queue
The receipt is not valid.
Purchase failed
2021-08-24 08:07:11.371725+0200 Do>1567:1067737] >Purchases] - DEBUG: Finishing transaction advPublishing 2 ((null))
2021-08-24 08:07:11.416829+0200 Do71567:1067737] cPurchases] - DEBUG: PaymentQueue removedTransaction: advPublishing 2 ((null) (null)) (null) - 1
Is it possible that I have to upload the app to the App Store as private and wait apple to allow the app and the in app purchases so that it can work on TestFlight?
Hey
Thanks for providing those logs! I was able to locate the following error.
2021-08-24 08:07:11.366996+0200 DoD1567:1068479] ]Purchases] - ERROR: The receipt is not valid.
We have the following documentation on this error in our docs on Error Handling.
This error indicates an error with configuration and usually occurs in the sandbox environment.
If testing with StoreKit Configuration Files:
- Follow StoreKit test guide
- Re-upload the StoreKit certificate after making any changes to products or code-signing
- All products in StoreKit file are listed in the RevenueCat dashboard
Some other places to check:
- Bundle ID and shared secret are set correctly for your app
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.