Closed
Bug 952781
Opened 11 years ago
Closed 11 years ago
[Messages] TypeError: navigator.mozPhoneNumberService.normalize is not a function
Categories
(Firefox OS Graveyard :: Gaia::SMS, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: rwaldron, Assigned: rwaldron)
Details
Attachments
(1 file)
(deleted),
image/png
|
Details |
Can no longer view a conversation thread with an unknown contact. Regression caused by bug 907740
Assignee | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Comment 2•11 years ago
|
||
The error message is not really related to the patch of bug 955925. Do you have an explanation about this?
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Julien Wajsberg [:julienw] (PTO until January 6th) from comment #2)
> The error message is not really related to the patch of bug 955925. Do you
> have an explanation about this?
Incorrectly marked as a duplicate.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Assignee | ||
Comment 4•11 years ago
|
||
The full error:
E/GeckoConsole( 548): [JavaScript Error: "TypeError: navigator.mozPhoneNumberService.normalize is not a function" {file: "app://sms.gaiamobile.org/shared/js/fb/fb_data_reader.js" line: 178}]
Comment 5•11 years ago
|
||
Hrm, this was caused by bug 907740? Seems to me that adding the phonenumberservice permission to the manifest in that bug should have fixed this, not caused it.
https://github.com/mozilla-b2g/gaia/commit/e6276c96fcf087a12800419be8a9e25fcbbc924d#diff-5b5b93b97ebf5b42260b375c09d494efR18
Can you provide some steps to repro?
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Michael Henretty [:mhenretty] from comment #5)
> Hrm, this was caused by bug 907740? Seems to me that adding the
> phonenumberservice permission to the manifest in that bug should have fixed
> this, not caused it.
You'd think that, but this app was already using navigator.mozPhoneNumberService.normalize with no issues and when this patch landed, the error immediately appeared. (The patch was landed without final approval from all involved with the review process and back out was vehemently opposed).
>
> https://github.com/mozilla-b2g/gaia/commit/
> e6276c96fcf087a12800419be8a9e25fcbbc924d#diff-
> 5b5b93b97ebf5b42260b375c09d494efR18
>
> Can you provide some steps to repro?
1. Receive a text message from number that does not match any saved contact.
2. Attempt to open the conversation from the thread list view
EXPECTED: the conversation appears
ACTUAL: This uncaught exception occurs
Comment 7•11 years ago
|
||
I did a fresh install from a nightly build on my Keon. I then sent a text from my google account. I was able to open the SMS app, and then click on that thread, and the conversation displayed properly I think (shown in attachment). No error in logcat. Is there something special I need to do beforehand to hit this codepath?
Here is the gaia I was using:
https://github.com/mozilla-b2g/gaia/tree/711d8bf4
http://downloads.geeksphone.com/keon/master/nightly-images-keon-master-2014-01-06.Gecko-f23b396.Gaia-711d8bf.zip
Assignee | ||
Comment 8•11 years ago
|
||
(In reply to Michael Henretty [:mhenretty] from comment #7)
> Created attachment 8356322 [details]
> 2014-01-06-15-34-06.png
>
> I did a fresh install from a nightly build on my Keon. I then sent a text
> from my google account. I was able to open the SMS app, and then click on
> that thread, and the conversation displayed properly I think (shown in
> attachment). No error in logcat. Is there something special I need to do
> beforehand to hit this codepath?
>
> Here is the gaia I was using:
> https://github.com/mozilla-b2g/gaia/tree/711d8bf4
>
> http://downloads.geeksphone.com/keon/master/nightly-images-keon-master-2014-
> 01-06.Gecko-f23b396.Gaia-711d8bf.zip
I can confirm that this issue is no longer reproducible.
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•11 years ago
|
Resolution: FIXED → WORKSFORME
Comment 9•11 years ago
|
||
(In reply to Rick Waldron [:rwaldron] from comment #6)
> (In reply to Michael Henretty [:mhenretty] from comment #5)
> > Hrm, this was caused by bug 907740? Seems to me that adding the
> > phonenumberservice permission to the manifest in that bug should have fixed
> > this, not caused it.
>
> You'd think that, but this app was already using
> navigator.mozPhoneNumberService.normalize with no issues and when this patch
> landed, the error immediately appeared. (The patch was landed without final
> approval from all involved with the review process and back out was
> vehemently opposed).
Actually, I noticed that we were using the fallback code since the start, because we didn't have the permission and thus we didn't have mozPhoneNumberService.normalize at all.
I think that what happened here is that the new code is using mozPhoneNumberService.normalize without a fallback code, but that on your phone you didn't do a reset-gaia and thus you didn't update the permissions for the SMS app. And therefore the API was unavailable, yet used inconditionally in the new code.
Now, I want to be sure that the SMS app works well in Firefox Nightly. Maybe we can add the fallback to our desktop mock instead of utils.js, if this is necessary?
You need to log in
before you can comment on or make changes to this bug.
Description
•