Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

ProcessPurchase Not Called on Android after Background Purchase Completion

Discussion in 'Unity IAP' started by albert8716, Feb 4, 2021.

  1. albert8716

    albert8716

    Joined:
    Nov 14, 2019
    Posts:
    8
    Unity: 2019.2.21f1
    UnityIAP: v2.2.6 and 2.2.7

    Hi,

    We just attempted to update our IAP from 1.23.6 but found an issue when testing Android devices (iOS - no issue). We have the same issue with both IAP v2.2.6 and v2.2.7, and it seems that all of our Android devices are affected.


    To summarise, purchase processing works normally in most cases but if the below steps are taken we have one case where we do not receive the processPurchase callback after a successful purchase.

    1. Purchase Consumable

    2. See GooglePlay purchases success dialog

    3. Immediately background the app before the GooglePlay success dialog is closed

    4. Bring the app back to the foreground by clicking on the app icon

    5. (Issue) No processPurchase callback is received from IAP

    If we restart the app after this, the purchase is then processed.


    When the issue occurs, our app is left in an unusable state as we disable some components such as the UI during a purchase to prevent conflicts/unexpected behavior.


    Using our previous version of the IAP SDK (v1.23.6) we cannot reproduce this issue. We assume that this may be a side-effect of the changes made in 2.2.6 regarding purchase processing.


    Many thanks.
     
    chenhaogang_mt likes this.
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, we are working on this, hopefully in an upcoming release.
     
  3. Garth

    Garth

    Joined:
    Apr 2, 2013
    Posts:
    4
    Hello! Any update? Would it be helpful if we file a ticket for this?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    This should be fixed now, sorry for the delay in responding here. Please test with 4.1.4 (the latest)
     
  5. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    Hello @JeffDUnity3D, Sorry for bump up this thread.
    I am still facing this problem, tested with Unity Purchasing 4.1.4, 4.1.5, 4.4.1 (latest version).
    I can reproduce this bug following steps same as #1 post.
    Can you please check it?
     
  6. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    in version 4.1.4 release notes, this issue was listed in "Fixed" but it stills happen.
    upload_2022-8-24_9-12-21.png
     
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    I tested with 4.3.0 and 4.4.1 and didn't see the issue. I backgrounded the app when I saw the Google success dialog. Then clicked on the app icon to bring it back to the foreground. The ProcessPurchase call was immediate. Please share your ProcessPurchase code, I'm using the Sample IAP Project v3 here https://forum.unity.com/threads/sample-iap-project.529555/#post-7922275
     
    chinhnt-imobility likes this.
  8. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    Can you try with steps?
    1. Purchase consumeable
    2. Tap "Buy" and tap home button quickly to hide the game in background ( dont close the game )
    3. Wait for 10 - 15s
    4. Tap to icon to open the game
    5. OnPurchasedFailed will be called with UserCancelled reason, tap on item you bought in step 1, You will get message "You already own this item"
     
  9. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    It works as expected for me following these steps too. I get an immediate ProcessPurchase as soon as the app is visible again. What device are you testing on? I'm testing on a Samsung phone. Please share your ProcessPurchase code.
     
  10. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    Code (CSharp):
    1.  public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs args)
    2.     {
    3. #if !UNITY_STANDALONE_WIN
    4.         try
    5.         {
    6.  
    7.             bool validPurchase = true;
    8.             if (m_IsGooglePlayStoreSelected ||
    9.             (m_IsUnityChannelSelected && m_FetchReceiptPayloadOnPurchase) ||
    10.             Application.platform == RuntimePlatform.IPhonePlayer ||
    11.             Application.platform == RuntimePlatform.OSXPlayer ||
    12.             Application.platform == RuntimePlatform.tvOS)
    13.             {
    14.                 var validator = new CrossPlatformValidator(GooglePlayTangle.Data(), AppleTangle.Data(), Application.identifier);
    15.  
    16.                 try
    17.                 {
    18.                     var result = validator.Validate(args.purchasedProduct.receipt);
    19.  
    20.                     foreach (IPurchaseReceipt productReceipt in result)
    21.                     {
    22.                         Debug.Log(productReceipt.productID);
    23.                         Debug.Log(productReceipt.purchaseDate);
    24.                         Debug.Log(productReceipt.transactionID);
    25.  
    26.                         GooglePlayReceipt google = productReceipt as GooglePlayReceipt;
    27.                         if (null != google)
    28.                         {
    29.                             Debug.Log(google.purchaseState);
    30.                             Debug.Log(google.purchaseToken);
    31.                         }
    32.                         AppleInAppPurchaseReceipt apple = productReceipt as AppleInAppPurchaseReceipt;
    33.                         if (null != apple)
    34.                         {
    35.                             Debug.Log(apple.originalTransactionIdentifier);
    36.                             Debug.Log(apple.subscriptionExpirationDate);
    37.                             Debug.Log(apple.cancellationDate);
    38.                             Debug.Log(apple.quantity);
    39.                         }
    40.                     }
    41.                 }
    42.                 catch (IAPSecurityException ex)
    43.                 {
    44.  
    45.                     Debug.Log("Invalid receipt, not unlocking content. " + ex);
    46.  
    47.                     validPurchase = false;
    48.  
    49.                     return PurchaseProcessingResult.Complete;
    50.                 }
    51.  
    52.             }
    53.  
    54.  
    55.             if (validPurchase)
    56.             {
    57.                 if (GameConfigManager.Instance.tableGlobal.enable_coroutine_iap == 1)
    58.                 {
    59.                     StartCoroutine(IEOnPurchaseSucessed());
    60.                 }
    61.                 else
    62.                 {
    63.                     OnPurchaseSucessed();
    64.                 }
    65.  
    66. #if !TEST_VERSION
    67. #if UNITY_ANDROID
    68.                         GameAnalyticManager.FBPurchase(args);
    69. #endif
    70. #endif
    71.             }
    72.             else
    73.             {
    74.                 if (this.purchaseFailCb != null)
    75.                 {
    76.                     this.purchaseFailCb(PurchaseFailureReason.SignatureInvalid);
    77.                 }
    78.  
    79.             }
    80.  
    81.  
    82.         }
    83.         catch (Exception msg)
    84.         {
    85.             DebugUtils.LogException(msg);
    86.             return PurchaseProcessingResult.Complete;
    87.         }
    88. #endif
    89.  
    90.         return PurchaseProcessingResult.Complete;
    91.     }
     
  11. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    Unity 2020.3.32, device: OPPO A16k, Xiaomi Redmi Note 5 Pro
     
  12. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Your code is different from mine, you are starting a co-routine for example. I'm using the code right from the Sample IAP Project.
     
  13. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    No, i already turn off coroutine, assume enable_coroutine_iap = 0

    Many users reported they purchased and money was charged but they didn't recieve their goods, i use biggquery and confirm this issue happen in many devices.
    upload_2022-8-24_9-41-59.png
     
  14. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Be that as it may, it doesn't reproduce for me so I can't recommend any action to engineering. So far you are the only person seeing this issue. I would ask you to compare to the Sample IAP Project. If we hear additional reports of this behavior from other users, I will revisit the issue at that time.
     
  15. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    I will use your sample project to reproduce this bug, Do you have any debug to add more?
     
  16. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry, what do you mean by "any debug to add more"?
     
  17. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    I mean if you want to add any addition debug.log in code to see.
     
  18. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    The Sample project already has Debug.Log calls in all the purchase and callback methods. It also conveniently writes this information to the UI.
     
  19. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    I tested with unity example project, it stills happen, i will send video in private message.
     
  20. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    Code (CSharp):
    1. 2022-08-24 10:14:31.013 1482-3769/? I/ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=my_game_bundle_id/com.unity3d.player.UnityPlayerActivity bnds=[32,466][196,657] mCallingUid=10098} from uid 10098 and from pid 2296
    2. 2022-08-24 10:14:31.019 1482-3769/? I/InputDispatcher: setFocusedApplication displayId=0 ActivityRecord{ccd2351 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity t1378}
    3. 2022-08-24 10:14:31.049 1482-2412/? V/DCSEX-AppSwitchManager: OnAppSwitchObserver: onAppExit , info = OplusAppExitInfo = {  targetName = com.oppo.launcher hasResumingActivity = true resumingPackageName = my_game_bundle_id resumingActivityName = com.unity3d.player.UnityPlayerActivity resumingWindowMode = 1 isResumingMultiApp = false isResumingFirstStart = false extension = Bundle[{taskId=1378, uid=10721}]}
    4. 2022-08-24 10:14:31.051 1482-2412/? V/DCSEX-AppSwitchManager: OnAppSwitchObserver: onAppEnter , info = OplusAppEnterInfo = {  windowMode = 1 targetName = my_game_bundle_id multiApp = false firstStart = false launchedFromPackage = com.google.android.packageinstaller intent = Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=my_game_bundle_id cmp=my_game_bundle_id/com.unity3d.player.UnityPlayerActivity mCallingUid=10067 } extension = Bundle[{taskId=1378, uid=10721}]}
    5. 2022-08-24 10:14:31.088 20494-20494/? V/PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@f71d9db, this = DecorView@e3cac78[UnityPlayerActivity]
    6. 2022-08-24 10:14:31.093 20494-20494/? V/PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@f71d9db, this = DecorView@e3cac78[UnityPlayerActivity]
    7. 2022-08-24 10:14:31.117 1482-3769/? I/WindowManager: Relayout Window{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity}: oldVis=4 newVis=0 focusMayChange = true
    8. 2022-08-24 10:14:31.130 1482-3769/? W/WindowManager: Changing focus fromnull to Window{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity} displayId=0 Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:515 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:6118 com.android.server.wm.WindowManagerService.relayoutWindow:2748 com.android.server.wm.Session.relayout:229
    9. 2022-08-24 10:14:31.174 1482-1497/? I/InputDispatcher: Window went away: my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    10. 2022-08-24 10:14:31.175 1482-1515/? D/ArtManagerInternalImpl: /data/misc/iorapd/my_game_bundle_id/107000/com.unity3d.player.UnityPlayerActivity/compiled_traces/compiled_trace.pb doesn't exist
    11. 2022-08-24 10:14:31.191 740-815/? D/DispPerfService: onframeavailable pid=20494, slot=0, seq=47206, name=my_game_bundle_id:my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    12. 2022-08-24 10:14:31.200 1482-2558/? I/InputDispatcher: Focus entered window: Window{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity} in display 0
    13. 2022-08-24 10:14:31.232 740-740/? E/OppoExLayer: using cid as pid, cid=20494, name=Background for -SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    14. 2022-08-24 10:14:31.491 740-816/? D/DispPerfService: onframeavailable pid=20494, slot=0, seq=47209, name=my_game_bundle_id:SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    15. 2022-08-24 10:14:32.120 3152-3212/? E/oiface: Abnormal! my_game_bundle_id[SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] current fps is: 84489904.000000 abnormal, return 0
    16. 2022-08-24 10:14:38.624 20494-20494/? D/ViewRootImpl[UnityPlayerActivity]: processMotionEvent MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=120.0, y[0]=788.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=624594750, downTime=624594750, deviceId=4, source=0x1002, displayId=0 }
    17. 2022-08-24 10:14:38.625 20494-20494/? D/ViewRootImpl[UnityPlayerActivity]: dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=120.0, y[0]=788.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=624594750, downTime=624594750, deviceId=4, source=0x1002, displayId=0 }
    18. 2022-08-24 10:14:38.756 20494-20494/? D/ViewRootImpl[UnityPlayerActivity]: processMotionEvent MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=120.0, y[0]=788.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=624594885, downTime=624594750, deviceId=4, source=0x1002, displayId=0 }
    19. 2022-08-24 10:14:38.757 20494-20494/? D/ViewRootImpl[UnityPlayerActivity]: dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=120.0, y[0]=788.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=624594885, downTime=624594750, deviceId=4, source=0x1002, displayId=0 }
    20. 2022-08-24 10:14:39.712 20494-20562/? I/Unity: Starting Initialized...
    21. 2022-08-24 10:14:41.428 20494-20562/? W/Unity: Unavailable product sub_monthly-sub_monthly
    22. 2022-08-24 10:14:41.428 20494-20562/? W/Unity: Unavailable product sub_yearly-sub_yearly
    23. 2022-08-24 10:14:41.434 20494-20562/? I/Unity: OnInitialized: PASS
    24. 2022-08-24 10:14:47.664 20494-20494/? D/ViewRootImpl[UnityPlayerActivity]: processMotionEvent MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=326.0, y[0]=702.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=624603784, downTime=624603784, deviceId=4, source=0x1002, displayId=0 }
    25. 2022-08-24 10:14:47.665 20494-20494/? D/ViewRootImpl[UnityPlayerActivity]: dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=326.0, y[0]=702.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=624603784, downTime=624603784, deviceId=4, source=0x1002, displayId=0 }
    26. 2022-08-24 10:14:47.774 20494-20494/? D/ViewRootImpl[UnityPlayerActivity]: processMotionEvent MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=326.0, y[0]=702.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=624603903, downTime=624603784, deviceId=4, source=0x1002, displayId=0 }
    27. 2022-08-24 10:14:47.775 20494-20494/? D/ViewRootImpl[UnityPlayerActivity]: dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=326.0, y[0]=702.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=624603903, downTime=624603784, deviceId=4, source=0x1002, displayId=0 }
    28. 2022-08-24 10:14:47.796 20494-20562/? I/Unity: Purchasing product:iap_pack1
    29. 2022-08-24 10:14:47.928 1482-2558/? D/ActivityTaskManager: setWillCloseOrEnterPip:false ActivityRecord:ActivityRecord{ccd2351 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity t1378} callers:com.android.server.wm.ActivityStack.completePauseLocked:1354 com.android.server.wm.ActivityRecord.activityPaused:5422 com.android.server.wm.ActivityTaskManagerService.activityPaused:2006 android.app.IActivityTaskManager$Stub.onTransact:1956 com.android.server.wm.OppoActivityTaskManagerService.onTransact:180
    30. 2022-08-24 10:14:47.937 1482-2558/? W/WindowManager: Changing focus fromWindow{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity} to null displayId=0 Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:515 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:6118 com.android.server.wm.DisplayContent.setFocusedApp:5994 com.android.server.wm.ActivityTaskManagerService.setResumedActivityUncheckLocked:5842
    31. 2022-08-24 10:14:47.973 1482-3769/? I/InputDispatcher: Focus left window: Window{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity} in display 0
    32. 2022-08-24 10:14:54.538 1482-2162/? I/InputDispatcher: Window went away: Window{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity}
    33. 2022-08-24 10:14:55.316 20494-20494/? V/PhoneWindow: DecorView setVisiblity: visibility = 4, Parent = android.view.ViewRootImpl@f71d9db, this = DecorView@e3cac78[UnityPlayerActivity]
    34. 2022-08-24 10:14:55.325 740-740/? D/OppoExLayer: ~Layer() sequence=47210, name=Background for -SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0@0xb400007570ce4000
    35. 2022-08-24 10:14:55.375 1482-3771/? I/InputDispatcher: Window went away: my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    36. 2022-08-24 10:14:55.375 1482-3771/? I/InputDispatcher: Window went away: SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    37. 2022-08-24 10:14:55.395 740-740/? I/BufferQueue: [my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0](this:0xb40000757751c058,id:7515,api:2,p:-1,c:-1) onDestructor()
    38. 2022-08-24 10:14:55.396 740-740/? D/OppoExLayer: ~Layer() sequence=47206, name=my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0@0xb400007556954000
    39. 2022-08-24 10:14:55.396 740-740/? D/OppoExLayer: ~Layer() sequence=47208, name=Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0@0xb400007570c49000
    40. 2022-08-24 10:14:55.396 740-740/? I/BufferQueue: [SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0](this:0xb4000075710f5858,id:7516,api:1,p:-1,c:-1) onDestructor()
    41. 2022-08-24 10:14:55.396 740-740/? D/OppoExLayer: ~Layer() sequence=47209, name=SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0@0xb400007570cb3000
    42. 2022-08-24 10:15:09.600 1482-3493/? I/ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=my_game_bundle_id/com.unity3d.player.UnityPlayerActivity bnds=[32,466][196,657] mCallingUid=10098} from uid 10098 and from pid 2296
    43. 2022-08-24 10:15:09.643 1482-2412/? V/DCSEX-AppSwitchManager: OnAppSwitchObserver: onAppExit , info = OplusAppExitInfo = {  targetName = com.oppo.launcher hasResumingActivity = true resumingPackageName = my_game_bundle_id resumingActivityName = com.unity3d.player.UnityPlayerActivity resumingWindowMode = 1 isResumingMultiApp = false isResumingFirstStart = false extension = Bundle[{taskId=1378, uid=10721}]}
    44. 2022-08-24 10:15:09.643 1482-3493/? I/InputDispatcher: setFocusedApplication displayId=0 ActivityRecord{ccd2351 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity t1378}
    45. 2022-08-24 10:15:09.656 1482-2412/? V/DCSEX-AppSwitchManager: OnAppSwitchObserver: onAppEnter , info = OplusAppEnterInfo = {  windowMode = 1 targetName = my_game_bundle_id multiApp = false firstStart = false launchedFromPackage = com.google.android.packageinstaller intent = Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=my_game_bundle_id cmp=my_game_bundle_id/com.unity3d.player.UnityPlayerActivity mCallingUid=10067 } extension = Bundle[{taskId=1378, uid=10721}]}
    46. 2022-08-24 10:15:09.673 20494-20494/? V/PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@f71d9db, this = DecorView@e3cac78[UnityPlayerActivity]
    47. 2022-08-24 10:15:09.697 20494-20494/? V/PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@f71d9db, this = DecorView@e3cac78[UnityPlayerActivity]
    48. 2022-08-24 10:15:09.702 1482-1575/? I/WindowManager: Relayout Window{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity}: oldVis=8 newVis=0 focusMayChange = true
    49. 2022-08-24 10:15:09.711 1482-1575/? W/WindowManager: Changing focus fromnull to Window{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity} displayId=0 Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:515 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:6118 com.android.server.wm.WindowManagerService.relayoutWindow:2748 com.android.server.wm.Session.relayout:229
    50. 2022-08-24 10:15:09.748 1482-1911/? I/InputDispatcher: Window went away: my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    51. 2022-08-24 10:15:09.768 740-816/? D/DispPerfService: onframeavailable pid=20494, slot=0, seq=47243, name=my_game_bundle_id:my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    52. 2022-08-24 10:15:09.778 1482-1515/? D/ArtManagerInternalImpl: /data/misc/iorapd/my_game_bundle_id/107000/com.unity3d.player.UnityPlayerActivity/compiled_traces/compiled_trace.pb doesn't exist
    53. 2022-08-24 10:15:09.789 1482-2558/? I/InputDispatcher: Focus entered window: Window{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity} in display 0
    54. 2022-08-24 10:15:09.900 740-740/? E/OppoExLayer: using cid as pid, cid=20494, name=Background for -SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    55. 2022-08-24 10:15:10.113 20494-20562/? W/Unity: onPurchaseFailedEvent(productId:iap_pack1 message:Billing dialog closed.)
    56. 2022-08-24 10:15:10.242 20494-20562/? I/Unity: OnPurchaseFailed: FAIL. Product: 'iap_pack1', PurchaseFailureReason: UserCancelled
    57. 2022-08-24 10:15:10.281 740-1248/? D/DispPerfService: onframeavailable pid=20494, slot=0, seq=47247, name=my_game_bundle_id:SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    58. 2022-08-24 10:15:10.711 3152-3212/? E/oiface: Abnormal! my_game_bundle_id[SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] current fps is: 182017168.000000 abnormal, return 0
    59. 2022-08-24 10:15:20.648 20494-20494/? D/ViewRootImpl[UnityPlayerActivity]: processMotionEvent MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=317.0, y[0]=693.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=624636772, downTime=624636772, deviceId=4, source=0x1002, displayId=0 }
    60. 2022-08-24 10:15:20.649 20494-20494/? D/ViewRootImpl[UnityPlayerActivity]: dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=317.0, y[0]=693.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=624636772, downTime=624636772, deviceId=4, source=0x1002, displayId=0 }
    61. 2022-08-24 10:15:20.779 20494-20494/? D/ViewRootImpl[UnityPlayerActivity]: processMotionEvent MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=317.0, y[0]=693.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=624636907, downTime=624636772, deviceId=4, source=0x1002, displayId=0 }
    62. 2022-08-24 10:15:20.779 20494-20494/? D/ViewRootImpl[UnityPlayerActivity]: dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=317.0, y[0]=693.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=624636907, downTime=624636772, deviceId=4, source=0x1002, displayId=0 }
    63. 2022-08-24 10:15:20.793 20494-20562/? I/Unity: Purchasing product:iap_pack1
    64. 2022-08-24 10:15:20.866 1482-2558/? D/ActivityTaskManager: setWillCloseOrEnterPip:false ActivityRecord:ActivityRecord{ccd2351 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity t1378} callers:com.android.server.wm.ActivityStack.completePauseLocked:1354 com.android.server.wm.ActivityRecord.activityPaused:5422 com.android.server.wm.ActivityTaskManagerService.activityPaused:2006 android.app.IActivityTaskManager$Stub.onTransact:1956 com.android.server.wm.OppoActivityTaskManagerService.onTransact:180
    65. 2022-08-24 10:15:20.875 1482-2558/? W/WindowManager: Changing focus fromWindow{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity} to null displayId=0 Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:515 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:6118 com.android.server.wm.DisplayContent.setFocusedApp:5994 com.android.server.wm.ActivityTaskManagerService.setResumedActivityUncheckLocked:5842
    66. 2022-08-24 10:15:20.911 1482-2558/? I/InputDispatcher: Focus left window: Window{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity} in display 0
    67. 2022-08-24 10:15:28.995 1482-3786/? I/InputDispatcher: setFocusedApplication displayId=0 ActivityRecord{ccd2351 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity t1378}
    68. 2022-08-24 10:15:28.997 1482-3786/? W/WindowManager: Changing focus fromWindow{672529d u0 my_game_bundle_id/com.android.billingclient.api.ProxyBillingActivity} to Window{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity} displayId=0 Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:515 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:6118 com.android.server.wm.DisplayContent.setFocusedApp:5994 com.android.server.wm.ActivityTaskManagerService.setResumedActivityUncheckLocked:5842
    69. 2022-08-24 10:15:28.998 715-759/? I/mtkpower@impl: [notifyAppState] act com.android.billingclient.api.ProxyBillingActivity => com.unity3d.player.UnityPlayerActivity
    70. 2022-08-24 10:15:29.056 1482-3786/? I/InputDispatcher: Focus entered window: Window{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity} in display 0
    71. 2022-08-24 10:15:29.082 20494-20494/? V/PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@f71d9db, this = DecorView@e3cac78[UnityPlayerActivity]
    72. 2022-08-24 10:15:29.228 20494-20562/? W/Unity: onPurchaseFailedEvent(productId:iap_pack1 message:)
    73. 2022-08-24 10:15:29.229 20494-20562/? I/Unity: OnPurchaseFailed: FAIL. Product: 'iap_pack1', PurchaseFailureReason: DuplicateTransaction
    74. 2022-08-24 10:15:30.131 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 1009688154 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    75. 2022-08-24 10:15:30.131 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    76. 2022-08-24 10:15:31.143 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 2021342847 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    77. 2022-08-24 10:15:31.143 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    78. 2022-08-24 10:15:32.151 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 3029754308 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    79. 2022-08-24 10:15:32.151 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    80. 2022-08-24 10:15:33.169 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 4047823308 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    81. 2022-08-24 10:15:33.169 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    82. 2022-08-24 10:15:34.171 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 5049538231 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    83. 2022-08-24 10:15:34.171 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    84. 2022-08-24 10:15:35.172 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 6050593308 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    85. 2022-08-24 10:15:35.172 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    86. 2022-08-24 10:15:36.177 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 7056255462 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    87. 2022-08-24 10:15:36.178 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    88. 2022-08-24 10:15:37.181 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 8059624616 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    89. 2022-08-24 10:15:37.181 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    90. 2022-08-24 10:15:38.181 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 9060195539 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    91. 2022-08-24 10:15:38.182 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    92. 2022-08-24 10:15:39.193 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 10071939924 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    93. 2022-08-24 10:15:39.193 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    94. 2022-08-24 10:15:40.194 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 11072941155 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    95. 2022-08-24 10:15:40.194 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    96. 2022-08-24 10:15:41.210 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 12088879770 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    97. 2022-08-24 10:15:41.210 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    98. 2022-08-24 10:15:42.216 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 13094520001 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    99. 2022-08-24 10:15:42.216 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    100. 2022-08-24 10:15:43.233 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 14112230770 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    101. 2022-08-24 10:15:43.234 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    102. 2022-08-24 10:15:44.245 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 15123866232 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    103. 2022-08-24 10:15:44.245 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    104. 2022-08-24 10:15:45.247 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 16125370386 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    105. 2022-08-24 10:15:45.247 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    106. 2022-08-24 10:15:46.266 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 17144720232 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    107. 2022-08-24 10:15:46.266 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    108. 2022-08-24 10:15:47.287 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 18166120386 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    109. 2022-08-24 10:15:47.287 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    110. 2022-08-24 10:15:48.295 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 19173612309 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    111. 2022-08-24 10:15:48.295 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    112. 2022-08-24 10:15:49.299 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 20178027925 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    113. 2022-08-24 10:15:49.299 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    114. 2022-08-24 10:15:50.312 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 21190471232 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    115. 2022-08-24 10:15:50.312 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    116. 2022-08-24 10:15:51.328 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 22207075540 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    117. 2022-08-24 10:15:51.328 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    118. 2022-08-24 10:15:52.329 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 23207573232 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    119. 2022-08-24 10:15:52.329 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    120. 2022-08-24 10:15:53.329 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 24207717540 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    121. 2022-08-24 10:15:53.329 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    122. 2022-08-24 10:15:53.905 1482-3776/? D/ActivityTaskManager: setWillCloseOrEnterPip:true ActivityRecord:ActivityRecord{ccd2351 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity t1378} callers:com.android.server.wm.ActivityStack.resumeTopActivityInnerLocked:1935 com.android.server.wm.ActivityStack.resumeTopActivityUncheckedLocked:1722 com.android.server.wm.RootWindowContainer.resumeFocusedStacksTopActivities:2484 com.android.server.wm.ActivityStarter.startActivityInner:2270 com.android.server.wm.ActivityStarter.startActivityUnchecked:1978
    123. 2022-08-24 10:15:53.965 1482-1574/? D/ActivityTaskManager: setWillCloseOrEnterPip:false ActivityRecord:ActivityRecord{ccd2351 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity t1378} callers:com.android.server.wm.ActivityStack.completePauseLocked:1354 com.android.server.wm.ActivityRecord.activityPaused:5422 com.android.server.wm.ActivityTaskManagerService.activityPaused:2006 android.app.IActivityTaskManager$Stub.onTransact:1956 com.android.server.wm.OppoActivityTaskManagerService.onTransact:180
    124. 2022-08-24 10:15:53.997 1482-1574/? I/InputDispatcher: Focus left window: Window{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity} in display 0
    125. 2022-08-24 10:15:53.997 1482-1574/? I/InputDispatcher: Window went away: Window{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity}
    126. 2022-08-24 10:15:54.019 1482-1575/? W/WindowManager: Changing focus fromWindow{d4a3da4 u0 my_game_bundle_id/com.unity3d.player.UnityPlayerActivity} to null displayId=0 Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:515 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:6118 com.android.server.wm.DisplayContent.setFocusedApp:5994 com.android.server.wm.ActivityTaskManagerService.setResumedActivityUncheckLocked:5842
    127. 2022-08-24 10:15:54.345 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 25223713386 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    128. 2022-08-24 10:15:54.345 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    129. 2022-08-24 10:15:55.345 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] sync point 3 wait timeout 26223921771 for my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    130. 2022-08-24 10:15:55.345 740-740/? W/Layer: [Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0] !frameIsAvailable mPendingStates size:1(1424)
    131. 2022-08-24 10:15:55.796 740-740/? D/OppoExLayer: ~Layer() sequence=47248, name=Background for -SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0@0xb400007556948000
    132. 2022-08-24 10:15:55.821 20494-20494/? V/PhoneWindow: DecorView setVisiblity: visibility = 4, Parent = android.view.ViewRootImpl@f71d9db, this = DecorView@e3cac78[UnityPlayerActivity]
    133. 2022-08-24 10:15:55.848 1482-1575/? I/InputDispatcher: Window went away: my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    134. 2022-08-24 10:15:55.849 1482-1575/? I/InputDispatcher: Window went away: SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0
    135. 2022-08-24 10:15:55.862 740-740/? I/BufferQueue: [my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0](this:0xb400007577474658,id:7522,api:2,p:-1,c:-1) onDestructor()
    136. 2022-08-24 10:15:55.863 740-740/? D/OppoExLayer: ~Layer() sequence=47243, name=my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0@0xb4000075569bc000
    137. 2022-08-24 10:15:55.863 740-740/? D/OppoExLayer: ~Layer() sequence=47246, name=Bounds for - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0@0xb400007577550000
    138. 2022-08-24 10:15:55.863 740-740/? I/BufferQueue: [SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0](this:0xb40000757758f058,id:7523,api:1,p:-1,c:-1) onDestructor()
    139. 2022-08-24 10:15:55.863 740-740/? D/OppoExLayer: ~Layer() sequence=47247, name=SurfaceView - my_game_bundle_id/com.unity3d.player.UnityPlayerActivity#0@0xb400007577553000
    140. 2022-08-24 10:16:58.785 23514-23567/? W/wManagerPropertyUpdater: Could not find generated setter for class com.reactnativecommunity.art.ARTGroupViewManager
    141. 2022-08-24 10:16:58.786 23514-23567/? W/wManagerPropertyUpdater: Could not find generated setter for class com.reactnativecommunity.art.a
    142. 2022-08-24 10:16:58.790 23514-23567/? W/wManagerPropertyUpdater: Could not find generated setter for class com.reactnativecommunity.art.ARTShapeViewManager
    143. 2022-08-24 10:16:58.791 23514-23567/? W/wManagerPropertyUpdater: Could not find generated setter for class com.reactnativecommunity.art.c
    144. 2022-08-24 10:16:58.813 23514-23567/? W/wManagerPropertyUpdater: Could not find generated setter for class com.reactnativecommunity.art.ARTSurfaceViewManager
    145. 2022-08-24 10:16:58.814 23514-23567/? W/wManagerPropertyUpdater: Could not find generated setter for class com.reactnativecommunity.art.d
    146. 2022-08-24 10:16:58.846 23514-23567/? W/wManagerPropertyUpdater: Could not find generated setter for class com.reactnativecommunity.art.ARTTextViewManager
    147. 2022-08-24 10:16:58.847 23514-23567/? W/wManagerPropertyUpdater: Could not find generated setter for class com.reactnativecommunity.art.e
    148. 2022-08-24 10:16:58.848 23514-23567/? W/wManagerPropertyUpdater: Could not find generated setter for class com.reactnativecommunity.webview.RNCWebViewManager
    149.  
     
  21. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    So you are cancelling the transaction by clicking outside the purchase dialog and not by tapping the Home button. Or your phone is doing that. I get the UserCancelled message when I do this also. And oddly and occasionally, I too get the Duplicate Transaction after that which is unexpected. I will dig a little further.
     
  22. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    I recieved a reciept from Google Play that mean purchase was succced and money was charged but OnPurchaseFailed was called
     
  23. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it. Yes, that would be a problem too. I will let the IAP engineering team know.
     
  24. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    Nice, Thank, Can you tell me whenever new version will be released ? Any estimated time is appreciate :D
     
  25. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    chinhnt-imobility likes this.
  26. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    @chinhnt-imobility Are you building with Mono or IL2CPP? When I build for IL2CPP, I don't see the issue.
     
  27. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    I tested with mono and IL2CPP, the issue still persist.
     
  28. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
  29. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you confirm you properly get UserCancelled when touching the app background when the initial Google popup appears? You should see "Test card, always approves" and I see 1-Tap buy on the button. Is your issue only after the Success dialog is being shown? We've now heard similar reports of this behavior so something is amiss at our end. It has the appearance of a possible race condition, I'm not seeing the issue anymore. I did have a slow network yesterday that was fixed by rebooting my router. So perhaps I'm now receiving callbacks faster, which would be concerning if behavior depends on internet speed. Are you using WiFi or your phone data?
     
  30. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    I am using WIFI, not data
    I can reproduce this bug by 100%
     
  31. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    I have to tap "Buy" on Google popup not my game popup, then tap "Home" button to hide the game in background,
     
  32. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you can please perform the test that I'm suggesting? I'm asking you to tap on your game to Cancel, can you confirm you get UserCancelled? Let's see if that is working.
     
  33. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    Sure, i got UserCancelled reason
     
  34. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
  35. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    I can no longer reproduce.
     
  36. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    Are u sure? I still can reproduce with step above
     
  37. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    Did you let IAP team know this issue ?
     
  38. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, I will continue testing. Does the same thing happen for a new test user also? Also, ensure that you do not have /Assets/Resources/IAPProductCatalog.json file. If this is present with auto-initialize = true when using Scripted IAP, we will attempt to wire up additional listeners which can lead to problems. Something to check. Also, please test with IAP 4.4.1
     
  39. chinhnt-imobility

    chinhnt-imobility

    Joined:
    Nov 2, 2018
    Posts:
    25
    it has been a month, any good news? please