Skip to main content
Solved

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


Forum|alt.badge.img+3
  • 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?

Best answer by Cesar

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

View original
Did this post help you find an answer to your question?

30 replies

Jens
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • 182 replies
  • August 29, 2022

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

Why are offerings or products empty? | RevenueCat Community


Forum|alt.badge.img+3
  • Author
  • Member
  • 7 replies
  • August 29, 2022

@Jens 

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


Jens
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • 182 replies
  • August 29, 2022

Could you post the whole debug log?


Forum|alt.badge.img+3
  • Author
  • Member
  • 7 replies
  • August 29, 2022

@Jens 

The error is as follows.

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


Forum|alt.badge.img+3
  • New Member
  • 3 replies
  • August 29, 2022

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


Forum|alt.badge.img+3
  • New Member
  • 3 replies
  • August 29, 2022
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


Andy
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 237 replies
  • August 29, 2022

@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. 


Forum|alt.badge.img+3
  • Author
  • Member
  • 7 replies
  • August 29, 2022

@Jens @Andy 

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


Andy
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 237 replies
  • August 29, 2022

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


Forum|alt.badge.img+3
  • New Member
  • 3 replies
  • August 29, 2022

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.


Forum|alt.badge.img+3
  • Author
  • Member
  • 7 replies
  • August 30, 2022

@Andy  @Jens 

I will share more detailed logs.


Forum|alt.badge.img+3
  • Author
  • Member
  • 7 replies
  • August 30, 2022

@Andy @Jens 

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

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


Jens
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • 182 replies
  • August 30, 2022

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 :) 


Forum|alt.badge.img+3
  • Author
  • Member
  • 7 replies
  • August 30, 2022

@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?


Cesar
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • 65 replies
  • August 30, 2022

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`
 


Forum|alt.badge.img+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.


Cesar
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • 65 replies
  • August 30, 2022

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.


Cesar
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • 65 replies
  • August 30, 2022

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.


Cesar
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • 65 replies
  • August 30, 2022

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


Cesar
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • 65 replies
  • Answer
  • August 31, 2022

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


Forum|alt.badge.img+3
  • Author
  • Member
  • 7 replies
  • August 31, 2022

@Cesar 

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


Forum|alt.badge.img+1
Cesar wrote:

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!


Forum|alt.badge.img

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.


Forum|alt.badge.img+2
  • New Member
  • 3 replies
  • October 11, 2022

having the same experience as Syed

(iOS 15.4 (physical device), Flutter v2.10.1, purchases_flutter: 4.2.1 and 4.3.0, AppStore Connect)

→ ProductIDs match RevCat & App Store Connect, config includes setting usesStoreKit2IfAvailable to false

→ In-App Purchases/Subscriptions status is Ready to Submit

→ Paid Apps Agreement Signed

→ Also tried making a new productID

→ NOT using a StoreKit Configuration File

→ API keys added, SDK configured.

@sal and @Turan Gurler is setting usesStoreKit2IfAvailable to false all you did? Are you all on a newer version of Flutter?

I also tried logging in on a new user account with a new appUserId for the SDK.

ALSO, adding my own Store Kit Configuration in Xcode did let me call the iOS purchase sheet but not sure if adding that config has an impact on the RevCat side.

 


Forum|alt.badge.img+2
  • New Member
  • 3 replies
  • October 12, 2022
normal wrote:

having the same experience as Syed

(iOS 15.4 (physical device), Flutter v2.10.1, purchases_flutter: 4.2.1 and 4.3.0, AppStore Connect)

→ ProductIDs match RevCat & App Store Connect, config includes setting usesStoreKit2IfAvailable to false

→ In-App Purchases/Subscriptions status is Ready to Submit

→ Paid Apps Agreement Signed

→ Also tried making a new productID

→ NOT using a StoreKit Configuration File

→ API keys added, SDK configured.

@sal and @Turan Gurler is setting usesStoreKit2IfAvailable to false all you did? Are you all on a newer version of Flutter?

I also tried logging in on a new user account with a new appUserId for the SDK.

ALSO, adding my own Store Kit Configuration in Xcode did let me call the iOS purchase sheet but not sure if adding that config has an impact on the RevCat side.

 

UPDATE -_- working now… already had signed the Paid Apps Agreement and filled out my banking info -- BUT my banking info was still in the “processing” state so just had to wait overnight.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings