Search Unity

[Solved] Initialization on UWP

Discussion in 'Unity IAP' started by dani-unity-dev, Nov 15, 2016.

Thread Status:
Not open for further replies.
  1. dani-unity-dev

    dani-unity-dev

    Joined:
    Feb 22, 2015
    Posts:
    174
    Hi,

    I'm trying to test the IAP functionalities for our Windows Store build (UWP). When using billing mock the initialization is successful. When trying from the build the initialization process never completes. There's no callback invoked, not even the failure one. Since the App is not published, I was expecting an error of type InitializationFailureReason.AppNotKnown but that doesn't happen...

    Is that the expected behaviour?

    Thank you
     
  2. bucho2

    bucho2

    Joined:
    Jan 3, 2016
    Posts:
    13
    Hi,

    did you ever solve this problem?
     
  3. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
  4. bucho2

    bucho2

    Joined:
    Jan 3, 2016
    Posts:
    13
    Hi,

    thanks...

    it's a windows 10 UW app
    I'm using unity 5.5p 0p4 ... with unity IAP 1.9.3 ...
    and the app is published but hidden...

    but it's not working... desktop and mobile... :(


    after initializing (same code as for Android and IOS)... I don't get any callbacks (not OnInitialized nor OnInitializeFailed)...

    here is the console output... maybe that helps...?

    --------------------------------
    VS-output for Release and Debug x86:

    Exception thrown: 'System.ArgumentOutOfRangeException' in mscorlib.ni.dll
    Exception thrown: 'System.ArgumentOutOfRangeException' in mscorlib.ni.dll
    UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 0, productsOnly = False

    and a bit later

    UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 10000, productsOnly = False
    UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 20000, productsOnly = False


    --------------------------------
    VS-output for Master x86:

    ERROR:ChkHr(spStoreCommerce->Initialize(HStringReference(wszCV).Get())) (0x803f6107) [Windows::ApplicationModel::Store::CurrentAppFactory::GetStoreCommerce]
    ERROR:ChkHr(GetStoreCommerce(&spStoreCommerce)) (0x803f6107) [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    Exception thrown: 'System.Exception' in MyApp.McgInterop.dll
    Exception thrown: 'System.Exception' in System.Private.CoreLib.dll
    'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\mlang.dll'. Skipped loading symbols. Module is native, and native debugging is currently disabled.
    info:LoadListingInformationAsync() invoked. [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    ERROR:ChkHr(spStoreCommerce->Initialize(HStringReference(wszCV).Get())) (0x803f6107) [Windows::ApplicationModel::Store::CurrentAppFactory::GetStoreCommerce]
    ERROR:ChkHr(GetStoreCommerce(&spStoreCommerce)) (0x803f6107) [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    Exception thrown: 'System.Exception' in MyApp.McgInterop.dll
    Exception thrown: 'System.Exception' in System.Private.CoreLib.dll
    The thread 0x6732c has exited with code 0 (0x0).
    The thread 0x673d8 has exited with code 0 (0x0).
    The thread 0x6725c has exited with code 0 (0x0).
    The thread 0x67034 has exited with code 0 (0x0).
    The thread 0x6730c has exited with code 0 (0x0).
    info:LoadListingInformationAsync() invoked. [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    ERROR:ChkHr(spStoreCommerce->Initialize(HStringReference(wszCV).Get())) (0x803f6107) [Windows::ApplicationModel::Store::CurrentAppFactory::GetStoreCommerce]
    ERROR:ChkHr(GetStoreCommerce(&spStoreCommerce)) (0x803f6107) [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    Exception thrown: 'System.Exception' in MyApp.McgInterop.dll
    Exception thrown: 'System.Exception' in System.Private.CoreLib.dll
    info:get_AppId() invoked. [Windows::ApplicationModel::Store::CurrentAppFactory::get_AppId]
    ERROR:ChkHr(spStoreCommerce->Initialize(HStringReference(wszCV).Get())) (0x803f6107) [Windows::ApplicationModel::Store::CurrentAppFactory::GetStoreCommerce]
    ERROR:ChkHr(GetStoreCommerce(&spStoreCommerce)) (0x803f6107) [Windows::ApplicationModel::Store::CurrentAppFactory::get_AppId]
    'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.Security.Authentication.OnlineId.dll'. Skipped loading symbols. Module is native, and native debugging is currently disabled.
    WLID Error: 80070525 info:GetAppReceiptAsync() invoked. [Windows::ApplicationModel::Store::CurrentAppFactory::GetAppReceiptAsync]
    ERROR:ChkHr(spStoreCommerce->Initialize(HStringReference(wszCV).Get())) (0x803f6107) [Windows::ApplicationModel::Store::CurrentAppFactory::GetStoreCommerce]
    ERROR:ChkHr(GetStoreCommerce(&spStoreCommerce)) (0x803f6107) [Windows::ApplicationModel::Store::CurrentAppFactory::GetAppReceiptAsync]
     
  5. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @muchobuchogames

    Were you able to follow the process outlined in the guide in our Manual?
    https://docs.unity3d.com/Manual/UnityIAPWindowsConfiguration.html

    We have also had some users report a delay (of a couple days) before items are actually available to purchase:
    https://forum.unity3d.com/threads/iap-unavailable-product-issue.374734/#post-2779959

    This seems to imply an error in a loop or something that is off by one.
     
  6. Woj_Gabel_FertileSky

    Woj_Gabel_FertileSky

    Joined:
    Jun 18, 2012
    Posts:
    61
    Check the numbers in the manifest file with those from the dashboard. We had the same problem. The numbers were different.
     
  7. george-daters

    george-daters

    Joined:
    Jan 22, 2013
    Posts:
    35
    For any unfortunate soul struggling to get UWP initialization working and stumbling on this thread... As was suggested previously here, there really is a delay of 24-48 hours after finalizing submission and seeing "In the Store" on the dev center dashboard before IAP initialization works. That was our experience anyhow.
     
    zero_null likes this.
Thread Status:
Not open for further replies.