Environment:
- OneStore Unity plugin 1.2.0 (com.onestorecorp.sdk:sdk-iap:21.01.00)
- Sandbox mode, Global store
The test scenario:
- Launch the app, go offline (airplane mode)
- Call PurchaseClientImpl.Initialize
- Plugin answers with "A device or server network error has occurred." (code 2)
- Restore network connection
- Call PurchaseClientImpl.Initialize once again
- Now plugin answers with "Payment requested by abnormal app." (code 12)
I have OneStore global client installed and have logged in there. If I try to launch with network connection from the start, then everything is fine, I see purchase window and can successfully proceed further (choose Fail or Success).
Here are some logs from logcat I've got (where I get code 2):
2025-03-05 12:53:27.975 1488-1602 Utils com.zimad.unityaiotest.onestore V Service enabled state value is: 0
2025-03-05 12:53:27.978 1488-1602 PurchaseClientImpl com.zimad.unityaiotest.onestore V Starting in-app purchase client setup.
2025-03-05 12:53:27.980 1488-1602 Utils com.zimad.unityaiotest.onestore V queryIntentService() - packageName: com.onestorecorp.gaa.storeapp
2025-03-05 12:53:27.980 1488-1602 Utils com.zimad.unityaiotest.onestore V queryIntentService() - className: com.onestorecorp.gaa.extern.iap.InAppGlobalPurchaseService
2025-03-05 12:53:27.987 1488-1488 PurchaseClientImpl com.zimad.unityaiotest.onestore V Purchasing service connected.
2025-03-05 12:53:27.995 1488-1602 PurchaseClientImpl com.zimad.unityaiotest.onestore V Service was bonded successfully.
2025-03-05 12:53:28.055 1488-3586 PurchaseClientImpl com.zimad.unityaiotest.onestore V In-app purchasing API does not support subscription on this device.
2025-03-05 12:53:28.081 1488-1488 Unity com.zimad.unityaiotest.onestore E ONE Store: Failed to connect to service with error code '2' and message: 'A device or server network error has occurred.'.
OneStore.Purchasing.<>c__DisplayClass20_0:b__1(AndroidJavaObject)
System.Reflection.RuntimeMethodInfo:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
UnityEngine.AndroidJavaProxy:Invoke(String, Object[])
UnityEngine._AndroidJNIHelper:InvokeJavaProxyMethod(AndroidJavaProxy, IntPtr, IntPtr)
And those ones where I get code 12:
2025-03-05 12:53:31.154 1488-1602 Utils com.zimad.unityaiotest.onestore V Service enabled state value is: 0
2025-03-05 12:53:31.158 1488-1602 PurchaseClientImpl com.zimad.unityaiotest.onestore V Starting in-app purchase client setup.
2025-03-05 12:53:31.160 1488-1602 Utils com.zimad.unityaiotest.onestore V queryIntentService() - packageName: com.onestorecorp.gaa.storeapp
2025-03-05 12:53:31.160 1488-1602 Utils com.zimad.unityaiotest.onestore V queryIntentService() - className: com.onestorecorp.gaa.extern.iap.InAppGlobalPurchaseService
2025-03-05 12:53:31.165 1488-1602 PurchaseClientImpl com.zimad.unityaiotest.onestore V Service was bonded successfully.
2025-03-05 12:53:31.165 1488-1488 PurchaseClientImpl com.zimad.unityaiotest.onestore V Purchasing service connected.
2025-03-05 12:53:31.285 24249-24266 TrafficStats com.onestorecorp.gaa.storeapp D tagSocket(6) with statsTag=0xffffffff, statsUid=-1
2025-03-05 12:53:31.549 1131-1131 BufferQueueProducer surfaceflinger I SurfaceView[com.zimad.unityaiotest.onestore/com.unity3d.player.UnityPlayerActivity]@0(BLAST)#115026 queueBuffer: fps=30.99 dur=1032.69 max=66.54 min=16.64
2025-03-05 12:53:31.888 1488-3854 PurchaseClientImpl com.zimad.unityaiotest.onestore V In-app purchasing API does not support subscription on this device.
2025-03-05 12:53:31.906 1488-1488 Unity com.zimad.unityaiotest.onestore E ONE Store: Failed to connect to service with error code '12' and message: 'Payment requested by abnormal app.'.
OneStore.Purchasing.<>c__DisplayClass20_0:b__1(AndroidJavaObject)
System.Reflection.RuntimeMethodInfo:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
UnityEngine.AndroidJavaProxy:Invoke(String, Object[])
UnityEngine._AndroidJNIHelper:InvokeJavaProxyMethod(AndroidJavaProxy, IntPtr, IntPtr)
Environment:
The test scenario:
I have OneStore global client installed and have logged in there. If I try to launch with network connection from the start, then everything is fine, I see purchase window and can successfully proceed further (choose Fail or Success).
Here are some logs from logcat I've got (where I get code 2):
And those ones where I get code 12: