Weird behaviour for autofill addresses on amazon
Categories
(Toolkit :: Form Autofill, defect, P3)
Tracking
()
People
(Reporter: oardelean, Assigned: issammani, NeedInfo)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
1.98 MB,
video/webm
|
Details |
Found in
- Nightly 104.0a1
Affected versions
- Nightly 104.0a1
- Firefox 102.0
- Firefox RC 103.0
- Firefox 102.1esr
Affected platforms
- Windows 7
- Windows 10
Preconditions
- browser.search.region to US
- Have a saved adress in about:preferences#privacy.
Steps to reproduce
- Launch Firefox and go to https://www.amazon.com/.
- Log in using a valid account.
- Click on Account and select "Your Addresses".
- Click on Add Address.
Expected result
- The autofill works properly, address is saved and displayed.
Actual result
- The country is changed and the input is lost.
Regression range
- Will look for one ASAP.
Additional notes
- Please check the video for more detail.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
mozregression points to:
-
last good: 2022-05-13
-
first bad: 2022-05-14
Please feel free to change if you think this isn't the correct regressor.
Updated•2 years ago
|
Comment 2•2 years ago
|
||
Set release status flags based on info from the regressing bug 1754879
:tgiles, since you are the author of the regressor, bug 1754879, could you take a look?
For more information, please visit auto_nag documentation.
Comment 3•2 years ago
|
||
Ardelean Oana, this looks like the web site's own mechanics to clear address fields when country is changed.
I've tried with "Autofill addresses" setting off, entered some data, then switched country and all my inputs was cleared.
Lets update STR to more details after step 4. By looking at attached video I can't tell where things start to go wrong.
Updated•2 years ago
|
Reporter | ||
Comment 4•2 years ago
|
||
Hy Sergey!
My apologies for any lack of clarity in the STR.
Before, Amazon's autofill was not working on some platforms (that's bug 1692864). Autofill seems to be slightly more functional now, but once you auto-fill credentials in the Address Form on amazon.com, the country changes without any other input from the user.
I re-tested on Firefox 105.0b4 and a 2022-08-28 Nightly build and it's still reproducible on Windows 10 and macOS 12. The bug does not reproduce anymore on Ubuntu 22.04, wayland/X11 protocols.
I could consistently reproduce on affected builds and platforms with these STR (they will work with a previously saved address in about:preferences#privacy. Please use United States as the country of choice, on both Saved Addresses and Amazon).
- Launch Firefox and go to https://www.amazon.com/.
- Log in using a valid account.
- Click on Account and select "Your Addresses".
- Click on Add Address.
- Click on any field and choose a saved Address from your Saved Addresses to autofill.
Expected:
- Would be to autofill the form properly.
Actual:
- The form IS autofilled, but the Country field is changed without the user's input after a second. In most testing scenarios it defaults to Canada.
I attached a recording of autofill's behaviour on Ubuntu and a recording on macOS. Both scenarios were tested on the latest Nightly. Please let me know if there's anything else I can do to help.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 5•2 years ago
|
||
(In reply to Ardelean Oana from comment #4)
... it's still reproducible on Windows 10 and macOS 12. The bug does not reproduce anymore on Ubuntu 22.04, wayland/X11 protocols.
Hmm, this is interesting. I don't see why would OS matter in this case. :issammani can you take a look please?
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 7•2 years ago
|
||
:serg :Ardelean Oana I was able to reproduce the bug on nightly 106.0a1 only.
After further investigation and testing with multiple addresses it seems that the country field is updated with the value of the state from the saved address. Assuming that the auto-filled address in the recording has California (CA) for a state, this explains why you would get Canada. I played around with different states and I get different results depending on the state code. I will investigate further and see why the heuristic misidentifies the country field.
Assignee | ||
Comment 8•2 years ago
|
||
This seems to be a problem with the way we classify an address element ( input, select ). In _findMatchedFieldName we loop through all regex rules for different address parts ( country, state, address-level-*) and then return when an element's identifiers ( id, name, label ) matches the current rule.
The problem is we return the moment an identifier matches a rule.
In amazon's case the country select has the following identifiers:
label: Country/Region
id: address-ui-widgets-countryCode-dropdown-nativeId
name: address-ui-widgets-countryCode
Since we loop over the regex first and try to match we end up matching the label: Country / Region
to address-level1
regex for address-level1
macthes the region
part, which is wrong. It will cause the select to be updated with the value stored for address-level1
( state ) instead of country.
We can switch the order of the loops, so we prioritize id and name before label, or order the regex rules differently, so as to prioritize country, but we will still encounter the same problem as before in some other edge case. A simple solution would be to match all the descriptors and see the most frequent one. In the case of amazon that would be country since:
Country/Region
will match address-level-1
address-ui-widgets-countryCode-dropdown-nativeId
will match country
address-ui-widgets-countryCode
will match country
This would be a start to improve the matching, but we will still need to handle some other edge cases ( same frequencies ... ).
:serg :dimi what do you think about this ?
Comment 9•2 years ago
|
||
HI Issam, sorry for the late reply!
The solution you suggested has the same idea as fathom - Using multiple rules to determine the result. However, I would be careful about adding this kind of heuristic because very often in the end we solve one issue in a site, but create a new one in another site.
Since in this case the misclassified element is a <select> and it contains <option>s with Country Name, do you think we can use this as a hint to recognize country
?
Assignee | ||
Comment 10•2 years ago
|
||
Assignee | ||
Comment 11•2 years ago
|
||
Depends on D160167
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•