Closed Bug 1505707 Opened 6 years ago Closed 6 years ago

Unhandled rejection in browser/components/payments/res/containers/{address-form.js,basic-card-form.js}

Categories

(Firefox :: WebPayments UI, defect, P1)

defect

Tracking

()

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: arai, Assigned: MattN)

References

Details

Attachments

(1 file, 1 obsolete file)

https://searchfox.org/mozilla-central/rev/6e0e603f4852b8e571e5b8ae133e772b18b6016e/browser/components/payments/res/containers/address-form.js#88-89
>   connectedCallback() {
>     this.promiseReady.then(form => {
>       this.body.appendChild(form);
> ...
>     });
>   }

form there can be null for some case (not yet checked)

after applying bug 1498775 patch (which adds more error report for unhandled rejection), the test fails.
same for basic-card-form.js
Changing the connectedCallback method to async and propagate the error to caller makes the test really fails.
after that, added null-check.
Attachment #9023543 - Flags: review?(MattN+bmo)
Priority: -- → P2
Component: DOM: Web Payments → WebPayments UI
Priority: P2 → P1
Product: Core → Firefox
Comment on attachment 9023543 [details] [diff] [review]
Handle error case in browser/components/payments/res/containers/{address-form.js,basic-card-form.js}.

Review of attachment 9023543 [details] [diff] [review]:
-----------------------------------------------------------------

Where did you see this fail? Which tests? `form` should never be null so I'd rather fix the test than change this.
Attachment #9023543 - Flags: review?(MattN+bmo)
Sorry, forgot to link
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7dcd08bde30eb73cf21ff93b0403f740a5eea4e6&selectedJob=210514993

it's a try with bug 1498775 patch (and some other patch to fix failure discovered by that)
OK, so the issue is in test_payer_address_picker.html it seems. I think there may be a simple fix.
Attachment #9023543 - Attachment is obsolete: true
We only want the frame to be able to share markup, we don't need JS to execute and the JS was causing an unhandled rejection error.
arai, can you confirm the patch fixes the issue?
Assignee: arai.unmht → MattN+bmo
Flags: needinfo?(arai.unmht)
Thanks! The error doesn't happen with the patch applied locally
(for me, the test harness somehow doesn't finish, and cannot check if it reports, so I directly checked the error in web console)
I'll check on try shortly.
Flags: needinfo?(arai.unmht)
Pushed by jwein@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7cab9a968094
Sandbox the template frame for payment mochitests to prevent JS execution errors. r=jaws
https://hg.mozilla.org/mozilla-central/rev/7cab9a968094
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: