Closed Bug 996527 Opened 11 years ago Closed 11 years ago

[NFC] Could not share contacts

Categories

(Firefox OS Graveyard :: Gaia::Contacts, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.0+, b2g-v2.0 fixed)

VERIFIED FIXED
2.0 S1 (9may)
blocking-b2g 2.0+
Tracking Status
b2g-v2.0 --- fixed

People

(Reporter: ashiue, Assigned: mbudzynski)

References

Details

(Whiteboard: [FT:COMMS])

Attachments

(2 files, 1 obsolete file)

812.61 KB, image/jpeg
Details
46 bytes, text/x-github-pull-request
arcturus
: review+
fcampo
: review+
Details | Review
Using most up-to-date pvt build (2014/4/14) to test Two phones(Device A, Device B) with NFC Device A has some contacts information STR: 1. Enable NFC in settings 2. Device A open specific contact info 3. Touch two phones together 4. Swipe screen on Device A to share specific contact Expected result: Device B receive contact info shared by Device A Actual result: Device B receive nothing
Yoshi, Is the unexpected situation happening in GECKO or contact app?
blocking-b2g: --- → 2.0+
Flags: needinfo?(mbudzynski)
Flags: needinfo?(allstars.chh)
Gecko has delievered the NDEF to Gaia successfully. And last time I tested, I think the Contacts app on Device B is launched, and but Comment 0 says "Device B receive nothing". I think there should be something wrong in Gaia.
Flags: needinfo?(allstars.chh)
Alright. Calling out to Michal for comments.
Whiteboard: [FT:COMMS]
Component: NFC → Gaia::Contacts
triage: NFC contact sharing is committed for 2.0, so this bug stays 2.0+
I'm on it now, starting to investigate the problem with todays build
Flags: needinfo?(mbudzynski)
Assignee: nobody → mbudzynski
Indeed, somehow nothing happens. I'm investigating now.
According to ADB it's sending device bug, not the receiver: [JavaScript Error: "ReferenceError: setImmediate is not defined" {file: "app://communications.gaiamobile.org/shared/js/contact2vcard.js" line: 327}]
It's probably because setImmediate.js file is lazyload only when export view is loaded, working on it now.
I've added missing file [1] so everything is sent now, but Contacts app that receives the contact cannot parse it properly, checking it now. [1] https://github.com/michalbe/gaia/tree/b6527-nfc
It's a regression made probably by separating FTU app from Comms, investigating it now with :arcturus
The problem was made by commented HTML section that was not lazyloaded correctly on import, with [1] it should work as expected. [1] https://github.com/michalbe/gaia/commit/cb69f239b33f546da5504cc00106e3027d864569
Attached image Screen
Now when we receive contacts the app try to display ContactsDetail view, but because of the missing 'id' parameter instead of full contact we have blank details view like on the screen.
according to the research made by fcampo, the Vcard parser have changed couple of months ago. We now send total number of contacts in callbacks, not the contacts. Working on fix now
As :fcampo suggested, opening contacts list instead of details (like when we import multiple contacts) solves the problem for now [1]. [1] https://github.com/michalbe/gaia/commit/13d86acd24345b37fbe69672bb8dd31b8a6ed916
Attached file Patch (obsolete) —
Attachment #8411795 - Flags: review?(francisco.jordano)
Attachment #8411795 - Flags: review?(fernando.campo)
Attachment #8411795 - Flags: review?(francisco.jordano)
Attachment #8411795 - Flags: review?(fernando.campo)
During the IRC discussion with :arcturus & :fcampo we decided that instead of submitting temporary workaround we want this to be fixed as it should be fixed. I provided a WIP patch that opens detail-view when importing one contact & list-view on multiple contacts. This change makes couple of tests fail, so I'm preparing a fix now. We will also test it manually in all the places where VCard parser is used - NFC, importing from SDCard & bluetooth sharing. [1] https://github.com/michalbe/gaia/commit/ace22bb5296930f481e0edd0e9832bd5ac17acbc
Contacts sharing via NFC works now as expected and described in previous comment, failing unit tests are fixed and WIP patch prepared [1]. I'm testing for regressions now (in bluetooth & contact import from SDCard) [1] https://github.com/michalbe/gaia/commit/e2143886f800db7a03c7467fe816ccc1c0289cdb
After merging with master nothing seems to work because some files from contacts are moved to shared, fixing it now.
Paths in Lazyloades changed now[1], everything works as expected, I'm not polishing the patch and will send it for R immediately. [1] https://github.com/michalbe/gaia/commit/76d2f3faac1300dce2edd4bceed699d98bed7d14
Attached file Final Patch
Attachment #8411795 - Attachment is obsolete: true
Attachment #8412655 - Flags: review?(francisco.jordano)
Attachment #8412655 - Flags: review?(fernando.campo)
nit changes in the patch as asked by the reviewer [1]. Additional check [2] is not needed, the function already check if activity is correct couple of line above [3]. [1] https://github.com/mozilla-b2g/gaia/pull/18689#discussion_r12030307 [2] https://github.com/mozilla-b2g/gaia/pull/18689#discussion_r12030303 [3] https://github.com/mozilla-b2g/gaia/pull/18689/files#diff-c421fae418bc6eabdd907455c45e768eR79
Comment on attachment 8412655 [details] [review] Final Patch Excellent job! Tried with the bluetooth export and working great. Thanks Michal!
Attachment #8412655 - Flags: review?(francisco.jordano) → review+
Thanks Francisco. I'm waiting now for :fcampo review.
Flags: needinfo?(fernando.campo)
Fernando, you work on a similar change afaik, could you pls check if our ideas are compatible?
Comment on attachment 8412655 [details] [review] Final Patch Tested and working fine. Just a big kudos to Michał for spotting the importing bug, fixing and improving the tests :) Can't believe we've been months with this unspotted. Next beer is on me mate.
Attachment #8412655 - Flags: review?(fernando.campo) → review+
Flags: needinfo?(fernando.campo)
Thanks Fernando! I'm waiting for Travis to finish and merge.
Travis is green, merging [1]. Thanks everyone for great support and cooperation, especially Francisco & Fernando! [1] https://github.com/mozilla-b2g/gaia/commit/0713998f60edd0185bc82dde68c08d5df10198fa
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S1 (9may)
Gaia db3bcec51a361daddb7d3d4ba4d8a2a664b7b6aa Gecko https://hg.mozilla.org/mozilla-central/rev/90267d87c375 BuildID 20140429160215 Version 32.0a1
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: