[Closed] UnityEngine.Purchasing.Security.InvalidSignatureException

Hello. We have implemented Google Play IAP and are currently seeing this exception in Unity Game Performance Monitor:

InvalidSignatureException: Exception of type ‘UnityEngine.Purchasing.Security.InvalidSignatureException’ was thrown.

UnityEngine.Purchasing.Security.GooglePlayValidator.Validate (System.String receipt, System.String signature)
UnityEngine.Purchasing.Security.CrossPlatformValidator.Validate (System.String unityIAPReceipt)
McInAppPurchaseHandler.UpdateSubscriptionStatus ()
McInAppPurchaseHandler.OnInitialized (IStoreController controller, IExtensionProvider extensions)
UnityEngine.Purchasing.StoreListenerProxy.OnInitialized (IStoreController controller)
UnityEngine.Purchasing.PurchasingManager.CheckForInitialization ()
UnityEngine.Purchasing.PurchasingManager.OnProductsRetrieved (System.Collections.Generic.List`1 products)
UnityEngine.Purchasing.NativeJSONStore.OnProductsRetrieved (System.String json)
UnityEngine.Purchasing.ScriptingUnityCallback+c__AnonStorey1.<>m__0 ()
UnityEngine.Purchasing.Extension.UnityUtil.Update ()

The receipt when logged looks okay:
Receipt{“Store”:“GooglePlay”,“TransactionID”:"hkbgngjkagledkkbpjgc … etc (secret JSON stuff here)

I can find no information about “UnityEngine.Purchasing.Security.InvalidSignatureException”. Not 1 website listed on google! Please advise on how we can fix this. Thank you.

1 Like

Hi @m4ko ,

Sorry about the lack of documentation about this error. Documentation is an area that we are trying to improve.

That error is being raised because the signature on the receipt is being marked as invalid.

We would like to take a deeper look into this. Would you be able to submit a support ticket and send us the full receipt?