Search Unity

[Closed] Password prompt pops up several times for some users [iOS]

Discussion in 'Unity IAP' started by CaptainKiyaku, Oct 10, 2016.

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

    CaptainKiyaku

    Joined:
    Feb 8, 2009
    Posts:
    324
    Hi,

    we are currently testing IAP in a sandbox environment. All of our IAPs are consumeables (currencies).
    I'm using the official Unity IAP bundle and the Purchaser script from the Unity manual to handle all the purchases. It's slightly modified to support all the different bundle ids.

    When i test it on my device, it prompts me for the password once, goes through it, gives me the "purchase successful" message and goes back to the game just fine. Same applies to a coworker.

    However if our testers are trying it out, they got prompted 3 times for the password. The first time they enter it, the purchase was successful and they see their product in the game, but then the prompt showed up two more times, in a row.

    At one point i read about the "ConfirmPendingPurchase" method and added it to the Purchaser.ProcessPurchase method, if the purchase was successful.
    After that change, the testers only got prompted for the password twice now. No change on my or my coworkers end.

    Both my coworker and i are located in canada, the testers are in the US, so we thought it might be a location based issue. However one of the testers had it working just fine on one device but not on another. Which to me somewhat rules out that it's location based.

    I also read that it's possible that another plugin is listening to purchase events and might trigger the prompt, however going through the plugins i'm using, i couldn't find any of them interfering.

    Plugins we have:
    • Unity IAP
    • UniRate - added this recently, problem existed before already
    • Adjust - their purchaser bit is in a different plugin now but i saw left over code that checks for receipts, although it doesn't look like it's getting called anyhere
    • GameSparks - we use this for most of our game logic and data. Once the purchaser script returns a successful purchase, we sent the receipt to gamesparks to confirm it. I don't think gamesparks itself is listening to any purchase events on its own though

    I'm kinda out of ideas what else to test. I heard iOS 9 had similar issues in the past. However all of this was tested on 9(.3 i think) and iOS 10 (i tried both versions on my device, no problems there).

    We also used the same test account for our devices and the testers devices. Worked for us, didn't work for testers.

    Any ideas what else i could test or have to do? Maybe i'm missing a validation step somewhere? Or is there a known issues with sandbox purchases that would explain this?

    Thanks,
    Sven
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    Hi @CaptainKiyaku,

    That is an odd issue.

    Out of curiosity, if they enter their password again, is the product purchased again? Or is there no change? What happens if they click cancel one or both times? Or what happens if they click cancel the first time and enter the password on the second or third time?

    I talk with some of our IAP engineers to find out if they know what would cause this behavior.
     
  3. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    Hi @CaptainKiyaku,

    Are you able to get a log from the testers to see what the plugin is actually doing?

    This isn't really the intended usage of ConfirmPendingPurchase. ConfirmPendingPurchase should only be called when ProcessPurchase returns Pending. This is mostly for scenarios like saving your purchases to a server. You can see an example in the Process Purchase documentation.
    https://docs.unity3d.com/Manual/UnityIAPProcessingPurchases.html

    Also, ConfirmPendingPurchase should be called outside of ProcessPurchase. Otherwise may result in unexpected behavior.
     
  4. wo0t

    wo0t

    Joined:
    Oct 11, 2016
    Posts:
    1
    I am having a similar issue, user is asked to login with iTunes id 3 times. Any update on this?

    Our game is a multiplayer game which is using a web server so when processPurchase method is called after a successful purchase I return

    return PurchaseProcessingResult.Pending;

    Then I send data to our servers and update user gem and when socket is responded as successful I implement confirming as;

    m_StoreController.ConfirmPendingPurchase (latestPurchasedProduct);

    It works as expected on test build, updates user data on our servers but user is asked to login 3 times to complete this process, what am I doing wrong? Is that a normal behaviour for test?

    Update:

    When I comment code line in ProcessPurchase block which I use to have the latest product data to a variable so later I can use the recipe data on it to send to my server, it stops to prompting to user to login 2nd time which is ;

    latestPurchasedProduct=args.purchasedProduct;

    and also when I comment the code lines that I get the Apple receipt to send to my server it stops prompting the 3d time;

    var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
    string receipt = builder.Configure<IAppleConfiguration>().appReceipt;
     
    Last edited: Nov 28, 2016
  5. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    I'm also having the same issue. 3 passwords popups. The last one seems to be for touch id.

    Any way to fix it?
     
  6. piidz

    piidz

    Joined:
    Jun 10, 2015
    Posts:
    2
    Any update on this issue? I am experiencing the same thing.
     
  7. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @piidz,

    Is this happening in a live app or only in the sandbox? So far we've only heard reports of this happening to apps in sandbox testing and we've heard developers have this issue outside of Unity IAP, so it is likely just a peculiarity of the sandbox testing environment.

    If it is happening in a live app, please open a new thread and we will definitely take a deeper look.
     
Thread Status:
Not open for further replies.