locked
Problem with WP8 In-App Purchase API - Release Build

    Question

  • Our developer is in the serious need of suggestion,

    we've encounter some problem with the In-App Purchase API, most of the IAP example use "debug/mock" version of the purchase, it work perfectly fine.

    But when we do a "Release" - (direct "product list" contact with Windows Phone Store account server) deploy, we've problems that we have no idea how to fix.

    Please let me know if you have some more information on this, "Me" is one of the first app in the world to feature WP8's IAP API, so there are little to none reference for us.

    Code in: App.xaml.cs
    
    Exception detail:
    
    System.Exception was unhandled by user code
    
      HResult=-2141585004
    
      Message=Exception
    from HRESULT: 0x805A0194
    
      Source=mscorlib
    
      InnerException:

    System.Reflection.TargetInvocationException was unhandled
    
    Message: An unhandled exception of type
    'System.Reflection.TargetInvocationException' occurred in System.Windows.ni.dll


    Thursday, December 13, 2012 6:03 PM

Answers

  • hey,

    This error means a 404 basically when the api tried to contact the server to get your IAP items. My guess is that you guys have not updated the AppID (productID) GUID in the project's WMAppManifest.xml (Under properties node in solution explorer) to the one GUID that Dev Center assigned your app when you submitted it. You see, Visual Studio creates a random GUID when you create the project. But when you submit it to Dev Center, it gets changed to something else. You have to get the new one (from the URL of your app in dev center) and replace the one in your project with it. This way IAP API will use the correct ProductID to enumerate your IAP items from the server.

    Hope this helps!


    Nazeeh ElDirghami - XNA Team

    • Proposed as answer by Nazeeh Friday, December 14, 2012 2:13 AM
    • Marked as answer by Punataro Friday, December 14, 2012 7:35 PM
    Friday, December 14, 2012 2:13 AM
  • I've had this problem. You do need to follow Nazeeh's advice and update the GUID. However I still had the same error after doing that. I think this was because my app was not published yet. To test my code I created a beta version of the app in the dashboard and added all my products to that app. I entered the new GUID for the beta app in WMAppManifest.xml and rebuilt, then submitted that XAP to the beta app. Once the beta was approved the IAP calls started working with the 0x805A0194 exception (although all prices are £0.00 since it's a beta).

    Hopefully once my non-beta app is approved the IAPs will be working!

    Hope this helps.

    • Marked as answer by Punataro Friday, December 14, 2012 7:35 PM
    Friday, December 14, 2012 12:10 PM

All replies

  • hey,

    This error means a 404 basically when the api tried to contact the server to get your IAP items. My guess is that you guys have not updated the AppID (productID) GUID in the project's WMAppManifest.xml (Under properties node in solution explorer) to the one GUID that Dev Center assigned your app when you submitted it. You see, Visual Studio creates a random GUID when you create the project. But when you submit it to Dev Center, it gets changed to something else. You have to get the new one (from the URL of your app in dev center) and replace the one in your project with it. This way IAP API will use the correct ProductID to enumerate your IAP items from the server.

    Hope this helps!


    Nazeeh ElDirghami - XNA Team

    • Proposed as answer by Nazeeh Friday, December 14, 2012 2:13 AM
    • Marked as answer by Punataro Friday, December 14, 2012 7:35 PM
    Friday, December 14, 2012 2:13 AM
  • I've had this problem. You do need to follow Nazeeh's advice and update the GUID. However I still had the same error after doing that. I think this was because my app was not published yet. To test my code I created a beta version of the app in the dashboard and added all my products to that app. I entered the new GUID for the beta app in WMAppManifest.xml and rebuilt, then submitted that XAP to the beta app. Once the beta was approved the IAP calls started working with the 0x805A0194 exception (although all prices are £0.00 since it's a beta).

    Hopefully once my non-beta app is approved the IAPs will be working!

    Hope this helps.

    • Marked as answer by Punataro Friday, December 14, 2012 7:35 PM
    Friday, December 14, 2012 12:10 PM
  • Thank you, indeed I need both answers to fix this :)
    Friday, December 14, 2012 7:36 PM
  • Hi,

    I've got the same issue but it seems that mine AppId is set correctly?

    Following Situation --> tested everything with beta app in store --> everything worked fine.

    Afterwards a submitted a new app for real app store and changed the appID to new one.

    Microsoft rejected my app because of unexpected app crash.

    I tried to reproduce the issue and voila --> app is crashing at this line

    var listing = await CurrentApp.LoadListingInformationAsync(); with

    System.Exception: Exception from HRESULT: 0x805A0194
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

    Anyadvice :(? Thx

    Thursday, March 13, 2014 10:01 AM
  • thanks for this, I have the same problem, hoping this is the solution.

    quick question though:

    I have a different app ID in WMAppManifest than in DevCenter but it still works on my development phone, is this normal? presumably it crashes for everyone else, is this correct?

    thanks


    cypripri

    Friday, January 23, 2015 10:16 PM
  • Did you ever find a solution to this? I am in the same situation.
    Tuesday, May 12, 2015 3:31 PM
  • Thanks for the solution.  Updating in PhoneProductId in Package.appxmanifest has solved the problem:

      <mp:PhoneIdentity PhoneProductId="copy the product ID from the store to here" PhonePublisherId="00000000-0000-0000-0000-000000000000" />


    Hong

    Sunday, May 24, 2015 11:59 PM