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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Game freezes after purchase on some samsung device

Discussion in 'Unity IAP' started by BenJuicy, Dec 5, 2022.

  1. BenJuicy

    BenJuicy

    Joined:
    Mar 16, 2020
    Posts:
    6
    After purchasing an item the game is frozen. It works perfectly on some devices but not on some others (bug found on samsung J4, J8, S6 Lite). The purchase seems to be done anyway, since when closing and reopening the game the item is there. We don't see any error log neither in the console nor in crashlytics.
    We're using unity 2020 and IAP 4.5.1.
     
  2. Arnaud_Gorain

    Arnaud_Gorain

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    172
    Hi @BenJuicy,
    Is this behavior only happening on Samsung devices? Did you try other android devices?
    Can you share more details on the tests done and which version of Android is being used?
     
  3. BenJuicy

    BenJuicy

    Joined:
    Mar 16, 2020
    Posts:
    6
    This behaviour seems to happen only on samsung devices (not all of them). It has been tested on other android devices without issues. Unfortunately I don't have access to the devices with this issue (it was found by the QA team of a company we work with). But I will ask for the android versions. I did have access to the app they used for the tests but I haven't been able to reproduce the freeze yet.
     
  4. BenJuicy

    BenJuicy

    Joined:
    Mar 16, 2020
    Posts:
    6
    Here is the list of the device the app has been tested on:

    Samsung Galaxy S7 - no crash - Android 8.0.0
    Xiaomi Mi A1 - no crash - Android 9.0.0
    Asus ROG Phone 2 - no crash - Android 10
    Samsung Galaxy J8 - crash! - Android 10
    Samsung Tab S6 lite - crash! - Android 12
    Samsung Galaxy J4 - crash! - Android 10
     
  5. Yannick_D

    Yannick_D

    Unity Technologies

    Joined:
    Feb 21, 2022
    Posts:
    218
    Hello,

    Would you be able to ask the QA team to provide the device logs?
    Is there any special manipulation done when doing the purchase that causes a crash?

    We also have this fix coming in IAP 4.5.2 that might solve the issue:
     
  6. BenJuicy

    BenJuicy

    Joined:
    Mar 16, 2020
    Posts:
    6
    Hello @Yannick_Denis.

    No special manipulation, they send me videos and it seems they're just clicking the in app button, purchase the item and then it freeze. They sent me this log. The freeze appears near the end of the log.
     

    Attached Files:

  7. John_Corbett

    John_Corbett

    Unity Technologies

    Joined:
    May 17, 2019
    Posts:
    151
    Hi @BenJuicy,

    From your logs, I see that the purchase flow is unresolved.

    I also see a bunch of error logs in your ads module, as well as some others, including some null window data. None of those error have to do with IAP, but could be stuck by IAP into a race condition, or be creating a race condition with IAP.

    Either way, I agree with @Yannick_Denis that IAP 4.5.2 should have a fix for situations where we retry indefinitely to get out of a purchase flow deadlock. It should be out shortly. I suggest you check back in a couple of days to see our announcement of it on the forum.

    Otherwise, is it possible for you to investigate to see if your app is trying to throw up another popup and creating a concurrency issue?
     
  8. Arnaud_Gorain

    Arnaud_Gorain

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    172