Closed Bug 826520 Opened 11 years ago Closed 11 years ago

navigator.mozPay() gets stuck processing success callback

Categories

(Core :: DOM: Device Interfaces, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: kumar, Unassigned)

References

Details

STR:
- Adjust your profile/user.js to point the mockpayprovider at a valid URL. I was using http://people.mozilla.com/~kmcmillan/pay-provider.html because the default one at https://mockpayprovider.phpfogapp.com/ seems to be down.
- Load the nav pay UI tests in the B2G browser: http://people.mozilla.com/~kmcmillan/gaia-pay.html (this is also in the gaia UI test dir)
- Click the Pay PMPP button
- When it loads the payment provider, click the Success button to close the Trusty UI window and return to the calling page

Something gets stuck and does not return to the calling page. Below is a log of debug messages from the payment code. The last message implies that Payment:Success was received but the code to close the Trusty UI is not executed like it should. I'm not sure where that code is. Any ideas?

This is blocking Marketplace payments right now. This is a regression as it used to work (we sadly don't have automated coverage of this yet).

I am using the nightly B2G build from 2013-01-03 and today's Gaia at rev 772adbba170cdcf1596275e1ebec17ee7bd15c60

Can other folks reproduce this? I don't think it's something with my env but it could be.

Debug log:

loading http://people.mozilla.com/~kmcmillan/gaia-pay.html, 1
-*- PaymentManager: Received 'Payment:Pay' message from content process
-*- PaymentManager: Registered Payment Providers: {"name":"firefoxmarketdev","uri":"http://localhost:8000/mozpay/?req=","description":"marketplace-dev.allizom.org","requestMethod":"GET"}
-*- PaymentManager: Registered Payment Providers: {"name":"mockpayprovider","uri":"http://people.mozilla.com/~kmcmillan/pay-provider.html?req=","description":"Mock Payment Provider","requestMethod":"GET"}
-*- PaymentManager: Payload {"iss":"123456789","aud":"Mock Payment Provider","typ":"mock\/payments\/inapp\/v1","exp":1345259882,"iat":1345256282,"request":{"name":"Piece of Cake","description":"Virtual chocolate cake to fill your virtual tummy","price":[{"country":"US","amount":"5.50","currency":"USD"},{"country":"BR","amount":"8.50","currency":"BRL"}]}}
XXX FIXME : Got a mozContentEvent: undefined
-*- PaymentManager: Received 'Payment:Pay' message from content process
-*- PaymentManager: Payload {"iss":"123456789","aud":"Mock Payment Provider","typ":"mock\/payments\/inapp\/v1","exp":1345259882,"iat":1345256282,"request":{"name":"Piece of Cake","description":"Virtual chocolate cake to fill your virtual tummy","price":[{"country":"US","amount":"5.50","currency":"USD"},{"country":"BR","amount":"8.50","currency":"BRL"}]}}
XXX FIXME : Got a mozContentEvent: undefined
###################################### forms.js loaded
###################################### forms.js loaded
XXX FIXME : Got a mozContentEvent: undefined
======================= payment.js ======================= 
XXX FIXME : Got a mozContentEvent: undefined
======================= payment.js ======================= 
XXX FIXME : Got a mozContentEvent: undefined
XXX FIXME : Got a mozContentEvent: undefined
-*- PaymentContentHelper: Received message 'Payment:Failed': {"requestId":"id{b516111a-e85a-cd46-9cad-0dfcda926992}","errorMsg":"Dialog closed by the user"}
-*- PaymentManager: Received 'Payment:Success' message from content process
-*- PaymentContentHelper: Received message 'Payment:Success': {"requestId":"id{b516111a-e85a-cd46-9cad-0dfcda926992}"}
Priority: -- → P1
For the STR my profile/user.js has:

pref("dom.payment.skipHTTPSCheck", true);
pref("dom.payment.provider.0.name", "mockpayprovider");
pref("dom.payment.provider.0.description", "Mock Payment Provider");
pref("dom.payment.provider.0.type", "mock/payments/inapp/v1");
//pref("dom.payment.provider.0.uri", "https://mockpayprovider.phpfogapp.com/?req=");
pref("dom.payment.provider.0.uri", "http://people.mozilla.com/~kmcmillan/pay-provider.html?req=");
pref("dom.payment.provider.0.requestMethod", "GET");
I'll look into this.

Needs to go through triage though first before prioritizing.

Weird this regressed though...
Keywords: qawanted, regression
Priority: P1 → --
QA Contact: jsmith
blocking-basecamp: --- → ?
Actually - I'm flipping flags back. I need to see a test case on the *actual* payments flow that reproduces this.
blocking-basecamp: ? → ---
Blocks: basecamp-payments
No longer blocks: marketplace-payments
Talked with Kumar - this can be reproduced with the actual real payment provider.

What regressed this? I know I was checking this periodically overtime recently and didn't see this regression.

I wonder if the secure IPDL patch regressed this...
blocking-basecamp: --- → ?
Chris - Does anything jump out as obvious in the logs on what's wrong here?

Trying to get a clue on what regressed here. I *think* its a recent regression within the past couple of weeks.
Flags: needinfo?(jones.chris.g)
Apparently this bug was reproduced on a desktop build - can't block just yet. Krupa can't reproduce either. Needs to be reproduced on a device build. Flagging for qawanted to test this.
blocking-basecamp: ? → ---
Flags: needinfo?(jones.chris.g)
Works for me on device 1/3/2013.
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: qawanted
Resolution: --- → WORKSFORME
Thanks for the help in diagnosing. The nightly B2G desktop builds for mac were stuck on Dec 10th and I didn't notice. I found today's Jan 3rd build in a different dir. D'oh. It's working in today's build.
You need to log in before you can comment on or make changes to this bug.