Solved

Flutter - Android error message: The requested item is not available for purchase


Badge +2

I am new and am testing this Framwork using weekly, monthly, yearly subscriptions.
I have followed the whole document which in great detail indicates how to set up the Apple Store and Google Play.
As code I am using the one from the example provided for Flutter developers.
With Apple Store everything works, while (with the same code) with Google Play I get the error message: "The requested item is not available for purchase".
But in the Google Play store are all "active" subscriptions.
In RevenueCat the Entitlements, Offerings, Products are regularly configured.
I just can't figure out where I may have gone wrong as I have followed all the steps and am using the code provided as an example.

 

Debug Console:

V/AudioManager( 3198): playSoundEffect   effectType: 0

 

 

V/AudioManager( 3198): querySoundEffectsEnabled...

 

 

I/flutter ( 3198): &&&&&&&&&&&&& purchase info are: Package{identifier: $rc_weekly, packageType: PackageType.weekly, product: Product{identifier: shopping_weekly, description: All features for one week, title: Shopping Weekly (com.carlosacchetti.shopping_app (unreviewed)), price: 0.5, priceString: 0,50 €, currencyCode: EUR, introductoryPrice: null}, offeringIdentifier: default}

 

 

D/[Purchases] - DEBUG( 3198): ℹ️ Vending Offerings from cache

 

 

D/[Purchases] - DEBUG( 3198): 💰 Purchase started - product:  com.revenuecat.purchases.models.ProductDetails@fa146fdd  - offering: default

 

 

D/[Purchases] - DEBUG( 3198): 💰 Purchasing product: shopping_weekly

 

 

D/[Purchases] - DEBUG( 3198): ℹ️ Checking if cache is stale AppInBackground false

 

 

D/ZrHung.AppEyeUiProbe( 3198): stop checker.

 

 

W/ActivityThread( 3198): handleWindowVisibility: no activity for token android.os.BinderProxy@d8e953a

 

 

D/ZrHung.AppEyeUiProbe( 3198): notify runnable to start.

 

 

V/ActivityThread( 3198): Skipping new config:{1.15 222mcc10mnc [it_IT] ldltr sw320dp w320dp h610dp 540dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 0, 0) mAppBounds=Rect(0, 90 - 1080, 2150) mWindowingMode=fullscreen mActivityType=undefined} nonFullScreen=0 suim:1 s.8}, config:{1.15 222mcc10mnc [it_IT] ldltr sw320dp w320dp h610dp 540dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 0, 0) mAppBounds=Rect(0, 90 - 1080, 2150) mWindowingMode=fullscreen mActivityType=undefined} nonFullScreen=0 suim:1 s.8} for app:com.carlosacchetti.shopping_app

 

 

V/ActivityThread( 3198): callActivityOnCreate

 

 

I/HwPhoneWindow( 3198): updateLayoutParamsColor false mSpecialSet=false, mForcedNavigationBarColor=false, navigationBarColor=0, mNavBarShow=false, mIsFloating=false

 

 

I/HwPhoneWindow( 3198): updateLayoutParamsColor true mSpecialSet=false, mForcedNavigationBarColor=false, navigationBarColor=ff000000, mNavBarShow=false, mIsFloating=false

 

 

D/ActivityThread( 3198): add activity client record, r= ActivityRecord{bd02f48 token=android.os.BinderProxy@d8e953a {com.carlosacchetti.shopping_app/com.android.billingclient.api.ProxyBillingActivity}} token= android.os.BinderProxy@d8e953a

 

 

D/ZrHung.AppEyeUiProbe( 3198): notify runnable to start.

 

 

D/OpenGLRenderer( 3198):   HWUI Binary is  enabled

 

 

D/ZrHung.AppEyeUiProbe( 3198): stop checker.

 

 

I/HiTouch_HiTouchSensor( 3198): enabledInPad = false,isPcCastMode = false

 

 

D/HiTouch_PressGestureDetector( 3198): onAttached, package=com.carlosacchetti.shopping_app, windowType=1, mHiTouchRestricted=false

 

 

D/mali_winsys( 3198): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000

 

 

D/OpenGLRenderer( 3198):   HWUI Binary is  enabled

 

 

I/ViewRootImpl( 3198): jank_removeInvalidNode all the node in jank list is out of time

 

 

D/ZrHung.AppEyeUiProbe( 3198): Current Activity:false

 

 

D/ZrHung.AppEyeUiProbe( 3198): not watching, wait.

 

 

W/ProxyBillingActivity( 3198): Activity finished with resultCode 0 and billing's responseCode: 4

 

 

D/ZrHung.AppEyeUiProbe( 3198): notify runnable to start.

 

 

D/ZrHung.AppEyeUiProbe( 3198): restart watching

 

 

W/InputMethodManager( 3198): startInputReason = 1

 

 

W/BillingHelper( 3198): Couldn't find purchase lists, trying to find single data.

 

 

W/BillingHelper( 3198): Received a bad purchase data.

 

W/BillingHelper( 3198): Couldn't find single purchase data as well.

 

 

E/[Purchases] - ERROR( 3198): 🤖‼️ BillingWrapper purchases failed to update: DebugMessage: . ErrorCode: ITEM_UNAVAILABLE.null

 

 

E/[Purchases] - ERROR( 3198): 🤖‼️ The product is not available for purchase.

 

 

D/ZrHung.AppEyeUiProbe( 3198): stop checker.

 

 

I/flutter ( 3198): PlatformException(5, The product is not available for purchase., {code: 5, message: The product is not available for purchase., readableErrorCode: ProductNotAvailableForPurchaseError, readable_error_code: ProductNotAvailableForPurchaseError, underlyingErrorMessage: Error updating purchases. DebugMessage: . ErrorCode: ITEM_UNAVAILABLE., userCancelled: false}, null)

 

 

D/ZrHung.AppEyeUiProbe( 3198): notify runnable to start.

 

 

W/InputMethodManager( 3198): startInputReason = 1

 

 

D/ViewRootImpl[ProxyBillingActivity]( 3198): surface should not be released

 

 

D/ActivityThread( 3198): Remove activity client record, r= ActivityRecord{bd02f48 token=android.os.BinderProxy@d8e953a {com.carlosacchetti.shopping_app/com.android.billingclient.api.ProxyBillingActivity}} token= android.os.BinderProxy@d8e953a

 

 

W/libEGL  ( 3198): EGLNativeWindowType 0x74cbbff010 disconnect failed

 

icon

Best answer by ryan 22 July 2021, 21:37

I notice that the name of app is com.cxxxxxx.myapp (unreviewed) and not only com.cxxxxxx.myapp

Can this to be a problem?

Your app will need to be reviewed and published on a closed track before you can test purchases, that could be part of the problem.

View original

11 replies

Userlevel 1
Badge +1

Hey @Carlo Sacchetti

Thanks for attaching some logs!

Looking through the logs I see the error  ITEM_UNAVAILABLE. The :robot_face: emoji indicates this is an error from Google, so it isn’t coming from RevenueCat. 

The error ITEM_UNAVAILABLE Indicates that the product is not available for purchase by the device or user( https://docs.revenuecat.com/docs/errors#-item_unavailable).


Here is a stack flow overflow article ( https://stackoverflow.com/questions/13117081/the-item-you-requested-is-not-available-for-purchase ) that has a bunch of solutions that have worked for a bunch of developers!

Let us know back here if one of those solutions worked for you.

Badge +2

Thank you very much for your prompt reply.

Probably the solution is this

“please check if your using same test account mail id or not”

but I'm not very familiar with Android phones (I've always used iOS) I don't know how to check if my account matches.
Furthermore, the address that is possibly on the phone is sufficient that it is among the email addresses that I put in the Alpha version Tester or must it be somewhere else in the console?

Thanks for your patience

Badge +2

Excuse the stupid question. But how do you check in your Android phone which is the mail id account

Userlevel 1
Badge +1

Hey @Carlo Sacchetti,

You’ll want to make sure you are signed into Google Play Store on your device with the same account as you registered as a tester. This is how you can check is if you are using the same test account mail id or not. 

Badge +2

This issue is resolved now?

https://github.com/RevenueCat/purchases-flutter/issues/93

Badge +2

I checked but  the email with I signed into Google Play Store on my device is the same account as you registered as a tester.

I don’t understand where is the mistake. IOS work fine in device. With storeKit and simulator I have same problem but the important is on device.

Badge +2

I notice that the name of app is com.cxxxxxx.myapp (unreviewed) and not only com.cxxxxxx.myapp

Can this to be a problem?

Userlevel 2
Badge +5

I notice that the name of app is com.cxxxxxx.myapp (unreviewed) and not only com.cxxxxxx.myapp

Can this to be a problem?

Your app will need to be reviewed and published on a closed track before you can test purchases, that could be part of the problem.

Badge +2

But I read that is not necessary that the app is reviewed but it can to be in draw state in closed track. In any case I wait  for review and I try again.

Badge +2

After the app passed the review everything worked perfectly. I have done various tests and I would have to ask some questions:
1. Is it normal that after subscribing with a Device with an account, if I install the app on another Device that has the same account, I immediately enable the subscription without the need to restore? This way I never use restore.
I have not done anything in particular so I think the default value is set which is "Transfer purchases".
There is a way to better understand how it works and how you can set the various behaviors because from the doc I have not been able to understand this topic well.
In my app there are two simple subscriptions (monthly and yearly) and I have no special needs (there is no login or anything else in the app) so I opted to have RevenueCat create the user's ID automatically.
2. I state that both with iOS Device and Android Device everything works fine. As for the Android emultor I can regularly test the in app purchase (emulators with Google play services), with the iOS emulator (with iOS 14.0) I have difficulty making it work with the storeKit. I followed the explanations to configure it but it shows that I have done something wrong. One step that I didn't understand is that of duplicating the Configuration.storekit. Why is it necessary to duplicate it if you can select the first one in the next step? If you have any advice on mistakes that other users have made previously that prevented the emulator from working properly with storekit, I welcome it.
Thanks for your attention

Userlevel 2
Badge +5

Glad you were able to get it working! I saw some other topics posted for your other questions (thanks!) so will move those discussions there.

Reply