Search Unity

PurchaseFailureReason.Unknown returned on iOS, Android works fine

Discussion in 'Unity IAP' started by NathanHeckel, Apr 17, 2018.

  1. NathanHeckel

    NathanHeckel

    Joined:
    Mar 6, 2018
    Posts:
    5
    Hello.

    Yesterday I was testing my integration of UnityIAP in a game and everything was working fine. Then I came in to work about 12 hours ago and now all I get on iOS are long waits after calling BuyProductID, sometimes prompts to re-enter my Apple ID password, but never any result other than PurchaseFailureReason.Unknown. Android has continued to work just fine.

    Trying on other iOS devices (including from another location) produces the same error. I tried rolling back just my changes to the IAP integration from yesterday and got the same error. I attempted to roll back the entire repository locally to the last revision from the day before yesterday -- asset bundles and all -- and got the same error. This leads me to believe that it's not a problem with the client's source code.

    I asked the game's publisher if they'd made any changes in iTunes Connect, and they reported they hadn't.

    Is anyone else experiencing this problem? Does this sound like an issue with UnityIAP or with Apple? The Apple Developer System Status page shows all green: https://developer.apple.com/system-status/

    UnityIAP: 1.18.0
    Unity: 2017.4.0f1
    Store: Apple Store

    Edit: ...And now it's working again for no apparent reason. I certainly hope the service isn't this unreliable upon release. Was there any systemic problem today?
     
    Last edited: Apr 17, 2018
    aurelienpic likes this.
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Regarding systemic problem, you would want to check in with Apple. We are a pass through service for the store, and don't provide a separate transactional service. We are planning to improve our error handling, especially with regard to the Unknown error on iOS, in the next release.
     
    NathanHeckel likes this.
  3. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    345
    I am experiencing the same problem. This has never happened before but I am noticing this after updating my device to ios 11.

    Unity 5.3 builds still appears to work (after around 5-10 sec wait)
    Unity 5.6 builds don't work at all. Nothing shows up after attempting to make a purchase call.

    ios log just shows:
    PurchaseProduct: id
    UpdatedTransactions
    PurchaseFailed: -1001
     
    aurelienpic likes this.
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @mrm83 Please provide the device logs
     
  5. NathanHeckel

    NathanHeckel

    Joined:
    Mar 6, 2018
    Posts:
    5
    As suspected, it was Apple's fault. The Apple Developer System Status page now reports that there was an issue with iTunes Sandbox yesterday (times JST).
     

    Attached Files:

    JayR, aurelienpic and unityjingyao like this.
  6. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
  7. NathanHeckel

    NathanHeckel

    Joined:
    Mar 6, 2018
    Posts:
    5
    This problem is still happening intermittently.

    After further review, my iOS log also shows...

    UnityIAP: UpdatedTransactions
    UnityIAP: PurchaseFailed: -1001

    My error handler is switching on the value of PurchaseFailureReason given in OnPurchaseFailed and had a default value of Unknown. If the value wasn't in the enum, it would be left as Unknown.

    I look forward to UnityIAP supporting more detailed error handling in the future, but will try adding my own in the meantime.
     
  8. NathanHeckel

    NathanHeckel

    Joined:
    Mar 6, 2018
    Posts:
    5
    As mentioned in the previous post, I'm still getting error codes in the log from UnityIAP...

    UnityIAP: PurchaseFailed: -1001

    Is there currently any way to get this value in code, or will this simply have to wait for the new version with updated error handling?
     
  9. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Error -1001 is "connection timeout". We plan to improve this error handling in the next release.
     
    NathanHeckel likes this.