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

[Solved] [MICROSOFT WSA] Our app will be kicked out because INAPP does not work. :-(

Discussion in 'Unity IAP' started by Foriero, Sep 21, 2016.

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

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hello,

    Today Microsoft sent us an email about kicking out our app from the store since INAPP does not work. Which is true. The bug is not on our side but in UnityPurchasing API.

    As I talked to Rasmus and other INAPP team members I hope you guys have fix for us. We target only WIN10.

    As Rasmus told me in 1.8.2 the WIN10 should be working. If not we have time till 6.Oct and then our app will be unpublished.

    Please let us know what is the state of UnityPuchasing for purely WIN10.

    Thank you, Marek.
     
    Wadjey likes this.
  2. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @Foriero,

    Sorry purchasing isn't working for you! What is the actual error that is happening? We have been able to complete purchases on Win10 so we need more info to try and help you with this. Can you fill out a bug report with the issue from the editor (Help -> Report a Bug)? Are you able to build an empty project? Or one with the regular IAP scene? Can you successfully complete purchases using the demo IAP code? Filing a bug report when you have the issue you're experiencing should include stack traces and such so we can look into the issue. The more details you can include the more we'll be able to help.
     
  3. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    I confirm this issue, purchases isn't working for my laptop with Windows 10 Anniversary Update (v10.0.14393).
     
  4. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @Wajdik,

    Sorry you're experiencing this issue as well, if you could please answer the same questions I wrote to Foriero above, and submit a bug report as well, that would be very helpful.
     
  5. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hello Erika, please refer to your internal bug report that Rasmus created. Sorry don't have number or any link. For what I can say is that we get exception when we try to retrieve list of inapp products. And since we can not get this list we can not buy them. Moreover app crashes. Rasmus referred especially to this link :
    https://developer.microsoft.com/en-us/store/monetize/ads-in-apps which we now use for advertisement since the old api does not simply work on WIN10 only builds.
     
  6. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    To be honest what I feel is that you use win8 libraries for INAPP supposing that they are working on WIN10 WSA builds. Which is simply NOT TRUE. But I try to tell this to your team via beta or email pretty long time for now. But except Rasmus and you nobody answered.

    So I suppose you need to have two dlls. One set for win8 and one set for win10. And switching between them will be likely similar to your google store switching.
     
  7. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Any feedback on this Erica? When we can expect 1.8.2? We are waiting for it every single day.
     
  8. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @Foriero,

    We are using Windows.ApplicationModel.Store for both Win8 and Win10 stores, as described on this page: https://msdn.microsoft.com/library/windows/apps/windows.applicationmodel.store.aspx. On there you can see it suggests Windows.Services.Store for Windows 10, version 1607 or later, but does not say anywhere that it is required. If you have evidence to the contrary can you please provide links? Thanks!

    We have found Rasmus' bug report, the error code listed HRESULT: 0x803F6107 appears to be a licensing issue, and may be something with your application's settings on the windows portal. These are some pages I found that talked about it: http://stackoverflow.com/questions/34364580/wp8-1-and-wp10-differences and https://social.msdn.microsoft.com/F...-app-license-error-0x803f6107?forum=wpdevelop. Have you tried/can you try the fixes they mention and see if they help?

    The link Rasmus provided seems to be specific to ads, unless there was a specific part of that page that you wanted to call out as related to IAP?

    1.8.2 has no changes for Windows store, but should be coming out any day now.
     
  9. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hi Erica, so at the end of your second list I found this. Is Unity calling this internally for Debug builds? Can you check with your engineers. Thank you, Marek.

    PurchaseResults result =null;if(_isLicenseSimulationOn){
    result =newPurchaseResults(await CurrentAppSimulator.RequestProductPurchaseAsync(productId));}else{
    result =newPurchaseResults(await CurrentApp.RequestProductPurchaseAsync(productId));}
     
  10. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Really there is something wrong. This is what I get when I try to use mockbilling = true. And I suppose in production build we get similar problem.

    at UnityEngine.Purchasing.Default.WinRTStore.Log(String message, Object[] formatArgs)
    at UnityEngine.Purchasing.Default.WinRTStore.<PollForProducts>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
    at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()
     
  11. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @Foriero,

    Since the code sample you gave is someone else's code, what specifically about it are you asking whether we use?

    And in your stack trace - what is the message from the exception being thrown? It looks like there may also be a debug log statement being printed, what is that? Can you post your full console logs and stack trace for us to look into?

    Mockbilling should only be used when testing without the windows store. If you're uploading the app to the store it should be false.
     
  12. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    Hi @erika_d,
    Windows 10 Anniversary Update allow users to download apps without having a Microsoft account, when I download my game from Windows Store without signing-in with a Microsoft account, Unity IAP fail to initialize and I have this error message:
    UnityIAPWin8: Exception loading listing information: The specified account does not exist. (Excep_FromHResult 0x80070525)
    I downloaded Candy Crush Saga without a Microsoft account and it's IAP is working well, when IAP button is clicked it ask user to create a Microsoft Account to purchase the IAP item (I know it's not using Unity IAP, but just to say that IAP can work even if the user isn't signed-in).
     
  13. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    Hi @erika_d,
    There is any update about this issue?
     
  14. rayw24

    rayw24

    Joined:
    May 23, 2016
    Posts:
    52
    Hi @Wajdik I have been chatting with our Unity IAP engineers and we are currently looking into this issue. I will keep you updated with our progress!
     
    Wadjey likes this.
  15. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    Hi,
    Any update about this issue?
     
  16. rayw24

    rayw24

    Joined:
    May 23, 2016
    Posts:
    52
    @Wajdik, we are still investigating this issue but it is high on our priorities list. It will take some time since we have to communicate with Microsoft and wait for their approval on test apps. I will be sure to let you know once this is fixed.
     
    Wadjey likes this.
  17. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hi, any update on this? We have app in the store 3 months and we have 0$ income from it simply because INAPP does not work. :-( When we can expect 1.8.3?
     
  18. mr_zog

    mr_zog

    Joined:
    Jan 21, 2014
    Posts:
    165
    Hi,

    since our game is published for UWP (x86, x64, ARM) and Windows Universal 8.1 (x86, x64, ARM Tablet, Phone 8.1 ARM), I would be interested in what the exact problem is.

    IAPs seem to work for us ... only tested when user is logged in with MS account.
    We often receive user reports, that they can't purchase anything though and it would be interesting, if this issue is related.

    When you speak of Win 10, are you relating to an UWP build and not Windows Standalone, correct?

    Thanks
     
  19. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hi, we are building only for WIN10. We are not interested in WIN8.1. Yes UWP. We had so manny issues with UnityPurchasing also on other platforms. I dont understand how Unity can release so buggy module especially when it is revenue related.
     
  20. mr_zog

    mr_zog

    Joined:
    Jan 21, 2014
    Posts:
    165
    What issue are you seeing?
    E.g., when you invoke the purchase dialog, does the IAP window popup and show the iap data?

    This is just a brain-dump of gotachas we ran into (not only iap related).
    * Check the windows specific #defines in your game code. The unity docs aren't always reliable. It's best to verify them with a debug-log.
    * Check your packagemanifest.xml and make sure Identity Name and Publisher is set.
    ** Since our game existed before UWP, we also have a mp:phoneIdentity ... you won't have something like that though I guess.
    * Did you associate your VS-project with the MS-store?
    * We don't use any kind of mock IAP. Since we already have a version live, we can test the real IAPs even in dev mode (it always costs real money).
    * Are your IAPs published in the Windows Store backend?
    * When you test IAPs via the beta store, you MUST download the app from the beta store link. It can take a long time until the app is ready ... we don't use that anymore.

    You could try our game and see if IAP works for you:
    https://www.microsoft.com/store/apps/9nblggh3ls1g

    Also: What Unity version are you using?
    For UWP, we use Unity 5.3.4f1.

    What build settings do you use?
    E.g. we use .NET, not ILCPP.

    There are so much things that can #!§$ you up ...


    EDIT:
    * Do you have a YOURKEY.pfx file in your project? A real one, not from Unity.
     
  21. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hi, well we are digging into it already three months. All what you write we know about and checked hundreds time. As I said I suspect that Win8.1 UnityPurchasing libraries simply DO NOT work under WIN10 build only. But Unity is silent.
     
  22. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    Hi Foriero,

    Thanks for being patient. Just a quick update. We have the team looking into this. Haven't been able to reproduce the issue yet, but we're working on it. We'll provide you with an update as soon as we have more details.

    Thanks again
     
  23. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    Hi,
    They are also looking into this issue?
     
    unity-nikkolai likes this.
  24. rayw24

    rayw24

    Joined:
    May 23, 2016
    Posts:
    52
    @Wajdik Rest assured, we are still looking into your issue regarding the Windows 10 Anniversary Update :)
     
    JariHuomo likes this.
  25. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hi Nikkolai, I will try to build with 5.4.2f1 since I see there a few fixes that can be related. Will let you know. Thank you, Marek.
     
  26. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hi Nikkolai,

    So we pushed new build and seems we are a little bit further. We don't get anymore that win8.1 exception BUT we still get ProductUnavailable.

    I'm sharing our initialization code in attachment. As (Store.cs) you can see we use there in configBuilder.Add (...., WindowsStore.Name) which returns "WinRT". May be in this small string is the problem for WSA builds.

    Can I kindly ask you take a look at our code and let us know if you see any potential bug there, please?

    https://www.dropbox.com/s/4hpbqmy7ioryezb/nikkolai.zip?dl=0

    This code works perfectly on other platforms we just experiencing this on WSA ( WIN10 only ) builds.

    Thank you, Marek.
     
    unity-nikkolai likes this.
  27. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    One more question. Should we pass to configBuilder INAPP Product ID or Store ID as defined in microsoft dev console? Where Product ID is something like com.foriero.xxxxxx BUT Store ID is something like "3434sdfh92hsf"???? In your manual you say we should pass Product ID which does not make sense since I feel like microsoft is interested in Store ID. Any comments on this?
     
  28. JariHuomo

    JariHuomo

    Joined:
    Feb 8, 2013
    Posts:
    48
    I am passing productID (I have UWP desktop app live in store, in-app purchases working for most of the users :))

    private static string kProductIDNonConsumable = "PACKAGE_1";
    private static string kProductNameWinNonConsumable = "com.jhdigitalsolutions.xxxxxxx";
    ......

    var module = StandardPurchasingModule.Instance();
    var builder = ConfigurationBuilder.Instance(module);
    builder.AddProduct(kProductIDNonConsumable, ProductType.NonConsumable, new IDs() { { kProductNameWinNonConsumable, WindowsStore.Name } });

    UnityPurchasing.Initialize(this, builder);
     
    erika_d and unity-nikkolai like this.
  29. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    Like JariHuomo said, you should be using the Product ID.

    Looked over your code. It looks solid. Really clean. Didn't see anything that might be causing an issues.

    When you build to Visual Studio be sure to check the Package.appxmanifest file to make sure the IDs match those on the dev portal. Check the Identity tag for Name and Publisher, just to make sure the values are correct. These values are normally set in Player Settings for the WSA platform.
     
    Last edited: Oct 17, 2016
  30. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hi Nikkolai, Thank you for checking our code. Yes our code is robust and that's why we wondered why it is not work. In the end it was space character in the product id. Very unfortunate. :-(

    Thank you again for your help and I hope 5.5 will be a bit more stable for WIN10 builds. Since with 5.4.2f1 which I was able to download before your team took it down we get much more crashes then before.

    Thank you again for your help. I really like to work with you. Feel like you take care.
    Have a great day, Marek.
     
    unity-nikkolai likes this.
  31. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    Hi rayw24,
    Do you have any update about the Win10 Anniversary Update issue (to make Unity IAP working even if the user isn't logged in)? Can we expect a fix soon?
    Now Win10 Anniversary Update is running on more that 300 million devices, and each day that passes is an opportunity that goes with it!
     
  32. rayw24

    rayw24

    Joined:
    May 23, 2016
    Posts:
    52
    @Wajdik it has taken longer than we anticipated and I understand that it's very frustrating to have IAP not fully functioning on such a popular platform. This is very high on our priority list and our engineers will continue to look for a solution.

    Thank you for your patience!
     
  33. rayw24

    rayw24

    Joined:
    May 23, 2016
    Posts:
    52
    @Wajdik we've found a workaround to make IAP work better with the Win10 Anniversary Update. It's currently going through testing right now and will be rolled out as a 1.9.x patch as soon as it passes testing.
     
    JariHuomo likes this.
  34. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    Hi,
    Thanks for this good news, finally IAP will be fully working with Win10 AU :)
    When we can except the update to be released to be able to schedule the update of my game?
     
    Last edited: Nov 8, 2016
  35. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    That is great news. Also look forward to build with Unity 5.5 and 1.9.x inapp.
     
  36. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    Hi,
    The fix is available in the released Unity IAP v1.9.1?
     
  37. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    I don't see anything in release notes like that. :-(
     
  38. JayR

    JayR

    Joined:
    Aug 2, 2016
    Posts:
    84
    Hi,

    The 1.9.1 release was targeted at fixes related to the "codeless IAP" and Cloud Moolah features introduced in 1.9 and does not include any changes in the UWP store. We can provide a pre-release library with the change for store login if you would like to try it.
     
  39. grofie

    grofie

    Joined:
    Dec 9, 2013
    Posts:
    30
    YES, please! Where can we find a download link?
     
  40. JayR

    JayR

    Joined:
    Aug 2, 2016
    Posts:
    84
    Unity IAP 1.9.3 includes the fix for this issue. See this post for more information.
     
    JariHuomo likes this.
Thread Status:
Not open for further replies.