Search Unity

Resolved Amazon: Purchasing failed to initialize. Reason: NoProductsAvailable

Discussion in 'Unity IAP' started by FlyingSquirrels, Nov 10, 2020.

Thread Status:
Not open for further replies.
  1. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    83
    Unity: 2019.4.5f1
    UnityIAP: V2.2.0

    We're having a problem with Amazon IAP - init failure.

    We've tried Unity V2.0.0 and the most recent V2.2.0 with the same results. On Logcat we see the following:

    Purchasing failed to initialize. Reason: NoProductsAvailable
    Unavailable product sku1-sku1
    Unavailable product sku2-sku2
    Unavailable product sku3-sku3
    IAP initialisation failed: NoProductsAvailable


    All the products are the Amazon store are set the 'LIVE'.

    This used to work but suddenly stopped after a Unity update or a Unity IAP update.
    Can anyone help us, please?

    Thank you.
     
  2. Grinchi

    Grinchi

    Joined:
    Apr 19, 2014
    Posts:
    130
    Same here :(
     
    FlyingSquirrels likes this.
  3. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Did you have it working with a previous IAP version? Which version?
     
  4. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    83
    The latest version that works for us was V1.23.5.
     
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You will want to stay with that version for now if it's working for you while we investigate.
     
  6. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    83
    Is there a way to get that package back, please?
     
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  8. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    83
    Thank you @JeffDUnity3D. We tried several versions but IAPs still fail on Amazon. We are currently on Unity 2019.4.5f1. Could that be related as we updated both Unity and IAP plugin at the same time?
     
  9. Grinchi

    Grinchi

    Joined:
    Apr 19, 2014
    Posts:
    130
    I think thats not a problem. I have 2 games on amazon first game was published like 3 years ago and InApps are working great on all versions even on latest one. But the second game i have published like 2 month ago and still cant make it work using any SDK even the old old game iap plugin :(
     
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I might recommend using the same version of Unity and IAP that you originally published on Amazon without issue.
     
  11. Grinchi

    Grinchi

    Joined:
    Apr 19, 2014
    Posts:
    130
    @JeffDUnity3D Can InAPP team review our problem ? registering new game and adding iap and test it will be really appreciated.
     
  12. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Are you not able to follow my recommendation? We would not have a quick answer for you.
     
  13. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    83
    Thanks, @JeffDUnity3D. We've downgraded the IAP version (V2.0.0) and the Unity version (V2019.3.11) but we still can't get it to work again on Amazon (works fine on Google Playstore)

    Have you confirmed this on your end? Thank you.
     
  14. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    So if it worked for you previously and you didn't make any code changes and tested with the same versions, that would imply a change on the Amazon side that we will need to test.
     
  15. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    83
    Thank you. Would you have a rough ETA from your end?
     
  16. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  17. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    83
    OK. We'll create a sample project a submit it here if it still fails.

    In that case, we will also be trying their own plugin and report results too.

    Thank you.
     
    JeffDUnity3D likes this.
  18. Grinchi

    Grinchi

    Joined:
    Apr 19, 2014
    Posts:
    130
    I have switched to use Amazon Plugin as Unity IAP is dead for now :)
     
  19. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Is that working on your Pixel device? Can you provide the link to the Amazon plugin that is working for you?
     
  20. Grinchi

    Grinchi

    Joined:
    Apr 19, 2014
    Posts:
    130
    Hey @JeffDUnity3D this is what amazon test team wrote to me when i was using unity iap(does not matter which version).

    We've determined that your app uses an older version of the IAP SDK. This may result in inconsistent behavior of IAP on the customer's device. We would suggest that you update your code to IAPv2.0. You may download the latest SDK from https://developer.amazon.com/public/resources/development-tools/sdk

    I am using the resouce they provided and waiting for test result. i think it will be good if someone will just for testing purouses will register test app with test iaps on amazon store and tests why your SDK does not work as it was working before. there are too many customers who are paying on Amazon appstore also :slight_smile:

    Thanks
     
  21. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    83
  22. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    But it's for Amazon devices, correct? And it's using a much older version of Unity IAP.
     
  23. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    83
    Yes, it's just for Amazon devices. Unfortunately, it's not well documented or maintained either so at this point, we don't have a solution for Amazon IAPs as neither plugin seems to work.

    This was my main concern a few days ago during the UDP virtual meeting where Unity promised the IAP plugin will work on all these other stores automatically. If it doesn't work for so long on one of the bigger 'other' stores (Amazon) how will it work on all the other smaller stores?
     
  24. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    What other smaller IAP supported stores are you referring to? You mentioned UDP, not IAP. They are separate services. We will be looking into Amazon support, no ETA yet however.
     
  25. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    83
    I understand they're separate services but don't they overlap? I was thinking of other stores like One store, Galaxy and Huawei to name a few.
     
  26. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Those are UDP supported stores, not IAP. Please post in the UDP forum https://forum.unity.com/forums/unity-distribution-portal-udp.352/ . Amazon is not a supported UDP store.
     
  27. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    83
    OK understood. We can delete the last few comments so we don't dilute the thread if you prefer. I'll stop interrupting you too maybe you can bump up that Amazon support from your backlog ;)
     
  28. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry, once there are embedded replies, it's not possible to delete them. But it's ok. We confirmed that the Amazon plugin would not be expected to work on a Google Pixel device.
     
    FlyingSquirrels likes this.
  29. Grinchi

    Grinchi

    Joined:
    Apr 19, 2014
    Posts:
    130
    did anyone test latest version if its working for amazon appstore ? cant figure out why they are rejecting apps.
     
  30. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Amazon rejected your app? What is their rejection reason?
     
  31. Grinchi

    Grinchi

    Joined:
    Apr 19, 2014
    Posts:
    130
    In Apps not working. thats what they are saying. just for testing can you post pro-guard setting for keeping all Unity IAP classes and dependences ?
     
  32. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    As discussed, it appears that Amazon may have changed their API. At this time, Unity IAP may not be expected to work on Amazon. You would not want to submit to the Amazon store if IAP is not working in your testing. We will look into this in the new year.
     
    Last edited: Dec 29, 2020
  33. Trojan95m3

    Trojan95m3

    Joined:
    Oct 12, 2013
    Posts:
    12
    We are facing a similar issue. We upgraded Unity to 2019.4.5f1 and Amazon purchasing started failing. Unity IAP version remained the same at 2.0.6.

    The debug output we see is
    Purchase Failed: dmgems3 Reason: Unknown

    Is the issue with 2019.4.5f1?
     
  34. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I doubt it is Unity version related. Can you provide the device logs?
     
  35. Trojan95m3

    Trojan95m3

    Joined:
    Oct 12, 2013
    Posts:
    12
    Here is the logcat from launch to purchase request. The item trying to be purchased is dmgems3. Let me know if you need something else.
     

    Attached Files:

  36. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  37. Trojan95m3

    Trojan95m3

    Joined:
    Oct 12, 2013
    Posts:
    12
    I posted that in my first post. Reason is Unknown.
     
  38. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it, sorry about that. Yeah, others have reported similar issues on Amazon. My suspicion is a change in the Amazon purchasing API, we haven't had a chance to look into it yet.
     
  39. Trojan95m3

    Trojan95m3

    Joined:
    Oct 12, 2013
    Posts:
    12
    We have other products that are working fine (in 2019.1.8). Our previous version of this app that was in 2019.1.8 works fine. Only after updating to 2019.4.5 we are facing this issue.
     
  40. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Interesting, sounds like you'll need to stay with the previous version of Unity for now. I have never heard of a Unity version affecting the behavior of IAP. To confirm, you didn't upgrade IAP in addition to upgrading Unity? Are you able to see any differences in the logs between the two Unity versions that stand out?
     
  41. Trojan95m3

    Trojan95m3

    Joined:
    Oct 12, 2013
    Posts:
    12
    Hi Jeff,
    We were able to capture the logs from the previous version where it works and the latest version where it fails. I've attached both.

    The interesting part is after IapTimeFromStartToFinishPurchaseItemCommandCompleted event comes. In the log where it fails, line 58534, this is followed by:
    D/Unity Purchasing Amazon(13340): onPurchaseResponse
    I/Unity Purchasing Amazon(13340): FAILED

    where it succeeds, line 51316, this is not there. It goes on to do this (line 51358):
    I/ActivityManager( 931): START u0 {cmp=com.amazon.venezia/com.amazon.mas.client.iap.purchase.PurchaseActivity

    Does this help?
     

    Attached Files:

  42. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    It is not Unity version related, it is IAP version related as I mentioned. Your first log is using IAP 1.23.1 and the second is 2.2.5 We are aware of the issue and looking into it. For now, you'll want to use 1.23.1
     
  43. Trojan95m3

    Trojan95m3

    Joined:
    Oct 12, 2013
    Posts:
    12
    When we look at our previous version using Unity 2019.1.8 the package manager says we are using 2.0.6 but as you saw in the log the game is actually using 1.23.1. Do you know how that would happen? I'm guessing when we upgraded Unity to 2019.4.5 it triggered something that made it actually use 2.0.6.

    Is it worth trying any previous version like 2.0.0, 2.0.1, etc?
    Is there a way to go back to using 1.23.1. We have this in the Plugins/UnityPurchasing folder. Is that somehow ignored?
     
  44. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Unity IAP requires two components, the asset package (1.23.1 for example) and the corresponding In App Purchasing library in Package Manager (2.0.6). The latest combination is 2.2.5/2.2.1. So you need to check both. You can view the asset version from menu Window/Unity IAP/IAP Updates.. You can install previous versions from here. Make sure to make a full project backup before changing any versions https://forum.unity.com/threads/unity-iap-previous-versions.527432/
     
  45. Trojan95m3

    Trojan95m3

    Joined:
    Oct 12, 2013
    Posts:
    12
    I just checked the current version that doesn't work and it is using 1.23.1. It does the same thing I mentioned in an earlier post where after IapTimeFromStartToFinishPurchaseItemCommandCompleted event comes it gives FAILED response. So the asset package doesn't appear to be the issue. Something is triggering the onPurchaseResponse.
     

    Attached Files:

  46. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    That is correct. Please review the previous posts on this thread https://forum.unity.com/threads/ama...son-noproductsavailable.1003094/#post-6575293
     
  47. Trojan95m3

    Trojan95m3

    Joined:
    Oct 12, 2013
    Posts:
    12
    Ok. You think an Amazon change would particularly affect this combination of Unity 2019.4.5 and IAP 1.23.1? We have other applications in 2019.1.8 / 1.23.1 that work fine.
     
  48. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I don't think the Unity version matters, as I've stated. It's more likely the IAP Asset + Package Manager versions that I've mentioned. We still need to test. Perhaps the version of Unity that you have has a different default for the Package Manager package? Otherwise, you should use the versions that work for you. You just mentioned that 2019.1.8 and 1.23.1 work for you, perhaps you should stick with those versions.
     
  49. Trojan95m3

    Trojan95m3

    Joined:
    Oct 12, 2013
    Posts:
    12
    First thanks for all the help. You've been very responsive which has been great!

    Neither IAP Asset or Package Manager versions changed for us. We had to upgrade Unity from 2019.1.8 because of Apple and UIWebKit issue. So we're stuck right now. We are trying to reproduce in a small test app. Will let you know how that goes.
     
    nicholasr and JeffDUnity3D like this.
  50. Trojan95m3

    Trojan95m3

    Joined:
    Oct 12, 2013
    Posts:
    12
    Hi Jeff,

    We created a test app using 2019.4.5 and 1.23.1 and it is working correctly. So that would lead me to believe something is wrong in our app. Again the issue is that Unity Purchasing Amazon is giving an onPurchaseResponse with FAILED callback when it shouldn't be. Any help on why that might be would be greatly appreciated.
     
Thread Status:
Not open for further replies.