Closed Bug 1400665 Opened 7 years ago Closed 7 years ago

[Form Autofill] FormAutofillHandler.jsm, line 182: TypeError: fieldDetail is undefined

Categories

(Toolkit :: Form Manager, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: ttaubert, Assigned: ralin)

Details

(Whiteboard: [form autofill:MVP])

Attachments

(2 files)

I see it happen consistently with Nightly on https://demo.yubico.com/u2f

I first registered in the "Register" tab with test/test and some YubiKey. Then when I enter test/test on the "Login" tab the FormAutofillHandler fails somehow.
Priority: P3 → --
Looks like it's sufficient to directly click the "Login" tab, enter some username and then click to focus the password field.
Hi Tim, it seems to me that form autofill should not be activated in this case as there are only two fields on the "Login" tab. Could you provide us a screenshot of the dropdown? so I can check whether the error occurred while previewing or in somewhere else. Thank you.
Attached image FormFill error
Here you go.
Thank you Tim, it's really helpful. I'll have a fix to this and go through the steps again with my Yubikey tomorrow.
Assignee: nobody → ralin
Whiteboard: [form autofill:MVP]
Thanks! Just a note that you don't actually need your YubiKey though :) It triggers just fine in a profile that has some username suggestion from other websites.
Status: NEW → ASSIGNED
Priority: -- → P1
(In reply to Tim Taubert [:ttaubert] from comment #5)
> Thanks! Just a note that you don't actually need your YubiKey though :) It
> triggers just fine in a profile that has some username suggestion from other
> websites.
Yeh, I just realized that occurs when every time popup closed, regardless of YubiKey. Thanks.
-----

The patch is simple, just added a check to ensure fieldDetail isn't null, and that seems like what we should have done originally to protect it from throwing potential undefined error. Luke, could you help me to review it? Thanks.
Sean happens to have a similar patch in bug 1400112. Let's see if we can leverage that part or wait for his patch if it's not in a hurry.
(In reply to Luke Chang [:lchang] from comment #8)
> Sean happens to have a similar patch in bug 1400112. Let's see if we can
> leverage that part or wait for his patch if it's not in a hurry.

No problem, I've copied the part fixes the undefined problem. Your call anytime :D
Comment on attachment 8909598 [details]
Bug 1400665 - Add a explicit check for fieldDetail to avoid calling a method of "undefined".

https://reviewboard.mozilla.org/r/181072/#review186954

Looks good. Thanks.
Attachment #8909598 - Flags: review?(lchang) → review+
Pushed by lchang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9d2af29630cf
Add a explicit check for fieldDetail to avoid calling a method of "undefined". r=lchang
https://hg.mozilla.org/mozilla-central/rev/9d2af29630cf
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: