Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

IAP Fails to Initialize on UWP

Discussion in 'Unity IAP' started by Kryzarel, May 30, 2018.

  1. Kryzarel

    Kryzarel

    Joined:
    Jul 30, 2013
    Posts:
    34
    We are trying to test IAPs in Windows Universal Platform, but despite all our apps and add-ons being “In Store” for several days they still do not work. We're using the Unity Purchasing system and it doesn't seem to initialize. No callbacks are called, neither OnInitialized nor OnInitializeFailed.

    We found a few similar reports from Unity users that mention that it started working after a few days for them, and that it usually takes 24 to 48h for the IAPs to start working on Windows Store after being set to “In Store”, so this could be normal, but in our case it has been significantly longer and the IAPs still seem to not be available. (source: https://forum.unity.com/threads/solved-initialization-on-uwp.441267/ )

    The console output that we're getting when testing the app on our local machine through Visual Studio, is the following:
    UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 0, productsOnly = False
    and after some time
    UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 10000, productsOnly = False
    UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 20000, productsOnly = False

    This also matches some of the reports from Unity users, mentioned above.

    We also looked through all the steps mentioned in the following Unity Manual link, without success: https://docs.unity3d.com/Manual/UnityIAPWindowsConfiguration.html


    TL;DR: The IAP system on UWP doesn't initialize, despite doing all the correct steps, including having the app published in the store. Any insight is much appreciated :)
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
  3. Kryzarel

    Kryzarel

    Joined:
    Jul 30, 2013
    Posts:
    34
    We're testing on a desktop computer running Windows 10, through Visual Studio. This is the code we're using to initialize the IAP system:

    Code (CSharp):
    1. // Initialize can be called multiple times (for example over startup or later if the valid purchases could have changed)
    2. public static void Initialize()
    3. {
    4.    var packIds = new HashSet<string>();
    5.    // HACK: adding packs manually because Unity Purchasing cannot be initialized without everything, or it risks losing purchases
    6.    packIds.Add("dlc1");
    7.    packIds.Add("dlc2");
    8.    packIds.Add("dlc3");
    9.    packIds.UnionWith(MusicDlcManager.GetPackList());
    10.  
    11.    Initialize(packIds);
    12. }
    13.  
    14. public static void Initialize(HashSet<string> purchaseIds)
    15. {
    16.    ConfigurationBuilder builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
    17.    foreach (string name in purchaseIds) {
    18.        builder.AddProduct(IdFor(name), ProductType.NonConsumable);
    19.    }
    20.    builder.AddProduct(IdFor("full_game"), ProductType.NonConsumable);
    21.    UnityPurchasing.Initialize(instance, builder);
    22. }
    23.  
    24. public static string IdFor(string id)
    25. {
    26.    return "our_id_prefix" + id;
    27. }
    After Initialize being called, we should be getting either the of these events:

    Code (CSharp):
    1. public void OnInitialized(IStoreController controller, IExtensionProvider extensions)
    or
    Code (CSharp):
    1. public void OnInitializeFailed(InitializationFailureReason error)
    But we’re getting neither. Internet access is working, since we are able to access our server and DLC store without issues.

    Full logs uploaded as a .txt file to avoid spamming the thread.
     

    Attached Files:

    Last edited: Jun 4, 2018
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    You are using unfamiliar code to me, generally initialize should only be called once. Can you try with the sample project?
     
  5. Kryzarel

    Kryzarel

    Joined:
    Jul 30, 2013
    Posts:
    34
    The code we're using seems extremely similar to the IAP sample project. In any case, I'm not sure what testing with that project would accomplish since we need the app to be submitted and published in the Windows store for IAPs to work, according to Microsoft's own documentation:
    “You have created an app submission in the Windows Dev Center dashboard and this app is published in the Store. You can optionally configure the app so it is not discoverable in the Store while you test it.”
    https://docs.microsoft.com/en-us/wi...p-purchases-of-apps-and-add-ons#prerequisites

    I guess we could always test using "builder.Configure<IMicrosoftConfiguration>().useMockBillingSystem = true;" but we've already done that in our own app and it worked without issues. However, the real IAPs don't :(
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    You have two Initialize methods which is unusual, I was hoping you could compare to the sample project which does not. And in fact, you are saying that Initialize does not look to be happening. Can you provide the full device logs during app launch? Where do you call Initialize, in a Start or Awake function?
     
  7. Kryzarel

    Kryzarel

    Joined:
    Jul 30, 2013
    Posts:
    34
    The second Initialize method is only called by the first one, it is simply for convenience/organization reasons, it should actually be private, not public, that's an oversight on my part.

    The .txt file I attached in my first reply are the full device logs during app launch. We are calling IAP.Initialize(); in the Start method of a script that exists in the first scene of the game.
     
  8. Kryzarel

    Kryzarel

    Joined:
    Jul 30, 2013
    Posts:
    34
    At this time I'm going to the guess the problem is actually on Microsoft's side. I have since tested the app using both of their native APIs without success with either.

    From this link: https://docs.microsoft.com/en-us/windows/uwp/monetize/enable-in-app-product-purchases
    Using the Windows.ApplicationModel.Store namespace and doing:
    Code (CSharp):
    1. public static void Test_WindowsApplicationModelStore()
    2. {
    3.     try {
    4.         var licenseInfo = CurrentApp.LicenseInformation;
    5.         Debug.LogWarning("License Info: " + licenseInfo);
    6.     } catch (Exception e) {
    7.         Debug.LogError("Can't access current app: " + e.Message);
    8.     }
    9. }
    Or accessing literally anything in the CurrentApp class, always throws the following exception:
    Excep_FromHResult 0x803F6107

    From this link: https://docs.microsoft.com/en-us/windows/uwp/monetize/get-product-info-for-apps-and-add-ons
    Using the Windows.Services.Store namespace and doing:
    Code (CSharp):
    1. public static async void Test_WindowsServicesStore()
    2. {
    3.     StoreContext context = StoreContext.GetDefault();
    4.  
    5.     string[] productKinds = { "Durable" };
    6.     List<String> filterList = new List<string>(productKinds);
    7.     string[] storeIds = { "not_a_real_id", "just_for_illustration_purposes" }; // In our code, we're actually using our real ID's here
    8.  
    9.     Debug.LogError("Checking products");
    10.     var result = await context.GetStoreProductsAsync(filterList, storeIds);
    11.     Debug.LogError("Done Checking products");
    12.  
    13.     if (result == null)
    14.     {
    15.         Debug.LogError("Result is null");
    16.     }
    17.     else
    18.     {
    19.         if (result.Products == null) {
    20.             Debug.LogError("Products are null");
    21.         } else {
    22.             Debug.LogError("Num Products: " + result.Products.Count);
    23.         }
    24.  
    25.         foreach (var item in result.Products)
    26.         {
    27.             Debug.LogError("Key: " + item.Key + "IAP: " + item.Value.Title + " Price: " + item.Value.Price);
    28.         }
    29.     }
    30.  
    31.     foreach (var item in storeIds)
    32.     {
    33.         var purchaseResult = await context.RequestPurchaseAsync(item);
    34.         Debug.LogError("Trying to purchase " + item + " Status: " + purchaseResult.Status);
    35.     }
    36. }

    The result.Products variable is always empty (returns a count of 0).
    Trying to purchase the IAPs always returns a status of NotPurchased.
     
  9. Kryzarel

    Kryzarel

    Joined:
    Jul 30, 2013
    Posts:
    34
    @JeffDUnity3D
    Update: Apparently, all the problems described in the previous post only happen on my machine. After testing on two other computers, everything works just fine (this is using the Windows native API to access the In-App Purchases).
    However, using Unity's IAP Plugin, it still fails to initialize on all machines we have tested until now.

    This leads me to believe that the problem lies somewhere in Unity's IAP Plugin, specifically where it deals with IAPs on the UWP platform. I'll try to investigate further and update if I find any more details.
     
  10. ken06335_unity

    ken06335_unity

    Joined:
    Aug 30, 2018
    Posts:
    7
    me too UnityIAP not initialize, my config Unity2017 UWP IL2CPP .net 4.6
    console output
    UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 0, productsOnly = False
    UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 10000, productsOnly = False
    UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 20000, productsOnly = False
    but Microsoft's side. using native APIs (Windows.Services.Store) Run is ok
    222.png

    i trying and trying , how should i do, is anyone get windwosStore(UWP) UnityIAP get Initialize success
     
  11. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    @ken06335_unity Are you receiving OnInitializedFailed? Please place Debug.Log statements in the callbacks to confirm.
     
  12. ken06335_unity

    ken06335_unity

    Joined:
    Aug 30, 2018
    Posts:
    7
    JeffDUnity3D no OnInitializedFailed or OnInitialized callbacks,


    Log1.png

    console output error:

    UnityIAP Version: 1.20.1
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(Object)
    UnityEngine.Purchasing.StandardPurchasingModule:Instance(AppStore)
    UnityEngine.Purchasing.StandardPurchasingModule:Instance()
    MyIAPManager:.ctor()
    XMain:Update()

    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug.bindings.h Line: 43)

    'unity2017_IAP.exe' (Win32): Loaded 'C:\Windows\System32\Windows.ApplicationModel.Store.dll'. Cannot find or open the PDB file.
    'unity2017_IAP.exe' (Win32): Loaded 'C:\Windows\System32\webservices.dll'. Cannot find or open the PDB file.
    'unity2017_IAP.exe' (Win32): Loaded 'C:\Windows\System32\cabinet.dll'. Cannot find or open the PDB file.
    info:LoadListingInformationAsync() invoked. [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 0, productsOnly = False
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(Object)
    UnityEngine.Purchasing.<>c__DisplayClass16_0:<log>b__0()
    System.Action:Invoke()
    UnityEngine.Purchasing.Extension.UnityUtil:Update()

    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug.bindings.h Line: 43)

    Exception thrown at 0x00007FFDA166A388 in unity2017_IAP.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000E9257FD0B0.
    Exception thrown at 0x00007FFDA166A388 in unity2017_IAP.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000E9257FB940.
    [9.192999 / 29.821591] - OnWindowActivated event - Deactivated.
    The thread 0x3e8 has exited with code 0 (0x0).
    The thread 0x3434 has exited with code 0 (0x0).
    info:LoadListingInformationAsync() invoked. [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    Exception thrown at 0x00007FFDA166A388 in unity2017_IAP.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000E924EFCF70.
    Exception thrown at 0x00007FFDA166A388 in unity2017_IAP.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000E924EFB800.
    The thread 0x4720 has exited with code 0 (0x0).
    The thread 0x376c has exited with code 0 (0x0).
    info:LoadListingInformationAsync() invoked. [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    Exception thrown at 0x00007FFDA166A388 in unity2017_IAP.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000E924FFD3D0.
    Exception thrown at 0x00007FFDA166A388 in unity2017_IAP.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000E924FFBC60.
     
    Last edited: Oct 31, 2018
  13. DarekRusin

    DarekRusin

    Joined:
    Nov 15, 2013
    Posts:
    38
    ken06335_unity likes this.
  14. ken06335_unity

    ken06335_unity

    Joined:
    Aug 30, 2018
    Posts:
    7
    IN my case I Signed in always and I config UWP + IL2CPP + .Net 4.6 + IAP 1.20.1 Failed to initialize
    by the way , Kryzarel's IAP 1.19 ? if you updata to 1.20.1 , it be fine?
     
  15. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    @ken06335_unity I am seeing the same exceptions in 1.20.1 also. I'm logged into the store prior to launching. I have let the IAP team know.
     
    Last edited: Nov 5, 2018
  16. ken06335_unity

    ken06335_unity

    Joined:
    Aug 30, 2018
    Posts:
    7
    not good news, i will try another solution, thank yuou
     
  17. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    123
    It is crazy how many things go wrong with unity when trying to build for windows.
    The inputfield doesn't work correctly, which is only fixed in 2019.1, I have this issue too which is still not fixed AFAIK.
    Crazy, every new version of unity some stuff gets fixed and some other stuff gets broken again.

    Will have to wait until this is fixed before I can publish I guess..
     
  18. dayjur

    dayjur

    Joined:
    Sep 6, 2014
    Posts:
    42
    One has to keep multiple versions of IAP on hand to get IAP working on multiple platforms.
    I use IAP 1.16 and .NET scripting for IAP to work on UWP
     
  19. TeemuTee

    TeemuTee

    Joined:
    Jun 10, 2016
    Posts:
    11
    I'm experiencing the same issue. I have tried multiple Unity versions (2018.3.5f1, 2018.3.6f1, 2019.1.0b3 and 2019.1.0b4) and Unity IAP versions 1.16.0, 1.17.0, 1.18.0, 1.20.0 and 1.20.1. Using .NET scripting doesn't work, either. The sample project creates the following log seen in attachment 1, whether the project is published in the store or not.

    As you can see, OnInitialized or OnInitializeFailed are not called. The same project produces the log seen in attachment 2 on Android.

    The initialization fails for the sample project, as it should. The UWP issue does not seem to be present here. Using builder.Configure<IMicrosoftConfiguration>().useMockBillingSystem = true does allow the IAP to initialize. Using this in production occasionally logs this as well but nothing happens anyway:

    UnityIAPWin8:Building full product list with existing purchases

    Building the sample project with Unity 2019.1.0b4 doesn't work at all, building it causes the errors seen in attachment 3.
     

    Attached Files:

    Last edited: Feb 21, 2019
  20. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    @TeemuTee It's generally preferred to attach logs as an attachment, not inline that requires scrolling. At any rate, we are aware of this issue, we believe a possible change on the Windows store side but not confirmed. There are no immediate plans to address this behavior, but is being discussed.
     
  21. rewb0rn

    rewb0rn

    Joined:
    May 17, 2016
    Posts:
    11
    Hello,

    we believe we are hitting the same issue. Any news on this? If I understand this thread correctly, UWP IAPs are currently not working at all from Unity? Or are there any workarounds I missed, other than implementing it ourselves?

    Thanks in advance
     
  22. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    That is correct, we are still looking into it.
     
  23. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    123
    I need this too, been waiting almost a year now to publish my app due to bugs in unity.
    Is there any solution in sight?
     
  24. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    You mean just on the Windows store, correct? This is still on our radar for an upcoming release.
     
  25. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    123
    Well yeah, that the IAP system works on windows (not just windows, but also).
    It sounds very vague... how long would you guess?
    This seems like a huge bug, at least for me I can't publish my update (trying to work around it with a different plugin but it is very hacky).

    Is there any way around this bug, to use IAP on windows? (going back also doesn't really work because there are other app-breaking bugs in older versions (like toggles and input fields not working correctly on windows)).
     
  26. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    There is no work around that I am familiar with, otherwise we would naturally share here.
     
  27. DarekRusin

    DarekRusin

    Joined:
    Nov 15, 2013
    Posts:
    38
    @wouter_vugt I think you're taking that multiplatform ideal of Unity too literally ;) We've decided to drop support for both Windows Store and Facebook because there were too many issues here and there either blocking releases on other platforms or making it too much effort to work around. Now that we're settled on iOS and Android it's much easier as these platforms are fully supported.

    But as for a workaround for Windows Store IAP, here's a plugin that we've been considering. Haven't used it, but it looked solid:
    https://assetstore.unity.com/packages/tools/integration/windows-store-native-54715
     
  28. TeemuTee

    TeemuTee

    Joined:
    Jun 10, 2016
    Posts:
    11
    We ended up making our own implementation that resembles the Unity Purchaser. It's a bit of a hassle but definitely doable. If you choose to take this path, make sure you don't mix different Microsoft namespaces as explained here: https://docs.microsoft.com/en-us/windows/uwp/monetize/in-app-purchases-and-trials
     
  29. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    123
    haha yeah guess so, but they told me before Iap was supported on windows, so that was what I was going with.
    I think unity is pretty buggy in general, which I think is a shame, even just on ios and android there are enough things that break with each new release in my experience (especially when an app gets more complicated).
    Regardless I still like it in general...

    I am going to try wsa-native, problem is I rely on unity IAP heavily for lots of internal calls, so I would need to hack around that, which is very ugly, but well... hopefully this works (windows iap used to work in the past btw)
     
  30. rewb0rn

    rewb0rn

    Joined:
    May 17, 2016
    Posts:
    11
    I think either Windows Store is supported or it's not supported. But Unity saying it's supported but not fixing a bug that makes it basically unusable for the better part of a year is not acceptable.

    We also ended up implementing Windows Store IAPs on our own instead of using the Unity API.
     
    JeffDUnity3D likes this.
  31. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
  32. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    123
    That is not true. My app is already published and even then I get this..
     
  33. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    Can you elaborate? Your published app was working at one point, but then stopped? If you didn't follow the mentioned directions, an published app would still behave similarly.
     
  34. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    123
    Yes, I published a version of the app a year ago, using a different IAP version, which worked fine.
    Now using this version, but the same code, it does not work, keeps polling for products (works fine on other platform).
    Have given up on the windows store update for a few months, am now going to try reinstalling the previous version of unity IAP which did work to see if that fixes it.
     
    JeffDUnity3D likes this.
  35. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    123
    No have the same problem using an older version of IAP...
     
  36. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    If it was working previously, that may imply a change on the Microsoft Store.
     
  37. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    123
    Well maybe...
    Using the asset available on the unity store, it does retrieve and find my add-ons...
    So I would reason that it has to do with unity-iap right?

    But my app is pretty intertwined with unity iap plugin, so to set it up using anything else would take too much time (based on revenue on the windows app store).

    But you said it worked on your end? what version do you use?
    I have simply build the app, associated it with the app in the store and then run.. I keep getting the 'poll for products' and then the 'building full product list with existing products' one after another..

    Edit:
    Now I have turned off the mocking and it seems to work..
    However this seems kinda shady still... do you have any idea why this is?
    I think it should be viable for update now.. but since I don't understand why it is working now I am still a little hesitant, what do you think?

    btw this is with an older version of unity-iap..
     
    Last edited: Dec 10, 2019
  38. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    Sorry, I don't follow. In your case, my understanding is that originally your app worked on Windows Store. When did this change, and stop working? What do you mean by mocking? It has always worked in our testing, but given the above prerequisite advice.
     
  39. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    123
    with mocking I mean using the test configuration (useMockBillingSystem).
    The problem is definitely not the configuration, the configuration on microsoft's side (since it does work now, with nothing changed).
    And like I said wsa-native (asset plugin) would get all the available add ons as well.
    The reason it works now, at least I think, is because I switched to an older IAP version...

    So again the problem, as far as I can tell, must be somewhere in an update with unity IAP.
    Weird thing is that it works for you, but not for me or anyone else who reported here.
    Which version of unity and which version of unity IAP did you use?
     
  40. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    I suspect it was due the fake store setup that you had, it wouldn't have worked previously either with that setting. I'm not familiar with wsa-native, I'm glad it's working for you now. I wouldn't recommend changing anything if it's working now.
     
  41. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    123
    As I said nothing has changed on the store-side, I only downgraded to an older unity IAP version, then it started working (the newer version of unity IAP didn't work with that setting turned on or off).
    Granted I might have change something else, but AFAIK I only changed the IAP version.

    wsa-native is an asset you can download from the unity app store.
     
    Last edited: Dec 11, 2019
  42. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    256
  43. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    We have had customers successfully implement IAP on UWP following the previous directions. Note that subscriptions on UWP are not yet supported.
     
  44. k119_55524

    k119_55524

    Joined:
    Mar 20, 2014
    Posts:
    1
    Hi,
    same problem, UWP store is not initialized.
    correctly understood, recommendations come down to downgrading the IAP version?
    What version of IAP (old) works?
     
  45. Grinch_GEO

    Grinch_GEO

    Joined:
    Apr 19, 2014
    Posts:
    92
    Same problem UWP and C++ backend does not work !
    Any News ? cant even go to older version as switched to unity 2019.2
     
  46. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    Can you elaborate what you mean by C++ back end? What error are you receiving?
     
  47. Grinch_GEO

    Grinch_GEO

    Joined:
    Apr 19, 2014
    Posts:
    92
    Hey Thanks for your response :) So Unity 2019.2.21 + UWP + IL2CPP. this is my setup and when i open game this is the log in VS 2019 :
    Code (CSharp):
    1. UnityIAP Version: 1.23.1
    2. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    3. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    4. UnityEngine.Logger:Log(Object)
    5. UnityEngine.Purchasing.StandardPurchasingModule:Instance(AppStore)
    6. UnityEngine.Purchasing.StandardPurchasingModule:Instance()
    7. PixelFury.IAPController:InitializePurchasing()
    8. PixelFury.IAPController:Init()
    9. PixelFury.MainMenuController:Start()
    10. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
    11.  
    12. 'Fury.exe' (Win32): Loaded 'C:\Windows\System32\Windows.ApplicationModel.Store.dll'.
    13. 'Fury.exe' (Win32): Loaded 'C:\Windows\System32\cabinet.dll'.
    14. 'Fury.exe' (Win32): Loaded 'C:\Windows\System32\webservices.dll'.
    15. info:LoadListingInformationAsync() invoked.    [Windows::ApplicationModel::Store::CurrentAppFactory::LoadListingInformationAsync]
    16. 'Fury.exe' (Win32): Loaded 'C:\Windows\System32\wpnapps.dll'.
    17. UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 0, productsOnly = False
    18. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    19. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    20. UnityEngine.Logger:Log(Object)
    21. UnityEngine.Purchasing.<>c__DisplayClass16_0:<log>b__0()
    22. System.Action:Invoke()
    23. UnityEngine.Purchasing.Extension.UnityUtil:Update()
    24. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
    25.  
    26. 'Fury.exe' (Win32): Loaded 'C:\Windows\System32\Windows.ApplicationModel.Background.TimeBroker.dll'.
    27. [9.160730 / 28.776001] - OnWindowActivated event - CodeActivated.
    28. Exception thrown at 0x00007FFB5615A859 (KernelBase.dll) in Fury.exe: WinRT originate error - 0x8004006A : 'DataPackage does not contain the specified format. Verify its presence using DataPackageView.Contains or DataPackageView.AvailableFormats.'.
    29. Exception thrown at 0x00007FFB5615A859 (KernelBase.dll) in Fury.exe: 0x80010108: The object invoked has disconnected from its clients.
    30. onecore\com\combase\dcomrem\winrthandlewrappers.cpp(1257)\combase.dll!00007FFB580DB3C2: (caller: 00007FFB57FC0FBB) ReturnHr(3) tid(6948) 80010108 The object invoked has disconnected from its clients.
    31. onecore\com\combase\winrt\error\restrictederror.cpp(3531)\combase.dll!00007FFB580CF496: (caller: 00007FFB5800500E) ReturnHr(4) tid(6948) 80010108 The object invoked has disconnected from its clients.
    32. onecore\com\combase\winrt\error\restrictederror.cpp(2143)\combase.dll!00007FFB580CEE6F: (caller: 00007FFB5800293C) ReturnHr(5) tid(6948) 80010108 The object invoked has disconnected from its clients.
    33. onecore\com\combase\winrt\error\restrictederror.cpp(2086)\combase.dll!00007FFB580CE0A1: (caller: 00007FFB57FC0C96) ReturnHr(6) tid(6948) 80010108 The object invoked has disconnected from its clients.
    34. Exception thrown at 0x00007FFB5615A859 in Fury.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000A71BDFD880.
    35. Exception thrown at 0x00007FFB5615A859 in Fury.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000A71BDFBBC0.
    36. UnityIAPWin8:PollForProducts() Exception (persistent = True, delay = 0, retry = 30), exception: Exception of type 'System.Exception' was thrown.
    37. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    38. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    39. UnityEngine.Logger:Log(Object)
    40. UnityEngine.Purchasing.<>c__DisplayClass16_0:<log>b__0()
    41. System.Action:Invoke()
    42. UnityEngine.Purchasing.Extension.UnityUtil:Update()
    Can make it work. App is associated already with Store. its working and live on Net backend on IL2CPP cant make it work.
     
  48. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    @MasterOfStorm I see, by "back end" you mean scripting version. Do you require IL2CPP instead of NET? Are you using Codeless IAP?
     
  49. Grinch_GEO

    Grinch_GEO

    Joined:
    Apr 19, 2014
    Posts:
    92
    Yes i am using IL2CPP no i am not using Codeless IAP. everything works on Old 2018 Unity if scripting version is NET.
     
  50. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    We have successfully used IAP with IL2CPP on UWP with Unity 2018, at least with IAP 1.22. I haven't recently tested with 1.23.1. So your options would be to 1) stay with NET 2) test with an earlier version of IAP
     
unityunity