Solved

[Flutter/iOS] "Platform Exception: Couldn't find product" cannot be resolved


Badge +3
  • New Member
  • 7 replies

 

I get the error in the title when I run the following

await Purchases.purchaseProduct(product.identifier);

I have verified that the Product Id is the same as the one in App Store Connect.
Bank account and taxes are already set up.

What is the problem and how do I fix it?

icon

Best answer by Cesar 31 August 2022, 07:33

View original

29 replies

Badge

Hi, I am still facing the same issue even though I am using updated version 4.3.0.
Even tried on 4.2.1 and set the Sk2 to false but no luck.

p.s: I have already verified that I am using same product ids and everything.

Badge +1

We actually have exact same issue; after upgrading purchases_flutter to 4.2.0 we’re getting “2022-08-31 01:01:07.047514+0300 Runner[94560:6169725] flutter: PlatformException(5, Couldn't find product., {message: Couldn't find product., userCancelled: false, code: 5, underlyingErrorMessage: }, null)” error when we try to purchase a product that defined in both Apple and Revenuecat with exact same name. Do you have any idea about that? Also apple purchase window not showing up because of this error.

Userlevel 3
Badge +3

We have identified the issue and are working on a fix for it.

Userlevel 3
Badge +3

Version of purchases-flutter 4.2.1 has the fix for this issue. Please let us know if you experience more problems.

Badge +3

@Cesar 

In ver 4.2.1, I was able to process the purchase with `purchaseProduct`.
Thanks for the fix.

Badge +2

Hello, I was facing this same “product not found issue”. I tried the following:

*Checking that product identifiers match on App Store and Revenue Cat

*Upgrading purchases_flutter package to 4.3.0

*Setting the usesStoreKit2IfAvailable property to false

*Making the purchase through the product identifier directly

*Making the purchase by fetching the package

*Check information on App Store Connect (paid apps agreement active, tax information validated, banking account status clear, and legal entity status clear). 

 

Now I am getting the following error:

flutter: There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used).

 

This is weird because everything I have tried works on Android(Play Store), both on physical device and simulator. However, on Ios it does not work neither on simulator nor on physical device. 

My Revenue Cat initiation routine is as follows:

 

 

Please help!

 

have you signed the Paid Apps Agreement in App Store Connect and added your banking information under Paid Apps? I was getting that same issue and had to add and verify my bank account info before my Purchases plugin was able to retrieve the App Store available purchases

I am having the issue no product is available for purchase when i purchase a product. My code is await Purchases.purchaseProduct(product.identifier)

 

But the same code is in working when i purchase a subscription.

What should be the solution?

Userlevel 5
Badge +7

Hi @sal, have you gone through the article below? 

Why are offerings or products empty? | RevenueCat Community

Badge +3

@Jens 

I looked through it. Everything written on it has been addressed.
But it is not resolved.

Userlevel 5
Badge +7

Could you post the whole debug log?

Badge +3

@Jens 

The error is as follows.

flutter: │ 💡 PlatformException(5, Couldn't find product., {underlyingErrorMessage: , userCancelled: false, code: 5, message: Couldn't find product.}, null)

Badge +3

Can confirm you’re not the only one with this issue, I upgraded the RC SDK in my React Native App from v4 to v5, it worked fine before.

Seems to be related to StoreKit2 as it still works on iOS 14 but not on iOS 15

Badge +3
Aug 29 15:39:13 App(libswiftFoundation.dylib)[7104] <Notice>: [Purchases] - INFO: \M-b\M^D\M-9\M-o\M-8\M^O StoreKit 2 support enabled
Aug 29 15:39:17 App(libswiftFoundation.dylib)[7104] <Notice>: [Purchases] - WARN: \M-b\M^Z\240\M-o\M-8\M^O Unknown subscription length for package 'aa-subscriptions': PackageType.custom. Ignoring.
Aug 29 15:39:17 App(libswiftFoundation.dylib)[7104] <Notice>: [Purchases] - WARN: \M-b\M^Z\240\M-o\M-8\M^O Unknown subscription length for package 'aa-subscriptions': PackageType.custom. Ignoring.
Aug 29 15:39:17 App(libswiftFoundation.dylib)[7104] <Notice>: [Purchases] - WARN: \M-b\M^Z\240\M-o\M-8\M^O Unknown subscription length for package 'aa-subscriptions': PackageType.custom. Ignoring.

Debug Logs

Userlevel 5
Badge +8

@Josh 

Those particular lines in the log are safe to ignore (we’ll update them to make them clearer), all they’re stating is that you have a package with custom duration. 

 

@Josh and @sal 

Could you provide more logs? There should be something there that specifically calls out which products can’t be found or whether there’s a credentials issue. 

Badge +3

@Jens @Andy 

Do in-app purchases have to be on the Test flight?

Userlevel 5
Badge +8

You should be able to test while developing locally, no need for TestFlight. 

If you’re developing locally: 

You can make purchases on physical devices, but simulators won’t work. This is referred to as the Sandbox environment.  

 

You can make purchases on a simulator by using StoreKit Configuration files. Those require a little more setup, but provide a bit more flexibility. 

 

Here are our docs on testing, which will help you get set up. https://docs.revenuecat.com/docs/apple-app-store

Badge +3

Found this issue on GitHub too, no updates since a week

https://github.com/RevenueCat/react-native-purchases/issues/402

Anyway I have attached the full debug log containing App start up to purchase error.

Badge +3

@Andy  @Jens 

I will share more detailed logs.

Badge +3

@Andy @Jens 

Is it necessary to do what is written on the following pages?

https://docs.revenuecat.com/docs/in-app-purchase-key-configuration

Userlevel 5
Badge +7

Hi @sal , In-App Purchase Key Configuration is required only if you want to create iOS Subscription Offers (a special kind of discounted offering), so very likely the answer is no. 

I will let @Andy have a look at the log because that’s a bit outside of my area of expertise :) 

Badge +3

@Andy @Jens 

Thanks for all the comments.

I found out some new facts.

This did not work.

await Purchases.purchaseProduct(product.identifier);

But the following succeeded!

 await Purchases.purchasePackage(package);

What is the difference between these two methods?

Userlevel 3
Badge +3

They should behave very similarly. When purchasing a package, we will trigger a purchase for the product that’s associated with the product. Can you confirm the `product.identifier` you are passing to `purchaseProduct` is the same as `package.storeProduct.identifier` being `package` the one you’re passing to `purchasePackage`? If they are different then there’s something wrong with that product you are passing to `purchaseProduct`
 

Userlevel 3
Badge +3

Can you please set `usesStoreKit2IfAvailable` to false in your `PurchasesConfiguration` object and let us know if that solves the issues? If you are using the old `setup` function, you can pass `usesStoreKit2IfAvailable` as false to the function.

Userlevel 3
Badge +3

Ok, little update here… I’ve managed to reproduce it with `purchaseProduct` and with sk2 enabled. Setting `usesStoreKit2IfAvailable`  to false when configuring the SDK via the `PurchasesConfiguration` or `setup` function fix it.

We are looking into what could be causing this problem.

Badge +1

Can you please set `usesStoreKit2IfAvailable` to false in your `PurchasesConfiguration` object and let us know if that solves the issues? If you are using the old `setup` function, you can pass `usesStoreKit2IfAvailable` as false to the function.

Thank you so much Cesar, we have solved this problem with this solution.

Have a great day!

Reply