weixin_39585795
weixin_39585795
2021-01-12 18:45

Pretty often purchaseProduct returns: Unknown error. Please contact support

Platform

  • [x ] iOS
  • [ ] macOS
  • [ ] tvOS

In app purchase type

  • [ ] Consumable
  • [ ] Non-consumable
  • [ x] Auto-Renewable Subscription
  • [ ] Non-Renewing Subscription

Environment

  • [ x] Sandbox
  • [ ] Production

Version

ℹ Please replace this with the version of SwiftyStoreKit you're using. 0.8.4

Related issues

ℹ Please replace this with references to similar issues (either open or already closed).

Report

Issue summary

I migrated from 0.6.1 which worked fine and now I'm pretty often experiencing this error while testing. Is this a know issue?

What did you expect to happen

Purchase should succeed

What happened instead

Unknown error occurs.

该提问来源于开源项目:bizz84/SwiftyStoreKit

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

18条回答

  • weixin_39772849 weixin_39772849 4月前

    This happens every time to me when up/down/cross-grading between subscriptions. I haven't been able to figure out if this is a relic of testing in Sandbox or TestFlight (since my app is not released yet), a configuration error or a bug on Apple's side.

    At the very least, make sure you have a Restore Purchase button and that'll get them back into a good state.

    点赞 评论 复制链接分享
  • weixin_39973271 weixin_39973271 4月前

    In Sandbox environment for macOS app testing, this happens every time when cross-grading between subscriptions in the same group.

    The purchasing shows message "You are all set", then strangely shows "Unknown error"

    点赞 评论 复制链接分享
  • weixin_39662578 weixin_39662578 4月前

    Any news here? Had same issue today.

    点赞 评论 复制链接分享
  • weixin_39883256 weixin_39883256 4月前

    For me sometimes it goes through sometimes i get "Unknown error". My guess is that its an iTunes Store issue indeed.

    点赞 评论 复制链接分享
  • weixin_39620278 weixin_39620278 4月前

    I just got rejected during App Review for .purchaseProduct resulting in an .unknown error code. These were all working before, so it definitely seems like a bug on Apple's test servers.

    点赞 评论 复制链接分享
  • weixin_39620278 weixin_39620278 4月前

    Resubmitted the binary, and got rejected again. This doesn’t seem like an Apple issue.

    点赞 评论 复制链接分享
  • weixin_39959192 weixin_39959192 4月前

    Someone find a solution?

    点赞 评论 复制链接分享
  • weixin_39662432 weixin_39662432 4月前

    Same here (Version 0.13.3) . I track my in app purchases: In relation 12 purchases of 100 failed. Poorly I haven't a stacktrace, I just receive the error .unknown.

    But a good message: A friend of mine told me that he received the unknown error but the purchase worked. In the appconnect I have more purchases than I track. So I suspect that the purchases not really failed.

    点赞 评论 复制链接分享
  • weixin_39870664 weixin_39870664 4月前

    Yeah I've got the same problem. When I'm trying to change subscription in the same group SwiftyStoreKit.purchaseProduct fails.

    点赞 评论 复制链接分享
  • weixin_39619858 weixin_39619858 4月前

    In fact, I have bought it successfully, but the error returned is still unknown, which seems to be SwiftyStoreKit~

    点赞 评论 复制链接分享
  • weixin_39881760 weixin_39881760 4月前

    Having the same issue when going across the same subscription group

    点赞 评论 复制链接分享
  • weixin_39881760 weixin_39881760 4月前

    Also, the first time I make a purchase in TestFlight it works, if I try to switch to a new purchase it says success but SwiftyStoreKit says “Unknown Error” but then if I switch back to the original one it works again!

    点赞 评论 复制链接分享
  • weixin_39719165 weixin_39719165 4月前

    -git could you post a stack trace for this?

    You can get this by adding a breakpoint in the completion block of the purchase() method, then type bt in the debugger console once the breakpoint is triggered.

    Also please see #154. It includes some information from Apple about potential configuration mistakes that could cause problems with IAPs.

    点赞 评论 复制链接分享
  • weixin_39535701 weixin_39535701 4月前

    I have the same problem. The issue is linked to https://forums.developer.apple.com/thread/75044. It seems to be a bug from Apple (don't worry, not a SwiftyStoreKit migration issue ✌️)

    点赞 评论 复制链接分享
  • weixin_39719165 weixin_39719165 4月前

    -git do you still experience this? I'm tagging this as an Apple bug and I'll close soon it if there are no updates.

    点赞 评论 复制链接分享
  • weixin_39583162 weixin_39583162 4月前

    Anyone?

    点赞 评论 复制链接分享
  • weixin_39583162 weixin_39583162 4月前

    Rolled back to 0.8.5 - issue remains. Can't figure out WHY!?!? Tried different devices, rebooted, cleaned project, etc... Nothing helped. 😫

    点赞 评论 复制链接分享
  • weixin_39719165 weixin_39719165 4月前

    I've been investigating this. It appears that it can happen when the device can't connect to the iTunes Store. Because this is not a specific SKError, it maps to SKError.Code.unknown.

    I'll update the sample demo code to show a more accurate error message, however I don't have an answer to why this happens in the first place.

    点赞 评论 复制链接分享

相关推荐