Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

UWP + Il2CPP + .Net 4.6 + IAP 1.19 Failed to initialize

Discussion in 'Unity IAP' started by pasq_, Jul 9, 2018.

  1. pasq_

    pasq_

    Joined:
    Sep 30, 2015
    Posts:
    4
    Hi guys,

    I'm trying to get IAP working for Windows Store but failing miserably so far. The project compiles fine and I can run the game but IAP initialization doesn't seem to finish (the complete callback is not being called). After calling UnityPurchasing.Initialize(), the only thing that I can see in the logs are:

    UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 0, productsOnly = False
    UnityIAPWin8:Building full product list with existing purchases
    UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 10000, productsOnly = False
    UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 20000, productsOnly = False

    The PollForProducts() call seems to be looped forever.

    The app passed certification on Windows Store and I have 1 test IAPproduct published and cleared for sale.

    Is there any bug in the 1.19? I'm trying with 1.20 now, see what happens.
     
  2. yibojiang_tt

    yibojiang_tt

    Joined:
    Jul 5, 2017
    Posts:
    6
    Hey @pasq_,
    Have you figure out the solution.
    I have met the similar question when I try to initialize the IAP. I build with the same backend il2cpp + .NET4.6 + IAP 1.19. And cannot get callbacks from initialized success or failure


    info: (0x80070525) [WinStoreAuth::AuthenticationInternal::CreateGoldenAccountTokenRequest]
    \winstoreauth.cpp(1588)\Windows.ApplicationModel.Store.dll!00007FFA69732122: (caller: 00007FFA6972B876) ReturnHr(14) tid(34f0) 80070525 The specified account does not exist.
    [WinStoreAuth::AuthenticationInternal::CreateGoldenAccountTokenRequest]
    info: (0x80070525) [WinStoreAuth::AuthenticationInternal::CaptureGoldenAccountTicket]
    \winstoreauth.cpp(2090)\Windows.ApplicationModel.Store.dll!00007FFA69732142: (caller: 00007FFA6972B876) ReturnHr(15) tid(34f0) 80070525 The specified account does not exist.
    [WinStoreAuth::AuthenticationInternal::CaptureGoldenAccountTicket]
    info: (0x80070525) [WinStoreAuth::AuthenticationInternal::GetStorePrimaryAccountTicketForUri]
    \winstoreauth.cpp(305)\Windows.ApplicationModel.Store.dll!00007FFA6972B8B7: (caller: 00007FFA6972B569) ReturnHr(16) tid(34f0) 80070525 The specified account does not exist.
    [WinStoreAuth::AuthenticationInternal::GetStorePrimaryAccountTicketForUri]
    ERROR:ChkHr(AuthenticationInternal::GetStorePrimaryAccountTicket( 0, AuthenticationEndpoint::OneStore, PromptType::Silent, false, nullptr, authTicket.GetAddressOf(), providerType, spWebTokenRequestResult.GetAddressOf())) (0x80070525) [CollectionsServiceProxyV6::GetUnfulfilledConsumables]
    ERROR:ChkHr(CollectionsServiceProxyV6::GetUnfulfilledConsumables(bigCatId, pCV, items)) (0x80070525) [Windows::ApplicationModel::Store::GetUnfulfilledConsumablesOperationServer::GetUnfulfilledConsumablesSync]
    ERROR:ChkHr(GetUnfulfilledConsumablesSync( _spStoreCommerceServer->GetAppCatalogId(cv.Get()), cv.Get(), _spStoreCommerceServer->GetProductIdCache(), _spUnfulfilledList.Get())) (0x80070525) [Windows::ApplicationModel::Store::GetUnfulfilledConsumablesOperationServer::DoWork]

     
  3. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,138
    @yibojiang_tt Are you able to test with 1.20? Could you share your purchase script?
     
  4. yibojiang_tt

    yibojiang_tt

    Joined:
    Jul 5, 2017
    Posts:
    6
    @JeffDUnity3D , I was using 1.19, I haven't tried 1.20 yet. I've tested with useMockBillingSystem = true everything works fine. But after I publish the app and in app addons. The initialize doesn't have any callbacks.

    Here's my script for iap initialize.
    Code (CSharp):
    1.  
    2.         var products = new List<CrossPlatformProduct>
    3.         {
    4.             new CrossPlatformProduct(
    5.                 type:UnityEngine.Purchasing.ProductType.Consumable,
    6.                 referenceName:"ten",
    7.                 androidId:"apples_10",
    8.                 amazonId:"apples_10",
    9.                 windowsId:"apples_10"
    10.             ),
    11.             new CrossPlatformProduct(
    12.                 type:UnityEngine.Purchasing.ProductType.Consumable,
    13.                 referenceName:"twenty",
    14.                 androidId:"apples_20",
    15.                 amazonId:"apples_20",
    16.                 windowsId:"apples_20"
    17.             ),
    18.             new CrossPlatformProduct(
    19.                 type:UnityEngine.Purchasing.ProductType.Consumable,
    20.                 referenceName:"thirty",
    21.                 androidId: "apples_30",
    22.                 amazonId:"apples_30",
    23.                 windowsId:"apples_30"
    24.             ),
    25.             new CrossPlatformProduct(
    26.                 type: UnityEngine.Purchasing.ProductType.Subscription,
    27.                 referenceName: "subscription",
    28.                 androidId: "foo.sub1",
    29.                 amazonId: "foo.subscriptions",
    30.                 windowsId: "foo.subscriptions"
    31.             )
    32.             #if UNITY_IOS
    33.             , new CrossPlatformProduct(
    34.                 type:UnityEngine.Purchasing.ProductType.NonConsumable),
    35.                 referenceName: "pack",
    36.                 androidId: null,
    37.                 iosId:"stuffpack",
    38.             #endif
    39.         };
    Code (CSharp):
    1.  
    2.             var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance ());
    3.  
    4.  
    5.             foreach (var xProd in products)
    6.             {
    7.                 builder.AddProduct(xProd.ReferenceName, xProd.ProductType, new IDs
    8.                 {
    9.                     { xProd.IosId, AppleAppStore.Name },
    10.                     { xProd.AndroidId, GooglePlay.Name },
    11.                     { xProd.AmazonId, AmazonApps.Name },
    12.                     { xProd.WindowsId, WindowsStore.Name }
    13.                 });
    14.             }
    15.  
    16.             UnityPurchasing.Initialize (this, builder);
     
    Last edited: Jul 13, 2018
  5. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,138
    Does the app initialize on the other stores, such as Google Play?
     
  6. yibojiang_tt

    yibojiang_tt

    Joined:
    Jul 5, 2017
    Posts:
    6
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,138
    Got it, I will check with the IAP team. FYI, any fixes will go into the next release which is some time out, likely near the end of August or more.
     
  8. yibojiang_tt

    yibojiang_tt

    Joined:
    Jul 5, 2017
    Posts:
    6
    Are there any solutions? Or do I need to wait for the next IAP update for the fixes?
     
  9. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,138
    I haven't tested yet, but from the description, it seems like a fix might be necessary.
     
  10. pasq_

    pasq_

    Joined:
    Sep 30, 2015
    Posts:
    4
    Just to confirm - 1.20 doesn't work either. Does it mean we need to wait until the end of August?
     
  11. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,138
    We have not started work on this issue at this time. It remains to be seen if it will be included in the next release. Due to resource constraints, we are focusing on iOS and Android issues. It is on my task list to test.
     
  12. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,138
    @yibojiang_tt Your error message is different than the behavior described in the initial post. Your error is "The specified account does not exist". Can you confirm that you have created a developer account on the Windows Dashboard, perhaps share a screenshot? Also, you said "The initialize doesn't have any callbacks." You should have coded an OnInitializedFailed and OnInitialized callback, perhaps you meant the initialize isn't calling your existing callbacks, can you confirm?
     
  13. yibojiang_tt

    yibojiang_tt

    Joined:
    Jul 5, 2017
    Posts:
    6
    @JeffDUnity3D , yes, I can confirm that. I already setup the store app and the iaps.
    My class is inherit IStoreListener. And the I have
    void OnInitialized (IStoreController controller, IExtensionProvider extensions) and implemented the public void OnInitialized (IStoreController controller, IExtensionProvider extensions) void OnInitializeFailed (InitializationFailureReason reason) in my purchase class.
    As I mentioned early on, everything works fine in local test mode. The issue happens when I publish to the store to test real purchase.


    upload_2018-7-19_10-54-22.png
     

    Attached Files:

  14. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,138
  15. pasq_

    pasq_

    Joined:
    Sep 30, 2015
    Posts:
    4
    I can also confirm that everything is set up properly:
    - app is added, certified and published
    - IAPs are added, certified and published
    - initialization has defined callbacks OnInitialized and OnInitializeFailed
    - the same code works fine on Android and iOS for many months now

    However, contrary to @yibojiang_tt, I can't even test IAPs locally. Same result, no callback, no products retrieved from the store.
     
  16. yibojiang_tt

    yibojiang_tt

    Joined:
    Jul 5, 2017
    Posts:
    6
    @pasq_, have you set useMockBillingSystem = true. before the initialization code. I think for local IAP test you don't need to publish to the store. The UnityIAP still not working in the real purchase. I ended up writing our own native in-app purchase plugin for windows store.
     
  17. pasq_

    pasq_

    Joined:
    Sep 30, 2015
    Posts:
    4
    @yibojiang_tt, I haven't checked the useMockBillingSystem flag and just gone your way, writing a native code. All works fine now.

    @JeffDUnity3D, if you find the bug in UnityIAP and would like us to test the changes, feel free to ask.
     
  18. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,091
    @yibojiang_tt, @pasq_

    Thanks for reporting this issue. I have passed it along to the team and they are investigating it. Sorry we couldn't get it resolved sooner. I'll post here if we find any workarounds, etc that don't require an updated plugin.
     
  19. nikitacreative

    nikitacreative

    Joined:
    Mar 14, 2017
    Posts:
    1
    Hi, we have similar problem when trying to request products without login in Windows Store for UWP application build using IL2CPP. If user is logged in the WS there is no issue with loading products.

    Log for Unity IAP v1.21.0:
    Code (CSharp):
    1. ERROR:ChkHr(spStoreCommerce->Initialize(cv.GetHStringReference().Get())) (0x803f6107)    [Windows::ApplicationModel::Store::CurrentAppFactory::GetStoreCommerce]
    2.      :  IsActive: false, IsTrial: TRUE, App type: 3, Listner count: 0   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    3.      :  ExpirationDateTime: 1601/1/1 00:00:00   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    4.      :  LicenseManager: VALID   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    5.      :  LicenseInstance: not set    [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    6.      :  UnfulfilledList: VALID  [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    7.      :    <empty list>    [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    8. ERROR:ChkBool(instance != nullptr, ((HRESULT)0x803F6107L))  (0x803f6107)    [Windows::ApplicationModel::Store::Internal::StoreCommerceServer::InitializeIdsFromLicense]
    9. ERROR:ChkHr(InitializeIdsFromLicense()) (0x803f6107)    [Windows::ApplicationModel::Store::Internal::StoreCommerceServer::Initialize]
    10. ERROR:ChkHr(GetStoreCommerce(&spStoreCommerce)) (0x803f6107)    [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    11. Exception thrown at 0x00007FFC18E2A388 in MyGame.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000AF5A4FCB50.
    12. Exception thrown at 0x00007FFC18E2A388 in MyGame.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000AF5A4FDBA0.
    13. The thread 0x6364 has exited with code 0 (0x0).
    14. info:LoadListingInformationAsync() invoked.    [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    15.      :License Info for app MyCompany.MyGame_5.7.0.0_x64__ewn699wwxwmvy: (CV = kn9eWDDdo0CS5ltv.105.2) [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    16. ERROR:ChkHr(spStoreCommerce->Initialize(cv.GetHStringReference().Get())) (0x803f6107)    [Windows::ApplicationModel::Store::CurrentAppFactory::GetStoreCommerce]
    17.      :  IsActive: false, IsTrial: TRUE, App type: 3, Listner count: 0   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    18.      :  ExpirationDateTime: 1601/1/1 00:00:00   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    19.      :  LicenseManager: VALID   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    20.      :  LicenseInstance: not set    [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    21.      :  UnfulfilledList: VALID  [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    22.      :    <empty list>    [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    23. ERROR:ChkBool(instance != nullptr, ((HRESULT)0x803F6107L))  (0x803f6107)    [Windows::ApplicationModel::Store::Internal::StoreCommerceServer::InitializeIdsFromLicense]
    24. ERROR:ChkHr(InitializeIdsFromLicense()) (0x803f6107)    [Windows::ApplicationModel::Store::Internal::StoreCommerceServer::Initialize]
    25. ERROR:ChkHr(GetStoreCommerce(&spStoreCommerce)) (0x803f6107)    [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    26. Exception thrown at 0x00007FFC18E2A388 in MyGame.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000AF572FC960.
    27. Exception thrown at 0x00007FFC18E2A388 in MyGame.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000AF572FD9B0.
    28. info:LoadListingInformationAsync() invoked.    [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    29.      :License Info for app MyCompany.MyGame_5.7.0.0_x64__ewn699wwxwmvy: (CV = kn9eWDDdo0CS5ltv.108.2) [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    30.      :  IsActive: false, IsTrial: TRUE, App type: 3, Listner count: 0   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    31.      :  ExpirationDateTime: 1601/1/1 00:00:00   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    32.      :  LicenseManager: VALID   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    33.      :  LicenseInstance: not set    [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    34.      :  UnfulfilledList: VALID  [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    35.      :    <empty list>    [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    36. ERROR:ChkBool(instance != nullptr, ((HRESULT)0x803F6107L))  (0x803f6107)    [Windows::ApplicationModel::Store::Internal::StoreCommerceServer::InitializeIdsFromLicense]
    37. ERROR:ChkHr(InitializeIdsFromLicense()) (0x803f6107)    [Windows::ApplicationModel::Store::Internal::StoreCommerceServer::Initialize]
    38. ERROR:ChkHr(spStoreCommerce->Initialize(cv.GetHStringReference().Get())) (0x803f6107)    [Windows::ApplicationModel::Store::CurrentAppFactory::GetStoreCommerce]
    39. ERROR:ChkHr(GetStoreCommerce(&spStoreCommerce)) (0x803f6107)    [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    40. Exception thrown at 0x00007FFC18E2A388 in MyGame.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000AF5ABFC8C0.
    41. Exception thrown at 0x00007FFC18E2A388 in MyGame.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000AF5ABFD910.
    42. The thread 0xc94 has exited with code 0 (0x0).
    43. The thread 0x5cd4 has exited with code 0 (0x0).
    44. The thread 0x288c has exited with code 0 (0x0).
    45. The thread 0x56ac has exited with code 0 (0x0).
    46. The thread 0x1114 has exited with code 0 (0x0).
    47. info:LoadListingInformationAsync() invoked.    [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    48.      :License Info for app MyCompany.MyGame_5.7.0.0_x64__ewn699wwxwmvy: (CV = kn9eWDDdo0CS5ltv.111.2) [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    49.      :  IsActive: false, IsTrial: TRUE, App type: 3, Listner count: 0   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    50.      :  ExpirationDateTime: 1601/1/1 00:00:00   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    51.      :  LicenseManager: VALID   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    52.      :  LicenseInstance: not set    [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    53.      :  UnfulfilledList: VALID  [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    54.      :    <empty list>    [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    55. ERROR:ChkBool(instance != nullptr, ((HRESULT)0x803F6107L))  (0x803f6107)    [Windows::ApplicationModel::Store::Internal::StoreCommerceServer::InitializeIdsFromLicense]
    56. ERROR:ChkHr(InitializeIdsFromLicense()) (0x803f6107)    [Windows::ApplicationModel::Store::Internal::StoreCommerceServer::Initialize]
    57. ERROR:ChkHr(spStoreCommerce->Initialize(cv.GetHStringReference().Get())) (0x803f6107)    [Windows::ApplicationModel::Store::CurrentAppFactory::GetStoreCommerce]
    58. ERROR:ChkHr(GetStoreCommerce(&spStoreCommerce)) (0x803f6107)    [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    59. Exception thrown at 0x00007FFC18E2A388 in MyGame.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000AF5A4FCB50.
    60. Exception thrown at 0x00007FFC18E2A388 in MyGame.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000AF5A4FDBA0.
    61. info:LoadListingInformationAsync() invoked.    [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    62.      :License Info for app MyCompany.MyGame_5.7.0.0_x64__ewn699wwxwmvy: (CV = kn9eWDDdo0CS5ltv.114.2) [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    63. ERROR:ChkHr(spStoreCommerce->Initialize(cv.GetHStringReference().Get())) (0x803f6107)    [Windows::ApplicationModel::Store::CurrentAppFactory::GetStoreCommerce]
    64.      :  IsActive: false, IsTrial: TRUE, App type: 3, Listner count: 0   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    65.      :  ExpirationDateTime: 1601/1/1 00:00:00   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    66.      :  LicenseManager: VALID   [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    67.      :  LicenseInstance: not set    [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    68.      :  UnfulfilledList: VALID  [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    69.      :    <empty list>    [Windows::ApplicationModel::Store::LicenseInformationServer::DumpLicensesToDebugger]
    70. ERROR:ChkBool(instance != nullptr, ((HRESULT)0x803F6107L))  (0x803f6107)    [Windows::ApplicationModel::Store::Internal::StoreCommerceServer::InitializeIdsFromLicense]
    71. ERROR:ChkHr(InitializeIdsFromLicense()) (0x803f6107)    [Windows::ApplicationModel::Store::Internal::StoreCommerceServer::Initialize]
    72. ERROR:ChkHr(GetStoreCommerce(&spStoreCommerce)) (0x803f6107)    [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    73. Exception thrown at 0x00007FFC18E2A388 in MyGame.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000AF5AAFCE20.
    74. Exception thrown at 0x00007FFC18E2A388 in MyGame.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000AF5AAFDE70.
     
  20. DarekRusin

    DarekRusin

    Joined:
    Nov 15, 2013
    Posts:
    20
    I'm trying to bring our game to Windows UWP and I'm getting exactly the same issue with Unity IAP. Using Unity 2017.4.13 + IAP 1.17 + IL2CPP + .NET 4.6 API level.

    When I'm signed in to the Microsoft Store, it all works fine and the logs look like this:

    Code (CSharp):
    1.  info:LoadListingInformationAsync() invoked.    [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    2. UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 0, productsOnly = False
    3. info:GetUnfulfilledConsumablesAsync() invoked. [Windows::ApplicationModel::Store::CurrentAppFactory::GetUnfulfilledConsumablesAsync]
    4. UnityIAPWin8:Building full product list with existing purchases
    5. info:GetAppReceiptAsync() invoked. [Windows::ApplicationModel::Store::CurrentAppFactory::GetAppReceiptAsync]
    6. info:get_LicenseInformation() invoked. [Windows::ApplicationModel::Store::CurrentAppFactory::get_LicenseInformation]
    7. Purchaser: Purchaser OnInitialized: SUCCESS
    8.  
    When I'm signed out from the store I'm seeing exceptions being thrown out and it looks like IAP is retrying and retrying in a loop, never finishing the initialization.

    Code (CSharp):
    1.  info:LoadListingInformationAsync() invoked.    [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    2. info:GetUnfulfilledConsumablesAsync() invoked. [Windows::ApplicationModel::Store::CurrentAppFactory::GetUnfulfilledConsumablesAsync]
    3. Exception thrown at 0x00007FF92622A388 in Solitaire Dreams.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0000000C5F6FD4F0.
    4. Exception thrown at 0x00007FF92622A388 in Solitaire Dreams.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0000000C5F6FBDF0.
    5. UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 0, productsOnly = False
    6. UnityIAPWin8:Building full product list with existing purchases
    7. info:LoadListingInformationAsync() invoked.    [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    8. UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 10000, productsOnly = False
    9. info:GetUnfulfilledConsumablesAsync() invoked. [Windows::ApplicationModel::Store::CurrentAppFactory::GetUnfulfilledConsumablesAsync]
    10. Exception thrown at 0x00007FF92622A388 in Solitaire Dreams.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0000000C619FD550.
    11. Exception thrown at 0x00007FF92622A388 in Solitaire Dreams.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0000000C619FBE50.
    12. UnityIAPWin8:Building full product list with existing purchases
    What's interesting is that when I alt-tab without stopping the code and sign into the store then alt-tab back to the game, the loop will pick up and finish the initialization properly.
    So it's definitely dependent on whether I'm signed out.

    Granted, some of those inapp products I've added just today and I've seen people here saying that it might take a day or two to become fully published. I'll give it another try on Monday, hoping for the best.
     
  21. DarekRusin

    DarekRusin

    Joined:
    Nov 15, 2013
    Posts:
    20
    Ok, three days later and I'm still getting the same errors. So it does look like an internal Unity IAP issue. And there are other people having similar problems in the "IAP Fails to Initialize on UWP" thread.

    @JeffDUnity3D any ideas what can we do here? Can you reproduce this on your side as well? Anything we can do to help you debug? Thanks in advance.
     
  22. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,138
    If not logged in, the store should prompt for a login. We have no control over this behavior. This sounds like a possible issue on the Windows side, I will check with the team here also.
     
  23. DarekRusin

    DarekRusin

    Joined:
    Nov 15, 2013
    Posts:
    20
    @JeffDUnity3D are you sure it should be asking for login? Wasn't the whole point of the update in 1.9.3 to make it possible to init and fetch prices without being logged in and ask only when player starts buying? Here's what IAP SDK changelog says:

    1.9.3 (2017-01-03):
    • Windows Store - support for UWP apps running while logged-out of Windows Store. Now fetches app's product metadata if logged out, and requests user sign in to make purchase or to fetch user's purchase history.
     
  24. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,138
    Yes, we may have a regression. I have brought it up with the IAP team, we'll see if we can include an update in a future IAP release.
     
  25. DarekRusin

    DarekRusin

    Joined:
    Nov 15, 2013
    Posts:
    20
    @JeffDUnity3D Thanks! I look forward to the fix. Meanwhile, we've added a workaround in the game which triggers when init takes longer than few seconds and prompts user to check internet connection and log in to Microsoft Store. Not pretty, but will do until the patch arrives.
     
  26. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,138
    Can someone here confirm if they are seeing this behavior on released games that were working previously, with no updates?
     
  27. rmsuhail

    rmsuhail

    Joined:
    Jan 5, 2014
    Posts:
    5
    @JeffDUnity3D I have the same issue as @DarekRusin posted here , the initialize never happens when i'm not logged into the store account and it works fine when i'm logged in .Any fixes yet!