Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity IAP does not work on UWP platform

Discussion in 'Unity IAP' started by dcheglakov, May 5, 2021.

  1. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    Hi,

    Steps to reproduce:
    1. Select UWP platform and build the game
    2. Test locally with mocking UWP store (works fine)
    3. Upload app bundle to Windows Store
    4. Make it available but hidden - follow the guide
    5. Add IAP in the Windows Store - follow the guide
    6. Download game and test IAP
    7. IAP does not work
    Here is the error in Unity.log
    Code (CSharp):
    1. Unity Purchasing: UnityIAPWin8:PollForProducts() Exception (persistent = True, delay = 0, retry = 30), exception: Exception of type 'System.Exception' was thrown.
    2. UnityEngine.Logger:LogError(String, Object)
    3. UnityEngine.Purchasing.WinRTStore:logError(String)
    4. UnityEngine.Purchasing.Default.<PollForProducts>d__10:MoveNext()
    5. System.AsyncCallback:Invoke(IAsyncResult)
    6. System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
    7. System.Runtime.CompilerServices.MoveNextRunner:Run()
    8. System.Action:Invoke()
    9. System.AsyncCallback:Invoke(IAsyncResult)
    10. System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
    11. System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run(Task, Boolean)
    12. System.Threading.Tasks.Task:FinishContinuations()
    13. System.Threading.Tasks.Task:Finish(Boolean)
    14. System.Threading.Tasks.Task`1:TrySetException(Object)
    15. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetException(Exception)
    16. UnityEngine.Purchasing.Default.<DoRetrieveProducts>d__11:MoveNext()
    17. System.AsyncCallback:Invoke(IAsyncResult)
    18. System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
    19. System.Runtime.CompilerServices.MoveNextRunner:Run()
    20. System.Action:Invoke()
    21. System.AsyncCallback:Invoke(IAsyncResult)
    22. System.Threading.OSSpecificSynchronizationContext:InvocationEntry(IntPtr)
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  3. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    Unity 2020.3.6f1
    Unity IAP 3.1.0
     
  4. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I am checking with the team here on current status on UWP. The core engineer working on this feature is out of the office this week, so replies may be delayed.
     
  6. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    OK, thanks.
     
  7. Oscar-Tsang

    Oscar-Tsang

    Joined:
    Nov 7, 2012
    Posts:
    84
    Unity IAP is not working on UWP, this problem has been over two years. Suggest you roll back to Unity 2017. Since Unity 2018, the bugs cause you unable to read the online IAP item, so Unity IAP is unable to use on UWP anymore.
     
    markoal likes this.
  8. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    Hi @Oscar-Tsang, thank you for your reply, but for me, it’s not an option, currently I'm using Unity 2020 and it's impossible to roll back.

    Also, I want to hear the Unity team statement on this matter. @JeffDUnity3D any news?
     
  9. JariHuomo

    JariHuomo

    Joined:
    Feb 8, 2013
    Posts:
    48
    Same error message with 3.2.1 , downgraded back to 2.2.2 . It has been working fine for me.
     
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    UWP works with 2.2.2 for you? We are still investigating.
     
  11. JariHuomo

    JariHuomo

    Joined:
    Feb 8, 2013
    Posts:
    48
    il2cpp in-app purchasing package 2.2.2 and in-app version 2.2.7 combo is working for me.
    Most of the time, I get time to time feedback about in-app purchase problems but can be Microsoft Store bugs too :)

    with mono builds the latest working was 1.20 , 1.23 did not build. I did test some 2.x version and those did not build either with mono.
     
  12. JariHuomo

    JariHuomo

    Joined:
    Feb 8, 2013
    Posts:
    48
    Support for Microsoft Store subscriptions would be nice someday, not too hard to implement I would guess (I know you have limited resources :)))
     
    JeffDUnity3D likes this.
  13. achimeno

    achimeno

    Joined:
    Nov 13, 2014
    Posts:
    16
    Does Unity IAP work for UWP?
     
  14. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    704
    It does, I've two games on the MS store that appear to still work.

    However, there are limitations.

    No support for subscriptions (if I recall) and it only supports public audiences, not private.

    https://forum.unity.com/threads/microsoft-store-iap-initialisation-exception.1081247/#post-6978689

    There might be other limitations, but I'm not aware of them.

    Unity have hinted at changes on the IAP\UWP front, but haven't clarified what they are. It could be dropping support for it or improving (as it's using an old Windows API and hasn't been updated in a long time)