Search Unity

Bug NoProductsAvailable in TestFlight : Any idea why?

Discussion in 'Unity IAP' started by spaccetime, Mar 14, 2023.

  1. spaccetime

    spaccetime

    Joined:
    Jul 14, 2020
    Posts:
    7
    Hello Community,

    We managed to make IAP working in TestFlight, but then had to create a new AppId in AppStoreConnect. After switching to the new AppId we are encountering NoProductsAvailable.

    - Paid Agreement is done
    - InAppPurchase Products are in Ready to Submit
    - The ProductId's are matching the ones we use for builder.AddProduct(product_id, ProductType.Consumable)
    - UnityServices is initialised before we initialise UnityPurchasing
    - Version 4.7.0

    Does anyone have an idea what we might have forgotten? Is there something like a checklist for this? We've seen other topics with this issue, but couldn't find any solution yet.
     
  2. glenhunter

    glenhunter

    Unity Technologies

    Joined:
    Apr 2, 2019
    Posts:
    92
    Hi there!

    You will need to also ensure your bundle identifier in Unity and Xcode matches the identifier for your app on AppStoreConnect.

    To test production in app purchases your first in-app purchase must be submitted with a new app version. Subsequent IAP configuration changes/additions will not require a new app version.
     
  3. spaccetime

    spaccetime

    Joined:
    Jul 14, 2020
    Posts:
    7
    Hi @glenhunter

    The bundle_id is the same in both unity and the appstoreconnect. I think if they weren't the same TestFlight won't be able to link the ios-build to the appstoreconnect-app.

    When uploading to TestFlight we use a new version - like 5.0 .. 5.1 .. 5.2

    Very, very strange .. why this isn't working.
     
  4. saxahan

    saxahan

    Joined:
    Mar 16, 2023
    Posts:
    3
    So many people have the same problem right now.
    https://forum.unity.com/threads/unavailable-product.1412151/

    Everything is checked on Apple side and just fine. Maybe you miss something on unity iap package. For example, Apple's StoreKit may has changed backends and unity iap is not fully integrated yet?
     
    spaccetime likes this.
  5. at_nitro

    at_nitro

    Joined:
    Apr 27, 2022
    Posts:
    3
    Hi, we're facing this same issue too and have exhausted pretty much all the sane explanations and potential fixes.

    One thing to note, this issue has been brought up on the Apple forums too (https://developer.apple.com/forums/thread/726252) just a couple of days ago and judging by the amount of views and messages that thread has received, it would seem this is an ongoing issue on Apple's side. Unfortunately they have not acknowledge it as such yet.
     
    spaccetime likes this.
  6. spaccetime

    spaccetime

    Joined:
    Jul 14, 2020
    Posts:
    7
    I'm not familiar with the apple-api, but it would be very useful if apple or the iap-package can provide more detailed message. I see the developers have already integrated a listener OnInitializeFailed(InitializationFailureReason error, string? message) - this is great! But currently the message for NoProductsAvailable is empty. Or maybe introducing further Enum options.

    More detailed message can help developers and package-users debug quicker. Otherwise people try over and over with further builds and have zero guidelines.
     
  7. saxahan

    saxahan

    Joined:
    Mar 16, 2023
    Posts:
    3
    Quick info for you guys. I released on appstore today to see in app products are available. Yes they all became available now. But only store version not on test flight.
     
    spaccetime likes this.
  8. at_nitro

    at_nitro

    Joined:
    Apr 27, 2022
    Posts:
    3
    Unfortunately in this case the native iOS side StoreKit SKProductRequest and more specifically its respective SKProductResponse only contains an array of product details and an array of invalid product IDs.

    Unity could theoretically wrap this lack of valid product details into a slightly more informative error but without any error codes from StoreKit's side, "NoProductsAvailable" pretty much describes the entirety of information that StoreKit is returning: That none of the product IDs requested from Apple's servers returned valid product details.
     
    spaccetime likes this.
  9. spaccetime

    spaccetime

    Joined:
    Jul 14, 2020
    Posts:
    7
    Part of the problem is on the Apple side. They introduced a fix and now the Initialisation is working, but the ProductPurchase doesn't - it returns PurchaseFailureReason.Unknown

    Other developers are experiencing this too - https://developer.apple.com/forums/thread/726675

    Hint for people experiencing those issues - it can be problem on the Apple side - so you should most probably wait for them to fix it. Rebuilding and publishing further builds may be redundant.
     
  10. at_nitro

    at_nitro

    Joined:
    Apr 27, 2022
    Posts:
    3
    Same change happened on our side, product details are now returning successfully in the sandbox environment but purchase attempts fail with a "This item is not available." error.

    This issue also seems to be reported by others so definitely still an ongoing Apple issue. Not much to do here but wait.
     
  11. NoPants_

    NoPants_

    Joined:
    Apr 23, 2014
    Posts:
    59
    I'm still not seeing any orders/localizedPriceStrings working in TestFlight or production, but I checked one of my older games running an older version of unity purchasing, and it still works fine. It makes me wonder if I should try downgrading from 4.7 and seeing if it fixes things.
     
  12. NoPants_

    NoPants_

    Joined:
    Apr 23, 2014
    Posts:
    59
    Ok, you can disregard me, I got my issue figured out. I have a custom data model to store products with a unified ID, and I had the wrong app store in the config. After adding AppleAppStore.Name, it all works fine

    Code (CSharp):
    1. public IDs GetId()
    2.         {
    3.             return new IDs()
    4.             {
    5.                 {StoreId, GooglePlay.Name },
    6.                 {StoreId, AppleAppStore.Name },  <--- didn't have this
    7.                {StoreId, MacAppStore.Name }
    8.            };
    9.        }