{ "id": "114258", "key": "AC-2103", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2013-05-28T16:47:06.000+0000", "created": "2013-05-12T14:07:25.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:41:04.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Using the in-app-billing module from the marketplace, I can't get the PURCHASE_STATE_CHANGED_EVENT to fire. The code I am using is the example app.js from the module. The device I tested on was an A855 droid. The purchase window comes up and after accepting, nothing happens. \r\n\r\nAtleast one other user has the problem. http://developer.appcelerator.com/question/151587/android-in-app-billing-issue#comment-172249. ", "attachment": [ { "id": "38734", "filename": "Screenshot_2013-05-18-20-35-57.png", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-19T00:39:49.000+0000", "size": 117910, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: In-App Billing Module - PURCHASE_STATE_CHANGED_EVENT Not Firing", "creator": { "name": "asor", "key": "asor", "displayName": "Kyle Berezin", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "asor", "key": "asor", "displayName": "Kyle Berezin", "active": true, "timeZone": "America/New_York" }, "environment": "SDK 3.1.0 GA\r\nAndroid 2.2.3 No others tested\r\nti.inappbilling 2.2.0", "comment": { "comments": [ { "id": "252739", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello Kyle,\n\nI downloaded the module and loaded the example up on device (Samsung Galaxy S3 4.1.2) and was unable to reproduce what you are experiencing. Correct me if I am wrong but are these the series of actions you are taking?\n\n1. Load up the app\n2. Press \"Buy\" button\n3. Press \"Buy\" button again on subsequent pop up\n4. Payment successful alert pops up\n\nat this point, there have been many alerts towards the bottom of my screen giving me Request IDs and states that I am currently in.. after the payment successful pop up, I get an alert with the message seen in screenshot I attached. If you are getting something different (or nothing at all) then it may have something to do with using an older version of Android. Can you do me a favor and try this code out on an emulator with a higher android version (3.0 or higher), if it works as expected here we can rule out any issues with your build/studio and I can report a bug that this doesn't work on earlier versions of android. \n\nThanks for your cooperation and patience, I will be awaiting your reply,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-19T00:38:56.000+0000", "updated": "2013-05-19T00:38:56.000+0000" }, { "id": "252892", "author": { "name": "asor", "key": "asor", "displayName": "Kyle Berezin", "active": true, "timeZone": "America/New_York" }, "body": "My A855 was off for a while and when I turned it back on to see if I could get you any more info on what was happening, it decided to work. I am not sure what caused the intermittence, I can assure you I am not just saving face and acting as though I made no mistake. Perhaps it just needed a good shutdown, restart.", "updateAuthor": { "name": "asor", "key": "asor", "displayName": "Kyle Berezin", "active": true, "timeZone": "America/New_York" }, "created": "2013-05-20T20:44:55.000+0000", "updated": "2013-05-20T20:44:55.000+0000" }, { "id": "253449", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Kyle,\n\nNo worries, sometimes weird things happen, especially with older versions of android. If you run into this problem again, just return to this ticket and reply with any more information and I would be glad to revisit it. Good to hear things are working fine now though.\n\nRegards,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-22T18:22:22.000+0000", "updated": "2013-05-22T18:22:22.000+0000" }, { "id": "253705", "author": { "name": "dasher@computer.org", "key": "dasher@computer.org", "displayName": "David Asher", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue is not resolved. My app was released a week ago with in-app billing working perfectly. Several customers made purchases, then the purchases stopped. Now that I trace the app, I find that PURCHASE_STATE_CHANGED_EVENT is not firing. Happens on Android 4 and 2.2.3.", "updateAuthor": { "name": "dasher@computer.org", "key": "dasher@computer.org", "displayName": "David Asher", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-23T19:23:41.000+0000", "updated": "2013-05-23T19:23:41.000+0000" }, { "id": "254110", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "David,\n\nWould you mind providing a detailed list of steps to reproduce where you are seeing this error occur? I must be able to successfully reproduce the bug in order to bring it to engineerings attention or they will be lost on how to exactly fix it.\n\nThanks,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-27T18:33:45.000+0000", "updated": "2013-05-27T18:33:45.000+0000" }, { "id": "254111", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Also, include the devices, the build version of studio you deployed the app with as well as the SDK version.\n\nThanks for your cooperation,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-27T18:34:30.000+0000", "updated": "2013-05-27T18:34:30.000+0000" }, { "id": "254271", "author": { "name": "dasher@computer.org", "key": "dasher@computer.org", "displayName": "David Asher", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Carter, I'm fairly confident this is a problem within the Google Play service. The following link is to a screenshot of my Google Play account. You can see that between May 19 and May 26 revenue stopped. I can confirm during this period that I have debugged my app and found that PURCHASE_STATE_CHANGED was never received, and the app appeared to hang. On May 25 I started looking for a workaround and something triggered Google Play to again respond to purchase requests, so clearly without any change in the published app, Google Play is showing different behavior on different days. https://www.box.com/s/e0r5c4pnm4kdd37bihb9\r\n\r\nAlso, here are several links showing that this problem has been reported for two years now, without being addressed:\r\nhttps://groups.google.com/forum/?fromgroups#!topic/android-developers/RoAEFI8-NBs\r\nhttps://code.google.com/p/marketbilling/issues/detail?id=29\r\nhttp://stackoverflow.com/questions/16217272/with-new-in-app-billing-com-android-vending-billing-purchase-state-changed-inte\r\n\r\nThis is clearly a serious issue because, if it happens during restoreTransactions() it will appear to cause the app to hang waiting for a response and the developer loses the customer, and if it happens during requestPurchase() then Google happily completes the purchase and charges the customer without notifying the app to deliver the content. The fact that I've seen this happen with both restoreTransactions() and requestPurchase() is further indicator of a Google problem. The workaround I'm going with is to set a brief timer and send restoreTransactions() a second time if PURCHASE_STATE_CHANGED is not received, but there is really no way to prove that this works. \r\n\r\nThanks,\r\nDavid", "updateAuthor": { "name": "dasher@computer.org", "key": "dasher@computer.org", "displayName": "David Asher", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-28T15:47:40.000+0000", "updated": "2013-05-28T15:50:05.000+0000" }, { "id": "254293", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for looking into this David. It is unfortunate that this is hindering sales for quite a few developers, including yourself. I hope that google finds a resolution to this quickly. As this is not a Titanium bug I am going to resolve this for now. Thanks for your cooperation and insight with this. I will be sure to link other people who are having the same problem to your response as your workaround might be helpful to some people.\n\nRegards,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-28T16:43:54.000+0000", "updated": "2013-05-28T16:43:54.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }