Closed Bug 1218721 Opened 4 years ago Closed 4 years ago

Importing contacts gets stuck when importing a contact without a name.

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(blocking-b2g:2.5+, firefox45 fixed, b2g-v2.2 unaffected, b2g-v2.5 verified, b2g-master verified)

VERIFIED FIXED
FxOS-S11 (13Nov)
blocking-b2g 2.5+
Tracking Status
firefox45 --- fixed
b2g-v2.2 --- unaffected
b2g-v2.5 --- verified
b2g-master --- verified

People

(Reporter: pensacola_m2000, Assigned: bevis)

References

Details

(Keywords: regression, smoketest, Whiteboard: [dogfood-blocker])

Attachments

(4 files, 2 obsolete files)

Attached image 2015-10-27-11-44-07.png
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0
Build ID: 20151014143721

Steps to reproduce:

OS version: 2.5.0.0 prerelease
Platform version: 44.0a1
Build identifier: 20151022030554
Nightly

Go to contacts app and select to import contacts from SIM card.



Actual results:

Importing contacts gets stuck and only few contacts are being imported, please see the attached screenshot.


Expected results:

Contacts should be successfully  imported
Could not reproduce with Flame or Aries 2.5 latest builds but my SIM Card only allows me to have 256 contacts, from the screenshot attached seems like you have a different kind of SIM (64K o 128K) which allows you to have more contacts. 

Does this bug always happen to you or you were finally able to import the contacts?

Adding qawanted to check this bug with different SIM Cards and with Aries.
Flags: needinfo?(pensacola_m2000)
Keywords: qawanted
(In reply to Isabel Rios from comment #1)
> Could not reproduce with Flame or Aries 2.5 latest builds but my SIM Card
> only allows me to have 256 contacts, from the screenshot attached seems like
> you have a different kind of SIM (64K o 128K) which allows you to have more
> contacts. 
> 
> Does this bug always happen to you or you were finally able to import the
> contacts?
> 
> Adding qawanted to check this bug with different SIM Cards and with Aries.

I am not able to import all the contacts, only 43 as it shows in the screenshot, then it gets stuck, so yes it is always reproducing.
Flags: needinfo?(pensacola_m2000)
(In reply to Marcela Oniga from comment #2)
> (In reply to Isabel Rios from comment #1)
> > Could not reproduce with Flame or Aries 2.5 latest builds but my SIM Card
> > only allows me to have 256 contacts, from the screenshot attached seems like
> > you have a different kind of SIM (64K o 128K) which allows you to have more
> > contacts. 
> > 
> > Does this bug always happen to you or you were finally able to import the
> > contacts?
> > 
> > Adding qawanted to check this bug with different SIM Cards and with Aries.
> 
> I am not able to import all the contacts, only 43 as it shows in the
> screenshot, then it gets stuck, so yes it is always reproducing.

Also pressing on Cancel button while importing is stuck , does not work.
Hi Marcela,

Would you be so kind to share the logs so we can see the error you are having?
Please go to the device Settings -> Developer -> Debugging via USB, select ADB and DevTools. Then scroll down and active RIL Output in ADB. 

Connect your device and once it is detected do: adb logcat | grep "Error" -> log.txt and reproduce the problem. Then attach the log.txt file here.

That would be very helpful.

Thank you!
Flags: needinfo?(pensacola_m2000)
Could not reproduce on the following builds. 


Environmental Variables: (not affected)
Device: Flame 2.5
BuildID: 20151022030554
Gaia: 29ce8ec8606e59f582375234440812b046346513
Gecko: 76bd0c01d72e64ca4f261ffdb2652a91f961e930
Gonk: bd9cb3af2a0354577a6903917bc826489050b40d
Version: 44.0a1 (2.5) 
Firmware Version: v18D

Environmental Variables: (not affected)
Device: Flame 2.2
BuildID: 20151027032504
Gaia: 885647d92208fb67574ced44004ab2f29d23cb45
Gecko: 05144e035522
Gonk: bd9cb3af2a0354577a6903917bc826489050b40d
Version: 37.0 (2.2) 
Firmware Version: v18D

Environmental Variables: (not affected)
Device: Aries 2.5
BuildID: 20151027122943
Gaia: b6ede3d0fdec5fc922e9ca3401e60db461bf705c
Gecko: 9a8f2342fb3116d23989087e026448d38a3768c5
Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd
Version: 44.0a1 (2.5) 
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmercado)
Keywords: qawanted
Let's get at least one more attempt at reproducing this issue.  Marcela please provide the logs requested in comment 4.
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmercado)
Keywords: qawanted
I was unable to reproduce this issue on the Aries, Flame 2.5 (Today's central build) and the build around the reporter's date.
Result: Successfully able to Import contacts from SIM card from contacts. 

Environmental Variables: [Unaffected]
Device: Aries 2.5
BuildID: 20151027123217
Gaia: b6ede3d0fdec5fc922e9ca3401e60db461bf705c
Gecko: e51755b3ed61f2d1ae89a328f299bc92feddfa0d
Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd
Version: 44.0a1 (2.5) 
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0

Environmental Variables: [Unaffected]
Device: Flame 2.5
BuildID: 20151027123532
Gaia: b6ede3d0fdec5fc922e9ca3401e60db461bf705c
Gecko: 4e164269cf888c03a18d1c4ea057bca68fb0ed32
Gonk: 205ac4204bbbb2098a8046444acba551ba5dc75a
Version: 44.0a1 (2.5) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0

Environmental Variables: [Unaffected]
Device: Flame 2.5
BuildID: 20151023022430
Gaia: 410e91ddabc7ba82a9b43b3711a3fdf2cb8de309
Gecko: 13f32d98ff20718496bd08eb610950429a343f42
Gonk: 205ac4204bbbb2098a8046444acba551ba5dc75a
Version: 44.0a1 (2.5) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmercado)
Keywords: qawanted
Whiteboard: qa
Three QA have been unable to reproduce this issue.  Marcela if you can reproduce this issue and provide logs that would be useful.
Flags: needinfo?(jmercado)
Whiteboard: qa
Attached file log.txt
Sorry for late response, I've attached the logs.
Flags: needinfo?(pensacola_m2000)
Seems that there is some contact without name in the SIM Card, could that be? 
E/Communications(16886): [JavaScript Error: "TypeError: item.name is null" {file: "app://communications.gaiamobile.org/shared/js/
/import/utilities/import_sim_contacts.js" line: 175}]

I created a contact in a SIM, from another device, then I tried to import it in flame and I got to reproduce the problem. The import process is stuck.

Adding qawanted to check if this a regression. 
If not, there should be a way to skip that contact and continue with the importing but this way is not possible to import the contacts ever...

Thanks!
Keywords: qawanted
This is also happening in Aries 2.5:
BuildID: 20151029003541
Gaia: 75f2236d
Gecko: 286091b0
Platform: 44.0a1
[Blocking Requested - why for this release]: To discuss in the triage how to follow this bug up
blocking-b2g: --- → 2.5?
This fails case https://moztrap.mozilla.org/manage/case/6119/
Upgrading to a Smoke Test blocker.

Amending title to specify that this requires a contact without a name, and is not a Flame specific bug, but occurs on Aries as well.
Flags: needinfo?(ktucker)
Keywords: smoketest
Summary: [Flame]Importing contacts gets stuck → Importing contacts gets stuck when importing a contact without a name.
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Keywords: qaurgent
Whiteboard: [dogfood-blocker]
I reproduced the bug on Flame Master after creating a contact with nothing in it's fields except for a character in the email field. 
Using the same method I was unable to reproduce the stuck contact on Flame 2.2. 


Environmental Variables:(affected)
Device: Flame Master
BuildID: 20151029045227
Gaia: 91cac94948094cfdcd00cba5c6483e27e80cb3b0
Gecko: acb3f4ac5424181d3d4d73283668162137918cf1
Gonk: 205ac4204bbbb2098a8046444acba551ba5dc75a
Version: 45.0a1 (Master) 
Firmware Version: v18D

Environmental Variables: No repro (not affected)
Device: Flame 2.2
BuildID: 20151029002509
Gaia: bbf3bf4c8eaab837c220f2c4ea3e3088dc075d57
Gecko: fa2cba6566a3
Gonk: bd9cb3af2a0354577a6903917bc826489050b40d
Version: 37.0 (2.2) 
Firmware Version: v18D
Flags: needinfo?(jmercado)
Keywords: qawanted
Keywords: regression
Let's get a window here.
Flags: needinfo?(jmercado)
QA Contact: pcheng
1) There's another bug in between my last working and first broken builds, which is bug 1189884.
2) My inbound pushlog is bigger than central pushlog because of (1), therefore I'm posting central window here.

Central regression window:

Last Working
Device: Flame 2.5
BuildID: 20150727091245
Gaia: 302a448729ff2b336581cf94b66327ea836294c7
Gecko: d576f2cec511
Version: 42.0a1 (2.5)
Firmware Version: v18Dv4
User Agent: Mozilla/5.0 (Mobile; rv:42.0) Gecko/42.0 Firefox/42.0

First Broken
Device: Flame 2.5
BuildID: 20150804124748
Gaia: c5425d9f1f5184731a59ed4bc99295acbde30390
Gecko: 3481b4230263
Version: 42.0a1 (2.5) 
Firmware Version: v18Dv4
User Agent: Mozilla/5.0 (Mobile; rv:42.0) Gecko/42.0 Firefox/42.0

Last Working Gaia First Broken Gecko - repro
Gaia: 302a448729ff2b336581cf94b66327ea836294c7
Gecko: 3481b4230263

Last Working Gecko First Broken Gaia - no repro
Gaia: c5425d9f1f5184731a59ed4bc99295acbde30390
Gecko: d576f2cec511

Gecko pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d576f2cec511&tochange=3481b4230263

I suspect this issue is caused by changes made in bug 1114937 (which also introduced bug 1189884 and after bug 1189884 was fixed, made this bug 1218721 visible).
Bevis can you take a look at this one?  You handled worked on bug 1189884 and bug 1114937.
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmercado) → needinfo?(btseng)
(In reply to Jayme Mercado [:JMercado] from comment #19)
> Bevis can you take a look at this one?  You handled worked on bug 1189884
> and bug 1114937.

Sorry, my bad.
In the original implementation, the |name| and |tel| of the MozContact object returned by RILContentHelper.js will always be an array with 1 element even the name or tel is null. [1]
In the new implementation, the array of |name| and |tel| will only be created if they are available from IccContact. [2]

I'll take this bug to fix it asap.

[1] https://hg.mozilla.org/mozilla-central/file/44935ff56b63/dom/system/gonk/RILContentHelper.js#l293
[2] https://hg.mozilla.org/mozilla-central/file/69d0fee7d878/dom/icc/IccCallback.cpp#l51
Assignee: nobody → btseng
Flags: needinfo?(btseng)
Component: Gaia::Contacts → RIL
Comms triage: Functional regression from 2.2
blocking-b2g: 2.5? → 2.5+
Hi Edgar,

May I have your review for this quick fix?

Thanks!
Attachment #8682344 - Flags: review?(echen)
Improve test coverage.
Attachment #8682345 - Flags: review?(echen)
Target Milestone: --- → FxOS-S11 (13Nov)
Comment on attachment 8682344 [details] [diff] [review]
(v1) Part 1: Always Insert Name/Number when Providing IccContact Response.

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

Thank you.

::: dom/icc/ipc/IccIPCUtils.cpp
@@ +52,5 @@
>    if (count > 0) {
>      for (uint32_t i = 0; i < count; i++) {
> +      aOutData.names().AppendElement(
> +        rawStringArray[i] ? nsDependentString(rawStringArray[i])
> +                          : EmptyString());

I think IPC part should be transparent, use NullString() instead.

@@ +66,5 @@
>    if (count > 0) {
>      for (uint32_t i = 0; i < count; i++) {
> +      aOutData.numbers().AppendElement(
> +        rawStringArray[i] ? nsDependentString(rawStringArray[i])
> +                          : EmptyString());

Ditto

@@ +80,5 @@
>    if (count > 0) {
>      for (uint32_t i = 0; i < count; i++) {
> +      aOutData.emails().AppendElement(
> +        rawStringArray[i] ? nsDependentString(rawStringArray[i])
> +                          : EmptyString());

Ditto
Attachment #8682344 - Flags: review?(echen) → review+
Attachment #8682345 - Flags: review?(echen) → review+
Adopt NullString() in IPC.
Attachment #8682344 - Attachment is obsolete: true
Attachment #8682934 - Flags: review+
Attachment #8682345 - Attachment is obsolete: true
Attachment #8682935 - Flags: review+
try server result in comment 30 is green.
Keywords: checkin-needed
Bevis, 

This is a 2.5+. can you please set the approval‑mozilla‑b2g44 flag and answer the resulting questions. Need them to land on 2.5. 

Thanks
Flags: needinfo?(btseng)
Comment on attachment 8682934 [details] [diff] [review]
Part 1: Always Insert Name/Number when Providing IccContact Response. r=echen

[Approval Request Comment]
Bug caused by (feature/regressing bug #):1114937
User impact if declined: Device will be stock in importing SIM Contacts.
Testing completed: Yes.
Risk to taking this patch (and alternatives if risky): No
String or UUID changes made by this patch:N/A
Flags: needinfo?(btseng)
Attachment #8682934 - Flags: approval‑mozilla‑b2g44?
Comment on attachment 8682935 [details] [diff] [review]
Part 2: Improve Test Coverage. r=echen

[Approval Request Comment]
Bug caused by (feature/regressing bug #):1114937
User impact if declined: Device will be stock in importing SIM Contacts.
Testing completed: Yes.
Risk to taking this patch (and alternatives if risky): No
String or UUID changes made by this patch:N/A
Attachment #8682935 - Flags: approval‑mozilla‑b2g44?
(In reply to Bevis Tseng[:bevistseng][:btseng] from comment #37)
> User impact if declined: Device will be stock in importing SIM Contacts.
typo: "stuck" instead.
This issue is verified fixed in FLame 2.6 and Aries 2.6.

Environmental Variables:
Device: Aries 2.6 [Full Flash]
BuildID: 20151106140230
Gaia: cec4c1d3729137a24163756d15f98b0d37803966
Gecko: 512caeeb5565bb819a24ebda6a37b44fdf71b6c3
Gonk: a19052e4389c3ae2d8fc3e7a74a475401baacc56
Version: 45.0a1 (2.6)
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:45.0) Gecko/45.0 Firefox/45.0

Device: Flame 2.6 [Full Flash][512mb]
BuildID: 20151106030214
Gaia: f39a7a827c0c0f48087ff3ead94f61ae22523919
Gecko: cc48981c026c50fdf80d47b040ae1fb8fe99ad07
Gonk: 205ac4204bbbb2098a8046444acba551ba5dc75a
Version: 45.0a1 (2.6) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:45.0) Gecko/45.0 Firefox/45.0

Result:
User is able to import contacts without a name.
Status: RESOLVED → VERIFIED
Flags: needinfo?(jmercado)
Comment on attachment 8682934 [details] [diff] [review]
Part 1: Always Insert Name/Number when Providing IccContact Response. r=echen

Thanks for finishing the test. Approved to land on 2.5
Attachment #8682934 - Flags: approval‑mozilla‑b2g44? → approval‑mozilla‑b2g44+
Attachment #8682935 - Flags: approval‑mozilla‑b2g44? → approval‑mozilla‑b2g44+
Setting verifyme to check this on 2.5 when uplifted to the b2g44 branch.
Flags: needinfo?(jmercado)
Keywords: verifyme
Hi, part 2  doesn't apply to b2g44 cleanly:

Tomcats-MacBook-Pro-2:mozilla-central Tomcat$ hg graft --edit -r 00e7f00dcd28
grafting 313148:00e7f00dcd28 "Bug 1218721 - Part 2 - Improve Test Coverage. r=echen"
merging dom/icc/tests/marionette/test_icc_contact_add.js
merging dom/icc/tests/marionette/test_icc_contact_update.js
warning: conflicts during merge.
merging dom/icc/tests/marionette/test_icc_contact_update.js incomplete! (edit conflicts, then use 'hg resolve --mark')
abort: unresolved conflicts, can't continue
(use hg resolve and hg graft --continue)
Flags: needinfo?(btseng)
(In reply to Carsten Book [:Tomcat] from comment #43)
> Hi, part 2  doesn't apply to b2g44 cleanly:
> 
> Tomcats-MacBook-Pro-2:mozilla-central Tomcat$ hg graft --edit -r 00e7f00dcd28
> grafting 313148:00e7f00dcd28 "Bug 1218721 - Part 2 - Improve Test Coverage.
> r=echen"
> merging dom/icc/tests/marionette/test_icc_contact_add.js
> merging dom/icc/tests/marionette/test_icc_contact_update.js
> warning: conflicts during merge.
> merging dom/icc/tests/marionette/test_icc_contact_update.js incomplete!
> (edit conflicts, then use 'hg resolve --mark')
> abort: unresolved conflicts, can't continue
> (use hg resolve and hg graft --continue)

I expected that its dependency (bug 1213785) is in 2.5 as well according to bug 1213785 comment 10. 
However, I found that it was backout by Ryan in this revision:
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/c2b3f129d0c8
Depends on: 1213785
Flags: needinfo?(btseng)
  This bug has been verified as "pass" on the latest build of Flame KK 2.5 and Aires KK 2.5 by the STR in comment 0.

Actual results: User is able to import contacts without a name.
See attachment: verified_Aries KK_v2.5.3gp.
Reproduce rate: 0/10


Device: Flame KK 2.5 512mb(Pass)
Build ID               20151112012418
Gaia Revision          8f27e453f3c88b46ff64b638a701eb27f5a63789
Gaia Date              2015-11-11 22:36:54
Gecko Revision         http://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/cf8fab65e9a61b0cf4e12f4196e42aa8dbadd078
Gecko Version          44.0a2
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.worker.20151112.003544
Firmware Date          Thu Nov 12 00:35:53 UTC 2015
Firmware Version       v18D v4
Bootloader             L1TC000118D0

Device: Aries KK 2.5 (Pass)
Build ID               20151112013407
Gaia Revision          8f27e453f3c88b46ff64b638a701eb27f5a63789
Gaia Date              2015-11-11 22:36:54
Gecko Revision         http://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/cf8fab65e9a61b0cf4e12f4196e42aa8dbadd078
Gecko Version          44.0a2
Device Name            aries
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.worker.20151112.004036
Firmware Date          Thu Nov 12 00:40:44 UTC 2015
Bootloader             s1
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][MGSEI-Triage+]
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.