store kit gc callback early?

I am not sure what the cause of this is, but when dispatching events (or firing a callback) from transactionCallback in Store API execution of transactionCallback does not complete anything after the dispatch event.

I tried every way I can think of to get around this, but I cannot seem to get it to work. I submitted a project example a few days ago. [import]uid: 160288 topic_id: 35007 reply_id: 335007[/import]

Can you post the relevant code here?
[import]uid: 199310 topic_id: 35007 reply_id: 139230[/import]

I submitted a project via a bug report but here:

If you take the example from here:
https://developer.coronalabs.com/reference/index/storeinit

Then replace the print statements with dispatchEvent:

local function transactionCallback( event )  
 local transaction = event.transaction  
  
 -- Transaction completed  
 if transaction.state == "purchased" then  
 Runtime:dispatchEvent({  
 name='onInAppPurchase',  
 status='purchased',  
 productId=tostring(transaction.productIdentifier),  
 date=tostring(transaction.date),  
 receipt=tostring(transaction.receipt),  
 transactionId=tostring(transaction.identifier)})  
 (Execution of transactionCallback() does not run anything here or further)  
 (status & productId is passed via the event, date, receipt, transactionId is not, but if I put print statements in instead, they are all valid.)  
  
 ... (and so on for other states)  
 end  
  
 -- finish transaction  
 store.finishTransaction(transaction)  
  
end  

finishTransaction() will never run, if I pull out the dispatchEvent, it will run and the transactions will finish. Also all transaction information is not properly passed through the event. Only the first two variables.

[import]uid: 160288 topic_id: 35007 reply_id: 139232[/import]

I don’t get to see the bug reports as a rule. If I know the bug number I could go look it up.

Why are you dispatching an event?
What does the function handling the event look like?
[import]uid: 199310 topic_id: 35007 reply_id: 139238[/import]

I’m dispatching events as I am trying to put store api into a module and let main.lua and the rest of the application to handle it. Was trying to create a class to make the store api easier to call from main.lua and blackbox the complexity. [import]uid: 160288 topic_id: 35007 reply_id: 139242[/import]

Can you post the relevant code here?
[import]uid: 199310 topic_id: 35007 reply_id: 139230[/import]

I submitted a project via a bug report but here:

If you take the example from here:
https://developer.coronalabs.com/reference/index/storeinit

Then replace the print statements with dispatchEvent:

local function transactionCallback( event )  
 local transaction = event.transaction  
  
 -- Transaction completed  
 if transaction.state == "purchased" then  
 Runtime:dispatchEvent({  
 name='onInAppPurchase',  
 status='purchased',  
 productId=tostring(transaction.productIdentifier),  
 date=tostring(transaction.date),  
 receipt=tostring(transaction.receipt),  
 transactionId=tostring(transaction.identifier)})  
 (Execution of transactionCallback() does not run anything here or further)  
 (status & productId is passed via the event, date, receipt, transactionId is not, but if I put print statements in instead, they are all valid.)  
  
 ... (and so on for other states)  
 end  
  
 -- finish transaction  
 store.finishTransaction(transaction)  
  
end  

finishTransaction() will never run, if I pull out the dispatchEvent, it will run and the transactions will finish. Also all transaction information is not properly passed through the event. Only the first two variables.

[import]uid: 160288 topic_id: 35007 reply_id: 139232[/import]

I don’t get to see the bug reports as a rule. If I know the bug number I could go look it up.

Why are you dispatching an event?
What does the function handling the event look like?
[import]uid: 199310 topic_id: 35007 reply_id: 139238[/import]

I’m dispatching events as I am trying to put store api into a module and let main.lua and the rest of the application to handle it. Was trying to create a class to make the store api easier to call from main.lua and blackbox the complexity. [import]uid: 160288 topic_id: 35007 reply_id: 139242[/import]