The short explanation to our issue is that calls to IAP on Windows 10 Universal builds cause this error: System.Exception: Exception from HRESULT: 0x803F6107
It seems to occur after calling this method: CurrentApp.RequestProductPurchaseAsync()
We were using Unity 5.2.4f1 but found that the same errors occurred in 5.3.1 as well. We use .NET scripting backend and have not touched IL2CPP. We believe this may not have to do with Unity specifically, but I thought I’d post this here for those who have encountered this issue, and so that Unity may get some sort of hotline going with Microsoft to find out what the issue is. I’ll link to the various forums of users who have experienced this issue farther below.
Now for the long explanation:
This first occurred when using Prime31 IAP plugins meant for Windows 8.1. Prime31 says their 8.1 IAP plugins may or may not work on Windows 8.1, as they don’t intend to officially support Windows 10 due to low demand. That’s fine, so we instead decided to use Microsoft’s official Windows 10 IAP plugins for Unity. Same error. We tried using IAP in a blank Windows Universal (non-Unity) project. Same error. I’d like to note that test IAPs using CurrentAppSimulator don’t cause these errors, only when accessing various methods within CurrentApp.
Upon further investigation, we found that a few people have encountered this error:
We tested and Windows 8.1 builds seem to have working IAPs, and this seems to be a fact confirmed by the people who’ve reported this problem. The issue seems to be specifically for Windows 10.
There’s also Microsoft’s gitHub for testing Windows 10 Universal IAP:
They catch this exact error in this example script, and the error message they log seems to imply that the issue is caused by the app not being properly associated with the store. However, we tried associating our app with the store and the same errors occurred. We took a deeper look at the documentation (as well as the notes in that example script) and it appears that Microsoft recommends downloading a privately published app and then deploying over it using a store associated build? The notes are unclear and outline a highly unorthodox testing method that wasn’t necessary for Windows 8.1. Also, we can’t store associate our app privately because our app was already submitted as Windows 8.1 builds a while ago and they’re live. Microsoft doesn’t give you the option to make individual builds private; you have to hide the entire app. This means that in order to privately test IAP from the store (without submitting a Windows 10 build with possibly broken IAP), we have to hide our perfectly working Windows 8.1 builds. This is rather unacceptable.
I somehow doubt that broken IAP would make it past Microsoft’s QA team, but it seems like there’s some native Windows 10 OS failure to reconcile licenses or store associations. An alternative explanation is that somehow we missed a step in the IAP testing procedure.
I know this isn’t specifically a Unity problem, but it definitely pertains to us Unity developers who are developing for Windows 10 (especially with the upcoming contest deadline). The last word heard from Microsoft on this was 11 days ago in an MSDN thread saying they were “looking at it”. Any help or insight would be greatly appreciated.