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

Unity can't make purchase on android platform, PurchaseFailureReason:Unknown and {M: GPUL.HEC}

Discussion in 'Unity IAP' started by ufadhlullah, Mar 23, 2021.

Thread Status:
Not open for further replies.
  1. ufadhlullah

    ufadhlullah

    Joined:
    Mar 24, 2020
    Posts:
    6
    Hello Unity,
    We experienced trouble when purchasing item on Android. Our app already published, it went well on testing phase (using license, etc) but it failed when using real money, it always returned "Transaction was declined." and the UnityIAP returned "PurchaseFailureReason: Unknown", and we also saw this "GOOGLEPLAY_6:Error". We used UnityIAP version 1.23.1 and Unity 2019.4.17f1 in this case, I attached the log file (logiap.txt).

    Then we build the app again and upload it as alpha test. We thought maybe it was because the UnityIAP out of date, so we tried using the latest stable version 2.1.1 but it still returned "Transaction was declined." and "PurchaseFailureReason: Unknown", but this time there was no message (sorry I didn't do log for this version, but if you need it, I will returned to this version and log it).

    Then our last effort was to update it again to the latest version 3.0.1 (of course we followed the instructions to migrate), but it still again returned "Transaction was declined." and "PurchaseFailureReason: Unknown", but this time the message was "{M: GPUL.HEC}", I attached the log file for this version (logiap301.txt).

    We need help ASAP, because we noticed this problem after the app published.

    Thank you..
     

    Attached Files:

  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    From the logs, it looks like you might be initializing IAP on every purchase? You want to use a singleton pattern, if you are not, and initialize only once. Have you tried with a different device or a different phone profile account? Error 6 can mean there is an account problem. What user is logged into the Play Store app on the device? You might want to compare to IAPManager.cs in the Sample IAP Project here https://forum.unity.com/threads/sample-iap-project.529555/#post-6950270
     
  3. ufadhlullah

    ufadhlullah

    Joined:
    Mar 24, 2020
    Posts:
    6
    Hi Jeff, thank you for your fast reply
    Actually we weren't initalizing IAP on every purchase, we just Debug Log it to make sure it was initialized (I assumed you saw the logiap301), and that log was snipped from when the app start as you can see the "homepageloaded" and then go straight to buy product using IAP.

    Yes, I've tried with different device and with different google account. Actually the error 6 occurs on our published app, and all the IAP was declined as we see in the playstore console, and after that we inspect it and found the error 6.

    Okay Jeff I will compare it, thank you
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    So you didn't test IAP before you published? Have you logged into your Google Play console to ensure you've signed all necessary prompts and Terms of Service updates?
     
  5. ufadhlullah

    ufadhlullah

    Joined:
    Mar 24, 2020
    Posts:
    6
    We did.. We tested it before, and I forgot to tell you that we also published on iOS as well. It went well there and android was either. But somehow at mid february, the IAP on android were all getting declined. So here we are..

    [EDITED]
    Sorry, I mean mid february
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    So nothing changed, no new releases from you and suddenly IAP started failing, understood. That would imply an issue on the Google end, perhaps with your developer account. I just tested with the Sample IAP Project that I have published, and it works OK.
     
    ufadhlullah likes this.
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    If you want, you can add me to your Alpha testing, ensure to add me as a licensed tester so I don't get charged for IAP purchases. Send me a private message and I'll provide my tester email

    GoogleLicenseTesting.png
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    I should add, I've never seen the error message "M: GPUL.HEC" and Google search doesn't help
     
  9. ufadhlullah

    ufadhlullah

    Joined:
    Mar 24, 2020
    Posts:
    6
    Sorry for the late reply Jeff,
    Yes me too, but I saw it on this thread, on the log he provides (line 106 and 158), but as I read it, I didn't find anything that could help except update the UnityIAP..
     
  10. ufadhlullah

    ufadhlullah

    Joined:
    Mar 24, 2020
    Posts:
    6
    Hi @JeffDUnity3D,
    Thank you for your support and time. It turned out that our Google's merchant account have issues that need to be resolved by filling a merchant profiles form. In some country they need to verify our profile again, so after contact google and filling the form, google said that in maximum 3 days it should be resolved.

    If anyone have these error too, you probably should recheck your merchant account.
    Thank you
     
    SDJdasha and developer2nanali like this.
  11. ABerlemont

    ABerlemont

    Joined:
    Sep 27, 2012
    Posts:
    66
    @ufadhlullah
    Can you point where anyone should look into the play console :D to check for that merchant account issue ?

    Thanks !
     
  12. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    What version of Unity are you using? I've heard reports that the Unity version can make a difference, unfortunately I don't have specifics. Can you try with Unity 2020 if you are using Unity 2019?
     
  13. ufadhlullah

    ufadhlullah

    Joined:
    Mar 24, 2020
    Posts:
    6
    Do you mean on the google play console? If it is, on my case it was on the front page (app list) after you logged in as developer. You can see it clearly if you had an issue, marked as warning with yellow sign or red if it really need your action to solved it. And in my case it was red but we didn't thought it will cause the iap to fail entirely on every countries as they said we need fill form for a country requirement. Well, we learn everyday . Have a nice day
     
  14. Talrhyon

    Talrhyon

    Joined:
    Jun 8, 2019
    Posts:
    16
    Hi everyone, i have the same error on purchasing :
    "unable to purchase requested item" .
    When i see my log , i have this :
    onPurchaseFailedEvent(productId:coin_50 message: {M: GPUL.HEC})
    Then :
    onPurchaseFailed : FAIL.Product 'coin_50', PurchaseFailureReason: Unknown.
    May you help me please ?

    I have Unity AP version : 3.0.1 on Unity 2019.4.25f1
    Thank a lot
     
  15. beladolazeng

    beladolazeng

    Joined:
    Jul 23, 2018
    Posts:
    6
    Hi, I have the same problem on purchasing :
    onPurchaseFailedEvent(productId:myskuid message:Invalid SKU details. {M: GPUL.HEC} - Response Code = 5)
    UnityEngine.Purchasing.PurchasingManager:OnPurchaseFailed(PurchaseFailureDescription)
    System.Action:Invoke()
    UnityEngine.Purchasing.Extension.UnityUtil:Update()
    (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    OnPurchaseFailed: FAIL. Product: 'myskuid', PurchaseFailureReason: Unknown

    Unity 2019.4.9f1
    IAP 3.2.1
     
    Last edited: May 24, 2021
  16. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please try with Unity 2020+ Also ensure you follow the directions here, and download from Google Play as a tester, and try a different tester account other than your developer account in the Play Store on the device https://docs.unity3d.com/Packages/com.unity.purchasing@3.2/manual/UnityIAPGoogleConfiguration.html
     
    Last edited: May 24, 2021
  17. beladolazeng

    beladolazeng

    Joined:
    Jul 23, 2018
    Posts:
    6
    Let me describe the situation I encountered:
    correct:
    1.unity version 2019.4.9f1
    2.iap version 2.0.6
    error:
    1.unity version 2019.4.9f1
    2.iap version 3.2.1
    According to your description, I used your test project, and re-created an app on the google play console, and got the same error. This time I used unity version 2020.3.9f1 and iap version 3.2.1
     

    Attached Files:

  18. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    And you have created a new test user who download the game via Google Play testing?
     
  19. beladolazeng

    beladolazeng

    Joined:
    Jul 23, 2018
    Posts:
    6
    No, I did not create a new user, I am using a user who can successfully make IAP in-app purchases
     
  20. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    The suggestion was to create a new user, then add them to Closed testing and as a Licensed tester on the Google dashboard. On the users device, enter the opt-in testing URL in a browser on the device, accept the testing invite, then download the test version of your game via Google Play.
     
  21. beladolazeng

    beladolazeng

    Joined:
    Jul 23, 2018
    Posts:
    6
    I had created a new user, and download the test version from google play, but i recived the the same error.
    After testing, I found that this error occurs when using iap versions 3.1.0 and 3.2.1. If you use the version before the two versions, you can purchase it normally. Both use the same test user for testing.
     
  22. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    So far we haven't been able to reproduce. Please send me a private message and I'll provide my email address that you can add to your Closed test.
     
  23. Talrhyon

    Talrhyon

    Joined:
    Jun 8, 2019
    Posts:
    16
    Im using 3.0.1 and i have the same error.
    Your APK is as Closed testing or Internal testing?
     
  24. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    AFAIK it must be approved and released to Closed testing
     
  25. beladolazeng

    beladolazeng

    Joined:
    Jul 23, 2018
    Posts:
    6
    I have opened a conversation with you
     
  26. beladolazeng

    beladolazeng

    Joined:
    Jul 23, 2018
    Posts:
    6
    internal testing
     
    Last edited: May 28, 2021
  27. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    As we've discussed, it works as expected for my (US) test user. You may need to contact Google as to why your test users are not working.
     
  28. Jinngoo

    Jinngoo

    Joined:
    Jun 2, 2020
    Posts:
    6
    Unity2020.3.11
    "com.unity.purchasing": "3.1.0"
    Error:
    onPurchaseFailedEvent(productId:cash2 message:Invalid SKU details. {M: GPUL.HEC} - Response Code = 5)
    UnityEngine.Purchasing.Extension.UnityUtil:Update()

    Downgrade to "com.unity.purchasing": "3.0.1"
    The error is gone
     
  29. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    I am not able to reproduce with 3.2.2
     
  30. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    436
    Sorry for bumping this but I may have an issue very similar to this. But first of all, I would like to know how I can find, in the Android logcat, the information about Unity IAP and the package version.
    Thanks.
     
  31. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please start a new thread and describe your issue in detail. This should help https://forum.unity.com/threads/how-to-capturing-device-logs-on-android.528680/ . On Android, Debug.Log statements will show in the logcat output, very helpful. There is also a logcat asset, but I haven't used it myself https://forum.unity.com/threads/android-logcat-package-feedback.595003/
     
    Starbox likes this.
Thread Status:
Not open for further replies.