Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONDecodeError(Optional(""))?? #57

Closed
michaelsousa21 opened this issue Jul 14, 2016 · 9 comments
Closed

JSONDecodeError(Optional(""))?? #57

michaelsousa21 opened this issue Jul 14, 2016 · 9 comments

Comments

@michaelsousa21
Copy link

michaelsousa21 commented Jul 14, 2016

I keep getting this error when I try to verify the receipt. How can I fix this?
I'm running the iOS version on xcode 7.3.1

Debug Output:
CoreFoundation = 1145.150000
Purchase Success: com.testapp.inapp10
Verify receipt Failed: JSONDecodeError(Optional(""))

@phimage
Copy link
Contributor

phimage commented Jul 19, 2016

In InAppReceipt, verifyfunction we receive safeData so no .NoRemoteData error
But data seems empty so no receiptInfo. Maybe another exception must be throw for that case.

@odedharth
Copy link
Contributor

Also received this error after a verification of a successful purchase.
Any update on this?

@bizz84
Copy link
Owner

bizz84 commented Aug 8, 2016

I created a PR to return .NoRemoteData when the receipt data is empty: #64

@odedharth @michaelsousa21 Can you try running on this branch? https://github.com/bizz84/SwiftyStoreKit/tree/feature/JSONDecodeError-empty-data

Note that with this change receipt verification will still fail, it just returns a different error case.

@odedharth
Copy link
Contributor

@bizz84 As I understand the problem it seems that from some reason the purchase succeeds but the verification is failing. So I'm wondering that maybe the problem is with the purchase function, and not the verification function. Because if a purchase succeeds the verification should be successful.

@jayvenn
Copy link

jayvenn commented Sep 12, 2016

So my purchase succeeded but my verification fail. However, my verification did not fail at first but then "one day" it failed. Something must have changed perhaps on iTunes Connect. Perhaps it is sandbox?

@bizz84
Copy link
Owner

bizz84 commented Oct 19, 2016

@michaelsousa21 @nhantrivinh I still need to investigate this further. I'm going to label this as a bug for now.

@HyunjoonKo
Copy link

Hi.

The same thing happened to me. The user succeeded in the purchase, but the receipt was not decoded, so the app failed to purchase it. So the user made 10 payments in a row. Is there a way to avoid this?

@bizz84
Copy link
Owner

bizz84 commented Feb 20, 2017

There have been some significant improvements to the purchase flows recently.

@michaelsousa21 @nhantrivinh @HyunjoonKo can you retest this with the latest version, and let me know if it works correctly now?

@bizz84
Copy link
Owner

bizz84 commented May 11, 2017

@michaelsousa21 @nhantrivinh @HyunjoonKo Closing this issue. Feel free to open a new one if there are still issues. Current release is 0.9.0.

@bizz84 bizz84 closed this as completed May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants