Closed Bug 914191 Opened 11 years ago Closed 11 years ago

[Contacts] Import contacts from SD card make phone not enter sleep.

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:koi+, b2g-v1.2 fixed)

RESOLVED FIXED
1.2 C3(Oct25)
blocking-b2g koi+
Tracking Status
b2g-v1.2 --- fixed

People

(Reporter: GaryChen, Assigned: arcturus)

References

Details

(Keywords: regression, Whiteboard: [c=commsapps-user p=4 s= u=1.2])

Attachments

(2 files)

Version: Gaia master
Steps to reproduce:

1. Inserd SD(not include contacts file,vcf vfile) to phone;
2. Press power key to turn on phone;
3. Enter contacts menu,select "import contacts from SIM Card of Facebook";
4. Select from SD ;
5. Appear prompt box "Could not import contacts from SD card",beacause of no vcf file in sd card;
6. Press "Cancel" button,then touch  home button ,return to idle;
7. Pres power key ;
See Also: → 908545
blocking-b2g: --- → koi?
Adding the regression keyword here since we fixed the problem in 1.1, but not 1.2.

Gary, are you still working on this?
Keywords: regression
ni? gary for comment 1
blocking-b2g: koi? → koi+
Flags: needinfo?(gchen)
Sorry, I am still busy on system platform koi+,
If anyone available please feel free to take this bug.
   
Thanks
Flags: needinfo?(gchen)
Assignee: nobody → francisco.jordano
Target Milestone: --- → 1.2 QE1(Oct11)
In hindsight I regret allowing the v1-train patch to move forward without the fix landing on master in bug 908545.  That bug should really have been kept open until this was resolved.  I believe the only thing that needs to be done here is add a unit test to prevent breakage in the future.  If that is super difficult for some reason, then lets just land the fix as provided in bug 908545.
Blocks: 921977
Sorry, this one totally felt from y radar.

Taking care of it and adding a bit of love, will sync with Ben as he seems to be knowing the details happening around here.

Thanks!
After syncing with Ben, what I'll get the patch for master from bug 908545, will need to rebase it and add the unit test.

Thanks,
F.
Status: NEW → ASSIGNED
Attached file Pointer to PR 12656
Attachment #813574 - Flags: review?(bkelly)
Whiteboard: [c=commsapps-user p=4 s= u=1.2]
Comment on attachment 813574 [details]
Pointer to PR 12656

Awesome.  Thanks!

I verified that the new tests fail if I comment out the resetWait(wakeLock) call.

Thanks again for taking this on.
Attachment #813574 - Flags: review?(bkelly) → review+
Landed:

https://github.com/mozilla-b2g/gaia/commit/12d41a0c09531ac8b527b71edaa4daada7b08e9d
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
And backed out :( de6b143ed823fc195c8a802ed4f833cc88d489ba

Because of the following errors:
1) [communications-contacts] Contacts settings SD Card import SD Import went well:
 TypeError: utils.sdcard.retrieveFiles is not a function
at onSdImport (http://communications.gaiamobile.org:8080/contacts/js/views/settings.js:671)
at (anonymous) (http://communications.gaiamobile.org:8080/contacts/test/unit/views/settings_test.js:163)
at wrapper (http://test-agent.gaiamobile.org:8080/common/test/mocha_generators.js:60)
at run (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3709)
at runTest (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4081)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4127)
at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4007)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4016)
at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3964)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3979)
at done (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3700)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3712)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/test/mocha_generators.js:46)
at wrapper (http://test-agent.gaiamobile.org:8080/common/test/mocha_generators.js:73)
at run (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3709)
at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3973)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3984)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4932)

2) [communications-contacts] Contacts settings SD Card import SD Import with error cause no files to import:
ReferenceError: Exception is not defined
at MockWakeLock (http://communications.gaiamobile.org:8080/contacts/test/unit/mock_wakelock.js:7)
at onSdImport (http://communications.gaiamobile.org:8080/contacts/js/views/settings.js:660)
at (anonymous) (http://communications.gaiamobile.org:8080/contacts/test/unit/views/settings_test.js:174)
at wrapper (http://test-agent.gaiamobile.org:8080/common/test/mocha_generators.js:60)
at run (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3709)
at runTest (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4081)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4127)
at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4007)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4016)
at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3964)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3979)
at done (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3700)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3712)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/test/mocha_generators.js:46)
at wrapper (http://test-agent.gaiamobile.org:8080/common/test/mocha_generators.js:73)
at run (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3709)
at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3973)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3984)
at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4932)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Please be mindful of the modification in mock_wakelock.js from bug 917582 when re-landing this.
Thanks :rik for backing out, it's a bit weird, each time that I run it locally, all the contacts suite I get the following:

506 tests complete (18 seconds)

All of them passing, will launch a PR again (with the fixed in bug 917582), and lets see what travis tells me.

Thanks again!
move to v1.2 C3
Target Milestone: 1.2 C2(Oct11) → 1.2 C3(Oct25)
Attached file Pointer to PR 12752
Attachment #819149 - Flags: review?(bkelly)
Comment on attachment 819149 [details]
Pointer to PR 12752

><!DOCTYPE html><meta charset="utf-8"><meta http-equiv="refresh" content="5;https://github.com/mozilla-b2g/gaia/pull/12752"><title>Bugzilla Code Review</title><p>You can review this patch at <a href="https://github.com/mozilla-b2g/gaia/pull/12752">https://github.com/mozilla-b2g/gaia/pull/12752</a>, or wait 5 seconds to be redirected there automatically.</p>
Hmm, that didn't work.  The attachment is redirecting to the wrong pull request.  It is going to 12756 instead of 12752 as said in the attachment summary.  Going to review this:

  https://github.com/mozilla-b2g/gaia/pull/12752
Ouch, the correct PR is this one: PR 12752
Attachment updated, thanks!
Comment on attachment 819149 [details]
Pointer to PR 12752

r=me for pull request 12752 (don't think this was updated to redirect correctly).  There are a couple nits on GH.  The tests pass locally, but please make sure travis is green before landing.

Thanks!
Attachment #819149 - Flags: review?(bkelly) → review+
So far, the unit test are passing, but the ui test are not.

Wonder if this is a known issue and I should merge.


https://travis-ci.org/mozilla-b2g/gaia/builds/12753402

Very tempted to merge :S
I haven't seen this before and it's in contacts:

Traceback (most recent call last):

File "/usr/local/lib/python2.7/dist-packages/marionette_client-0.6.0-py2.7.egg/marionette/marionette_test.py", line 123, in run

self.setUp()

File "/home/travis/build/mozilla-b2g/gaia/tests/python/gaia-ui-tests/gaiatest/tests/functional/contacts/test_add_contact_to_favorites.py", line 16, in setUp

self.data_layer.insert_contact(self.contact)

File "/home/travis/build/mozilla-b2g/gaia/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 159, in insert_contact

result = self.marionette.execute_async_script('return GaiaDataLayer.insertContact(%s);' % json.dumps(contact), special_powers=True)

File "/usr/local/lib/python2.7/dist-packages/marionette_client-0.6.0-py2.7.egg/marionette/marionette.py", line 1073, in execute_async_script

filename=os.path.basename(frame[0]))

File "/usr/local/lib/python2.7/dist-packages/marionette_client-0.6.0-py2.7.egg/marionette/marionette.py", line 577, in _send_message

self._handle_error(response)

File "/usr/local/lib/python2.7/dist-packages/marionette_client-0.6.0-py2.7.egg/marionette/marionette.py", line 612, in _handle_error

raise JavascriptException(message=message, status=status, stacktrace=stacktrace)

JavascriptException: TypeError: contact.init is not a function

stacktrace:

execute_async_script @gaia_test.py, line 159

inline javascript, line 397

src: " contact.init(aContact);"

TEST-UNEXPECTED-FAIL | test_add_contact_to_favorites.py test_add_contact_to_favorites.TestAddContactToFavorite.test_add_contact_to_favorite
It seems this is failing:

  var c = new mozContact();
  c.init(params);

With init() not being a function.

Reuben, do you think this could be related to your webidl changes that recently landed?
Flags: needinfo?(reuben.bmo)
I realised that ui test is also failing in other builds:

https://travis-ci.org/mozilla-b2g/gaia/jobs/12744888
As per conversation on IRC, we will merge this bug, as unit tests are passing and the error that we see in the gaia ui tests is happening without this PR as well.
Landend:

https://github.com/mozilla-b2g/gaia/commit/0b28ac489ddf484468bb1df336b81ae9421bf1fd
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
(In reply to Ben Kelly [:bkelly] from comment #22)
> Reuben, do you think this could be related to your webidl changes that
> recently landed?

Yes. I'll land my PR.
Flags: needinfo?(reuben.bmo)
Uplifted 0b28ac489ddf484468bb1df336b81ae9421bf1fd to:
v1.2: c7f75ad29da127cd27690eeafcf5d7d008ad1c87
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: