Closed
Bug 1196694
Opened 9 years ago
Closed 9 years ago
Failure to match contacts by phone numbers
Categories
(Firefox OS Graveyard :: Gaia::Dialer, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1200576
People
(Reporter: gerard-majax, Unassigned)
References
Details
(Keywords: dataloss, foxfood, regression)
This is something that used to work and that regressed at some point in the past. Might be a data migration issue with my profile ...
STR:
0. Have a contact "* XXX", with registered valid phone number "+33247..."
1. Open Dialer
2. Type "0247"
Expected:
I have a match of phone number that is ready to call, i.e., I see the suggested contact "* XXX, +33247..."
Actual:
I have a match against the good contact, but the phone number in the suggestion is "undefined"
On startup of dialer, I can see:
> 08-20 13:36:26.773 320 320 E GeckoConsole: [JavaScript Error: "ConstraintError" {file: "jar:file:///system/b2g/omni.ja!/components/DataStoreImpl.js" line: 233}]
On appearance of the bogus suggestion, I can see:
> 08-20 13:36:47.183 5475 5475 E Communications: [JavaScript Error: "TypeError: item is undefined" {file: "app://communications.gaiamobile.org/shared/js/binary_search.js" line: 1}]
> 08-20 13:36:47.233 320 320 E GeckoConsole: [JavaScript Error: "uncaught exception: [object DOMError]"]
> 08-20 13:36:47.233 320 320 E GeckoConsole: [JavaScript Error: "uncaught exception: [object DOMError]"]
> 08-20 13:36:47.233 320 320 E GeckoConsole: [JavaScript Error: "TypeError: iconObject is undefined" {file: "app://system.gaiamobile.org/js/card.js" line: 298}]
> 08-20 13:36:47.233 320 320 E GeckoConsole: [JavaScript Error: "uncaught exception: [object DOMError]"]
> 08-20 13:36:47.233 320 320 E GeckoConsole: [JavaScript Error: "uncaught exception: [object DOMError]"]
> 08-20 13:36:47.233 320 320 E GeckoConsole: [JavaScript Error: "uncaught exception: [object DOMError]"]
> 08-20 13:36:47.243 5475 5475 E Communications: [JavaScript Error: "TypeError: item is undefined" {file: "app://communications.gaiamobile.org/shared/js/binary_search.js" line: 1}]
If I start typing "+33247" the matching is properly done and the correct phone number is being suggested.
I am filing this in Dialer, but it might be a lower-level issue ...
Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(jlorenzo)
Flags: needinfo?(gsvelto)
Reporter | ||
Comment 1•9 years ago
|
||
FYI that seems to be reproduced for all contacts I have with an international format number stored: +33xxx.
Comment 2•9 years ago
|
||
Smells like a regression to me, possibly related to my l10n work. Leaving the NI until I've time to work on this.
Comment 3•9 years ago
|
||
I doubt this is related, but we've had some recent bugs dupe'd against bug 1114525.
Flags: needinfo?(jlorenzo)
See Also: → 1114525
Comment 4•9 years ago
|
||
I doubt this is related: Alexandre has a match, while the symptom of bug 1114525 is that we have no match.
Comment 5•9 years ago
|
||
I've tried this on my phones but I cannot get it to reproduce. I've tried both in the emulator using the US prefix (+1) and on my Italian (+39) and Dutch (+31) SIM cards and none match 0247 with a prefixed number (e.g. +31247... or +39247...). 0247 simply yields nothing, could this be specific to how French prefixes are matched? IIRC that job is done in gecko but I could be wrong.
Flags: needinfo?(gsvelto)
Comment 6•9 years ago
|
||
In Dialer we use a lib called simple_phone_matcher.js: https://github.com/mozilla-b2g/gaia/blob/master/shared/js/simple_phone_matcher.js
It runs after a mozContacts call that's done in the lib shared/js/dialer/contacts.js. I don't know much more...
Reporter | ||
Comment 7•9 years ago
|
||
Retested on a build from today and found something even worse: if I remove the number from the contact and add it, when I try to reproduce the bug I do not get an "undefined" value, but rather nothing. But the contact matches !
It means I see a suggestion "XXX, " with XXX the name of the contact and nothing instead of the phone number. Tapping on it triggers a call with the few numbers I started typing.
Reporter | ||
Comment 8•9 years ago
|
||
I see you guys did hack in the ContactDB code. Can you instruct me what I should give you to check ?
Component: Gaia::Dialer → DOM: Contacts
Flags: needinfo?(reuben.bmo)
Flags: needinfo?(ferjmoreno)
Product: Firefox OS → Core
Comment 9•9 years ago
|
||
Hi Alexandre. Could you set DEBUG to true in ContactDB.jsm and then attach the log while reproducing this? That'd be a good start.
https://dxr.mozilla.org/mozilla-central/source/dom/contacts/fallback/ContactDB.jsm#11
Flags: needinfo?(reuben.bmo)
Comment 10•9 years ago
|
||
The contacts database is at /data/local/storage/permanent/chrome/idb/3406066227csotncta.sqlite
Flags: needinfo?(lissyx+mozillians)
Reporter | ||
Comment 11•9 years ago
|
||
(In reply to Reuben Morais [:reuben] from comment #10)
> The contacts database is at
> /data/local/storage/permanent/chrome/idb/3406066227csotncta.sqlite
I have been able to get you logs that should be even better :). Sent everything per mail (since it contains confidential informations).
FYI this gets reproduced on another device that has another profile and when I create new contacts.
Flags: needinfo?(lissyx+mozillians) → needinfo?(reuben.bmo)
Reporter | ||
Comment 12•9 years ago
|
||
For context:
- creating new account
- adding number following international standard, i.e., +336xxx
- french SIM card
- french network
- no roaming at all
Reporter | ||
Comment 13•9 years ago
|
||
Nominating because this feels like quite bad regression: unable to match number registered with international prefix. Not a dupe of bug 1114525 because I reproduce this on several devices, new profiles, new contacts, with french SIM card on french network, out of roaming zone and with french international prefix.
That means:
- new contact with number +33612345678
- open dialer, start tapping 0612
=> Contact match with empty phone number exposed.
blocking-b2g: --- → 2.5?
Flags: needinfo?(nhirata.bugzilla)
Flags: needinfo?(jlorenzo)
Reporter | ||
Comment 14•9 years ago
|
||
After investigation, I have been able to confirm the issue is indeed around formatting code in suggestion_bar.js code:
> telTag.innerHTML = Sanitizer.unwrapSafeHTML(tel);
The |tel| value we pass onto this call is the proper one, i.e., +336xxx. But we receive an empty string as a result.
Component: DOM: Contacts → Gaia::Dialer
Product: Core → Firefox OS
Comment 15•9 years ago
|
||
Okay, that makes more sense than ContactDB changing behavior after years without any changes to the code :)
Flags: needinfo?(reuben.bmo)
Comment 16•9 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #14)
> After investigation, I have been able to confirm the issue is indeed around
> formatting code in suggestion_bar.js code:
> > telTag.innerHTML = Sanitizer.unwrapSafeHTML(tel);
>
> The |tel| value we pass onto this call is the proper one, i.e., +336xxx. But
> we receive an empty string as a result.
Ugh, I somehow knew that would have come back and bitten us one day. Bug 1200576 is the proper fix, I'm mentoring it right now but since it's not making much forward progress I'll probably make a fix myself and find another bug for the person it's assigned to right now.
Comment 17•9 years ago
|
||
Regression, blocking.
If this is a dupe of bug 1200576, please mark as dup and nominate bug 1200576 .
blocking-b2g: 2.5? → 2.5+
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(jlorenzo)
Resolution: --- → DUPLICATE
Updated•9 years ago
|
blocking-b2g: 2.5+ → ---
Flags: needinfo?(nhirata.bugzilla)
You need to log in
before you can comment on or make changes to this bug.
Description
•