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

Verify Purchase Crash #256

Closed
6 tasks
CurralesDragon opened this issue Aug 11, 2017 · 3 comments
Closed
6 tasks

Verify Purchase Crash #256

CurralesDragon opened this issue Aug 11, 2017 · 3 comments

Comments

@CurralesDragon
Copy link

CurralesDragon commented Aug 11, 2017

Platform

  • [ x] iOS
  • macOS
  • tvOS

In app purchase type

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

Environment

  • [x ] Sandbox
  • Production

Version

0.10.5

Related issues

Report

unrecognized selector sent to instance 0x14d71a90
Printing description of receipt:
▿ 3 elements
▿ 0 : 2 elements
- .0 : "environment"
- .1 : Sandbox
▿ 1 : 2 elements
- .0 : "status"
- .1 : 0
▿ 2 : 2 elements
- .0 : "receipt"
▿ .1 : 18 elements
▿ 0 : 2 elements
- .0 : receipt_type
- .1 : ProductionSandbox
▿ 1 : 2 elements
- .0 : app_item_id
- .1 : 0
▿ 2 : 2 elements
- .0 : original_purchase_date_ms
- .1 : 1375340400000
▿ 3 : 2 elements
- .0 : original_purchase_date
- .1 : 2013-08-01 07:00:00 Etc/GMT
▿ 4 : 2 elements
- .0 : download_id
- .1 : 0
▿ 5 : 2 elements
- .0 : request_date
- .1 : 2017-08-11 19:33:41 Etc/GMT
▿ 6 : 2 elements
- .0 : request_date_ms
- .1 : 1502480021547
▿ 7 : 2 elements
- .0 : original_purchase_date_pst
- .1 : 2013-08-01 00:00:00 America/Los_Angeles
▿ 8 : 2 elements
- .0 : receipt_creation_date_ms
- .1 : 1502480018000
▿ 9 : 2 elements
- .0 : in_app
▿ .1 : 1 element
▿ 0 : 11 elements
▿ 0 : 2 elements
- .0 : original_purchase_date_ms
- .1 : 1502473112000
▿ 1 : 2 elements
- .0 : original_transaction_id
- .1 : 1000000323833974
▿ 2 : 2 elements
- .0 : purchase_date_pst
- .1 : 2017-08-11 10:38:32 America/Los_Angeles
▿ 3 : 2 elements
- .0 : purchase_date_ms
- .1 : 1502473112000
▿ 4 : 2 elements
- .0 : quantity
- .1 : 1
▿ 5 : 2 elements
- .0 : original_purchase_date
- .1 : 2017-08-11 17:38:32 Etc/GMT
▿ 6 : 2 elements
- .0 : is_trial_period
- .1 : false
▿ 7 : 2 elements
- .0 : original_purchase_date_pst
- .1 : 2017-08-11 10:38:32 America/Los_Angeles
▿ 8 : 2 elements
- .0 : product_id
- .1 : com.test.app.unlimited
▿ 9 : 2 elements
- .0 : transaction_id
- .1 : 1000000323833974
▿ 10 : 2 elements
- .0 : purchase_date
- .1 : 2017-08-11 17:38:32 Etc/GMT
▿ 10 : 2 elements
- .0 : receipt_creation_date
- .1 : 2017-08-11 19:33:38 Etc/GMT
▿ 11 : 2 elements
- .0 : request_date_pst
- .1 : 2017-08-11 12:33:41 America/Los_Angeles
▿ 12 : 2 elements
- .0 : receipt_creation_date_pst
- .1 : 2017-08-11 12:33:38 America/Los_Angeles
▿ 13 : 2 elements
- .0 : bundle_id
- .1 : com.test.app
▿ 14 : 2 elements
- .0 : adam_id
- .1 : 0
▿ 15 : 2 elements
- .0 : application_version
- .1 : 1
▿ 16 : 2 elements
- .0 : version_external_identifier
- .1 : 0
▿ 17 : 2 elements
- .0 : original_application_version
- .1 : 1.0
Printing description of receipts:
expression produced error: error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=2, address=0x7c30c).
The process has been returned to the state before expression evaluation.

Issue summary

Trying to verify a successful purchase, but app crashes with above error

I have copy pasted code from the iOS example but changed to use my own product id (which works because the purchase is successful) But struggling to see why this crashes..

What did you expect to happen

Verify success

What happened instead

Breakpoint crash on line:
let receipts = receipt["receipt"]?["in_app"] as? [ReceiptInfo] in file InAppReceipt.swift

@bizz84
Copy link
Owner

bizz84 commented Oct 11, 2017

@nicwhitts Apologies for the late reply.

Can you put a breakpoint on that line and check if receipt["receipt"] exists?

What about receipt["receipt"]?["in_app"]?

@bizz84
Copy link
Owner

bizz84 commented Oct 12, 2017

@nicwhitts can you try this with #283 and see if it solves the problem?

@bizz84
Copy link
Owner

bizz84 commented Dec 29, 2017

This should have been fixed in version 0.11.0.

Closing this issue. If it still crashes, please reopen or create a new one.

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

No branches or pull requests

2 participants