Hello guys,
we encounter some ‘PurchasingUnavailable’ and ‘ProductUnavailable’ errors on the Android platform. It seems to increase lately so we looked into it. But we couldn’t really find anything.
Here just quick the documentation definitions to get it out of the way:
PurchaseFailureReason.PurchasingUnavailable
The system purchasing feature is unavailable.
Unity IAP may be disabled in security settings, or the system purchasing library may be outdated.
PurchaseFailureReason.ProductUnavailable
The product is not available to purchase on the store.
Check the product definition in the store.
About 0,5% of our Android customers encounter this problem (at least one of those problems but no pattern to spot here).
It also seems not to be consequent, since some users who already payed before faced the problem afterwards.
Since both documentation definition are just “abstract” (a lot of “may” ;)) and the “ProductUnavailable” should be consequent be thrown or not, we wonder if there is a way to dig further into it. It would be more then nice to be able to tell our customers what to do when facing such a problem.
One stack trace we found during our research was the following:
Unable to cache IAP catalog: System.UnauthorizedAccessException: Access to the path ‘/storage/emulated/0/Android/data//files/Unity/82d11ea9-91c6-4fe8-b5e3-8c8276dbb058/IAP’ is denied. at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in :0 at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in :0 at UnityEngine.Purchasing.UnityPurchasing.InstantiateCatalog (System.String storeName) [0x00000] in :0
We believe that this could be related to this problem.
Best Regards
Tom