Why is IAP service not working when uploading aab to google play?
Something really strange is happening to me with Unity IAP service. Purchases were working correctly until the last version of the app. When uploading the last version, the IAP buttons are not showing any data and are not clickable but nothing has changed in the code that may affect it (in fact the last version includes only minor changes on strings). The error that android studio shows is:
A scripted object (probably UnityEngine.Purchasing.IAPButton?) has a different serialization layout when loading. (Read 32 bytes but expected 624 bytes) Did you #fdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
But that was not happening in the immediately previous version of the app. I tried to go back to the previous version using Git but the problem persists. Also, nothing was changed recently in that script and I couldn't find any #ifdef
condition.
But here is the weirdest thing: when compiling for production and installing the resulting app to a real device, there is no error! Only after uploading the resulting .aab file to the play store it starts to show the error.
Has anybody dealt with this issue?
Your answer
Follow this Question
Related Questions
Unity IAP Not working 0 Answers
How should I handle timeout when checking receipt of an In-App Purchase? 0 Answers
Unity IAP not working with App Bundle build. 1 Answer
IAPs problems after porting Google Play Store game to Amazon Appstore 0 Answers
unity iap class not found exception com.unity.purchasing.googleplay.googleplaypurchasing 3 Answers