-
Notifications
You must be signed in to change notification settings - Fork 34
Impossible to use Payment Service - getExistingPurchases => onFailure always crashes the app #673
Comments
Update: I was not able to reproduce this issue on It seems to be specific to OS 10.1 |
@scdowney Are you still the man to look into this? |
—Reply to this email directly or view it on GitHub. |
Update - further tests show that application frozes only after alert() / dialog.standardAskAsync() is called i.e. if you ignore the response from getExistingPurchases => onFailure, app remains responsive and everything works fine. But once you call alert() app becomes frozen and couple of seconds later is closed by the OS. Maybe this is some kind of event / event loop issue ? |
That update sounds like PR315668 (JIRA 89977). Quick look seems like it was no longer reproducible on 10.1.1693? Can we re-test on that build perhaps? |
Are there any public links where I can review those issues ? |
I'm not sure there is a public link, I believe it might be on an internal Jira instance. |
Update - we got a copy of payment extension from amd modified it to execute the InvokeMethod logic in a separate thread - and everything seems to work fine now (dev alpha b / 10.1.0.1485). Below is an example on what we have done: std::string Payment::InvokeMethod(const std::string& command)
{
theCommand = command;
StartProcessingThread(); // starts a separate thread that executes the actual InvokeMethodImpl and sets the result
while (true) {
sleep(1);
if (gotResult)
return theResult;
}
} Questions: |
@scdowney I believe you are correct about the two issues being the same. @Kra-Kra The internal issue never had a fix put in for it, but the issue was resolved in later builds. You'll note here (http://en.wikipedia.org/wiki/BlackBerry_10) that the version you were testing on does not appear to be released to customers. |
We see In-App purchase requests from many different variants of OS 10.1 Below is incomplete list of OS 10.1 versions observed in the "wild" for which our app refused to initiate In-App purchase 10.1.0.1483 Unfortunately, we cannot ask the user to upgrade his device software in order to perform In-App purchase in our app - we need solution which works for everybody. Can somebody please check and let us know if our workaround with different thread is ok ? Or should we expect some nasty side effects ? We plan to release an update of the app with this workaround on Monday, it'd be nice if somebody can review it before that. Thanks ! |
Hello, Can somebody from WebWorks team please answer the following questions: Q1. Where can we get the latest sources for Payment extension. We found a copy here: https://github.com/blackberry-webworks/BB10-WebWorks- but it does not seem "official" Q2. Should we expect any issues if we run InvokeMethod() logic in a separate thread ? We plan to publish new version of the app tomorrow and we'd like to receive feedback on those two questions in next 24 hours. Thanks ! |
Q1. The newest code can be found here - https://github.com/blackberry-webworks/BB10-WebWorks-Framework/commits/next . Its only an administrative error that this hasn't been merged into master. Q2. I really don't know what the possible effects are, especially considering the fact that the code largely seems synchronous atm. @scdowney Any possible effects for the payment code specifically? |
observed on: dev alpha b, OS 10.1.0.1485, WebWorks SDK 1.0.4.11, production environment (app is published in App World)
app calls
blackberry.payment.getExistingPurchases(true, onSuccess, onFailure);
a couple of seconds after framework calls the onFailure callback, app becomes unresponsive and some time later it "disappears" (it is closed by the OS).
Sample code can be found in documentation:
https://developer.blackberry.com/html5/api/blackberry.payment.html#.getExistingPurchases^2
** Update: **
Same problem is observed for the following API call:
blackberry.payment.checkExisting
In short - it is currently not possible to use Payment Service from within bb10 WebWorks app.
The text was updated successfully, but these errors were encountered: