[Contacts] Import is stuck and the importation is not successful

VERIFIED FIXED in Firefox OS v1.2

Status

Firefox OS
Gaia::Contacts
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: isabelrios, Assigned: rexboy)

Tracking

(Blocks: 1 bug)

unspecified
1.2 C2(Oct11)
x86_64
Windows 7
Dependency tree / graph

Firefox Tracking Flags

(blocking-b2g:koi+, b2g18 wontfix, b2g-v1.1hd wontfix, b2g-v1.2 fixed)

Details

(Whiteboard: [u=commsapps-user c=contacts p=0])

Attachments

(4 attachments)

(Reporter)

Description

4 years ago
Created attachment 781640 [details]
importing.txt

Unagi device master branch 07/26 build:
Gecko-11373a6
Gaia-ccf877b
ref ril

STR
It is not 100% repo, it has been seen when testing the merging (maybe it is related) and it has happened when there are several contacts in the address book imported from different sources and then trying to import from gmail.

EXPECTED
The import finishes successfully

ACTUAL
The import is stuck almost at the end, there are two or three contacts remaining.

Attached an adb logcat file.
(Reporter)

Comment 1

4 years ago
STR
1. There is one contact in the contact list with Name, Last Name and Phone Number
2. There should be two contacts with same Name, Last Name and Phone Number available to import from Gmail (or Outlook)
3. Go to contact's settings, select import from Gmail.
4. Select the two contacts with same Name, Last Name and Phone Number than the contact stored in the cotnact list

EXPECTED
The contacts are imported and merged correctly

ACTUAL
The import never ends (see screenshot attached). When cancelling, the cancel never ends. It is necessary to kill contacts app
(Reporter)

Updated

4 years ago
Blocks: 915169
blocking-b2g: --- → koi?
Whiteboard: [u=commsapps-user c=contacts p=0]
(Reporter)

Comment 2

4 years ago
Created attachment 806010 [details]
2013-09-17-15-14-50.png
triage: koi+ for broken feature
blocking-b2g: koi? → koi+
Assignee: nobody → rexboy
I think the root cause is that contacts.adaptAndMerge and saveMozContact pass different parameter to onerror callback, while we send a same error handling function to them on persisting contact.

It's easy to fix but I'm hesitating which parameter should we stick on :-/
Created attachment 811015 [details]
Patch

This is a small patch that fixes the error handling.
From the STR I got an "Unknown Error" from mozContacts.save() and the patch just let it being handled correctly.

Jose do you have some time review this simple patch?
Attachment #811015 - Flags: review?(jmcf)
Created attachment 811017 [details]
log

The log I got after applying the patch.
(Before applying patch there's just a javascript error)
Target Milestone: --- → 1.2 QE1(Oct11)

Updated

4 years ago
Attachment #811015 - Flags: review?(jmcf) → review+
(Reporter)

Updated

4 years ago
Blocks: 921977
Thanks for your help Jose!

I just rebased a few times since there were test errors. They are all green now after rebasing.

master:
https://github.com/mozilla-b2g/gaia/commit/d6189aed220a46b743e67c5ad37c764a2e6869b4
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
status-b2g18: --- → wontfix
status-b2g-v1.1hd: --- → wontfix
status-b2g-v1.2: --- → affected
Uplifted d6189aed220a46b743e67c5ad37c764a2e6869b4 to:
v1.2: 81a2b86fd03fc335a351065857f70b6c802c92ac
status-b2g-v1.2: affected → fixed
(Reporter)

Comment 10

4 years ago
Verified on v1.2 10/02 build:
Gecko-f0e33a4
Gaia-7447624

The process finishes correctly.
Status: RESOLVED → VERIFIED
Duplicate of this bug: 898780
You need to log in before you can comment on or make changes to this bug.