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

Android - OnInitializeFailed bug without GP Account

Discussion in 'Unity IAP' started by alexm_scp, Jan 11, 2021.

  1. alexm_scp

    alexm_scp

    Joined:
    Nov 5, 2019
    Posts:
    24
    Hi!

    Using the version 2.2.5 I have an issue when player enters the game without his/her Google Play account.
    In the previous version 2.1.1 the IStoreListener is calling the OnInitializeFailed so I can handle the error and setting an status which is useful to know the GP account status.
    But in this new version 2.2.5 the OnInitializeFailed is not called and I have issues when player comes from background with his GP account logged because I don't know if player was logged again or not.

    Thanks
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    We are working on this, hopefully should be in the next release.
     
  3. alexm_scp

    alexm_scp

    Joined:
    Nov 5, 2019
    Posts:
    24
    Perfect, do you have any ETA for the new version of the plugin?

    Thanks
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Hopefully this week, I'm hoping that the fix will be in this release. Also, I would think it quite rare that a user would not be logged into their device. I had to go through a few hoops just to log out. However, it is indeed a valid concern.
     
  5. alexm_scp

    alexm_scp

    Joined:
    Nov 5, 2019
    Posts:
    24
    Yeah, it's a little bit weird but we've noticed that some Huawei/Xiaomi users are experiencing some issues in their GP account and sometimes these users are entering the game without their account.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Some of those devices might not have Google Play installed, which is required for IAP to function.
     
  7. alexm_scp

    alexm_scp

    Joined:
    Nov 5, 2019
    Posts:
    24
    In fact it is more complicated than that. My game is only available in Google Play store. If you don't have it you can't download it. It is not in native Huawei/Xiaomi stores.
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    That makes it less complicated :) Then you don't have to worry about devices that don't have Google Play installed. But also consider fraudulent downloads, do a Google search for your game package name.
     
  9. alexm_scp

    alexm_scp

    Joined:
    Nov 5, 2019
    Posts:
    24
    Hi @JeffDUnity3D

    I'm having similar issue with plugin version 2.2.6, package v. 2.2.2

    The plugin is calling OnInitializeFailed but not with the same error as we have in version 2.1.1.

    When entering the game without GP account the plugin is triggering different errors:
    - plugin version 2.1.1 - OnInitializeFailed - InitializationFailureReason.PurchasingUnavailable
    - plugin version 2.2.6 - OnInitializeFailed - InitializationFailureReason.NoProductsAvailable

    And the game is not working as expected.

    Thanks
     
  10. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    How is the game not working as expected? In both cases, initialization is failing. We made some changes in this area, you'll want to use the updated reason error.
     
  11. alexm_scp

    alexm_scp

    Joined:
    Nov 5, 2019
    Posts:
    24
    We are treating the error "PurchasingUnavailable" different than "NoProductsAvailable".

    Ok, so from version v2.2.6 and above we'll receive the error "NoProductsAvailable" when initialisation fails, is that correct? If so, when we'll get the other one "PurchasingUnavailable" ?
     
  12. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yeah, let me check first to ensure that's the intended behavior, now that I think about it. But in this release, you'll need to make the change.
     
  13. alexm_scp

    alexm_scp

    Joined:
    Nov 5, 2019
    Posts:
    24
    Hi @JeffDUnity3D

    did you have a chance to check when we'll get the error "PurchasingUnavailable" and if this behaviour is intended?

    Thanks
     
  14. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    The intended response and for future versions is indeed NoProductsAvailable. For this user, Purchasing is indeed available, we can hit the Google servers. But not for this user, who has no products available to them.
     
    alexm_scp likes this.