Closed Bug 1160997 Opened 9 years ago Closed 6 years ago

[v2.2][Gaia::UI Tests]test_sync_facebook_contacts.py:"TimeoutException: TimeoutException: Timed out after 59.9 seconds"

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.2 affected)

RESOLVED WONTFIX
Tracking Status
b2g-v2.2 --- affected

People

(Reporter: liuke, Unassigned)

References

()

Details

Attachments

(1 file)

[Description]
test_sync_facebook_contacts.py fails

[Steps to Reproduce]
Run the test_sync_facebook_contacts.py

[Expected Results]
Device should import all friends to device.

[Actual Results]
After we log in Facebook account, device still prompts "No friends or contacts found in this account."

[Reproduction Frequency]
Always, 5/5

Traceback (most recent call last):
  File "/home/mozilla/workspace/gaia/tests/python/gaia-ui-tests/0504/local/lib/python2.7/site-packages/marionette_client_mozilla_b2g37_v2_2-0.1-py2.7.egg/marionette/marionette_test.py", line 268, in run
    testMethod()
  File "/home/mozilla/workspace/gaia/tests/python/gaia-ui-tests/gaiatest/tests/functional/contacts/test_sync_facebook_contacts.py", line 34, in test_import_contacts_from_facebook
    contact_import_picker = facebook.login(username, password)
  File "/home/mozilla/workspace/gaia/tests/python/gaia-ui-tests/gaiatest/apps/system/regions/facebook.py", line 69, in login
    return ContactImportPicker(self.marionette)
  File "/home/mozilla/workspace/gaia/tests/python/gaia-ui-tests/gaiatest/apps/contacts/regions/contact_import_picker.py", line 21, in __init__
    *self._contact_import_picker_frame_locator))))
  File "/home/mozilla/workspace/gaia/tests/python/gaia-ui-tests/0504/local/lib/python2.7/site-packages/marionette_client_mozilla_b2g37_v2_2-0.1-py2.7.egg/marionette/wait.py", line 143, in until
    cause=last_exc)
TimeoutException: TimeoutException: Timed out after 59.9 seconds

[Build info]
Build ID               20150503002500
Gaia Revision          8d14361337e608c8cdf165ea5034db5eda23b618
Gaia Date              2015-05-01 18:23:46
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/cb7cb6597c91
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150503.040203
Firmware Date          Sun May  3 04:02:15 EDT 2015
Bootloader             L1TC000118D0

[Attachments]
Non-Smoketest report

[Note]
Issue DOES NOT REPRODUCE manually - 5/5 passing, after we log in the same account, the contacs can be displayed and imported normally.
Attached file non_smoke.html
See Also: → 1161000
This is not a problem in mozilla-central.
This test passes 5/5 on my CI machine and laptop today.
What will happen if you login in Facebook via desktop browser?
@ The same test account
@ The same network

Does it have friends in this account?
(In reply to William Hsu [:whsu] from comment #5)
> What will happen if you login in Facebook via desktop browser?
> @ The same test account
> @ The same network
> 
> Does it have friends in this account?

Yes, the account have 3 friends. And we can import the friends manually(same account and network, fail rate 0/3), but device still prompts "No friends or contacts found in this account." automatically(If you change the Facebook account, the bug still exist, fail rate: 3/3).
(In reply to Lance from comment #6)
> Yes, the account have 3 friends. And we can import the friends manually(same
> account and network, fail rate 0/3), but device still prompts "No friends or
> contacts found in this account." automatically(If you change the Facebook
> account, the bug still exist, fail rate: 3/3).

What account do you use? I just tried myself on the v2.2 branch and I still get a passing test. I'm using the gaia_dxnzuri_****s@tfbnw.net account for this.
This is my pip freeze:
boto==2.36.0
gaiatest==0.33
gaiatest-v2.2==0.1
httplib2==0.9
manifestparser==1.0
marionette-client==0.9
marionette-client-mozilla-b2g37-v2-2==0.1
marionette-driver==0.2
marionette-transport==0.4
mozcrash==0.14
mozdevice==0.44
mozfile==1.1
mozhttpd==0.7
mozinfo==0.7
mozlog==2.10
moznetwork==0.24
mozprocess==0.22
mozprofile==0.23
mozrunner==6.7
moztest==0.7
mozversion==1.2
oauth2==1.5.211
requests==2.5.3
treeherder-client==1.0
wsgiref==0.1.2
I found an interesting symptom. It doesn't only happen on Lance's test account.

I used my facebook account to do the test.
The result is pass, but there are only few contacts (14 contacts) which can be listed and imported.
(In reply to Lance from comment #8)
> (In reply to Martijn Wargers [:mwargers] (QA) from comment #7)
> We using the Facebook account: rosetest2015@gmail.com
> password: ********

Thanks, I can reproduce it with that account.
With automated testing, we use the Facebook developer app, otherwise we could get many errors for logging in very different places in the world:
http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/apps/system/regions/facebook.py#27

It looks that Facebook account that you use is Taiwanese. Facebook at least is automatically switching to Chinese.
Johan, is there anything in the developer Facebook account that need to be adjust, so this automated test could work for this account, too?

Lance, or perhaps you can just use the gaia_dxnzuri_tests@tfbnw.net Facebook account. I can mail you the password for that.
Flags: needinfo?(jlorenzo)
(In reply to William Hsu [:whsu] from comment #9)
> I found an interesting symptom. It doesn't only happen on Lance's test
> account.
> 
> I used my facebook account to do the test.
> The result is pass, but there are only few contacts (14 contacts) which can
> be listed and imported.

Do you get differences between manual and automation? Or do you see the same results in both of them?
Flags: needinfo?(whsu)
(In reply to Martijn Wargers [:mwargers] (QA) from comment #11)
> (In reply to William Hsu [:whsu] from comment #9)
> > I found an interesting symptom. It doesn't only happen on Lance's test
> > account.
> > 
> > I used my facebook account to do the test.
> > The result is pass, but there are only few contacts (14 contacts) which can
> > be listed and imported.
> 
> Do you get differences between manual and automation? Or do you see the same
> results in both of them?

Yes, I got different results between manual test and automation test.
14 contacts can be imported via automation test.
433 account can be imported via manual test.
Flags: needinfo?(whsu)
(In reply to Martijn Wargers [:mwargers] (QA) from comment #10)

Like Martijn inferred, the account rosetest2015@gmail.com won't work because it's a real account (from Facebook's POV). We need to:
* either create another test account for our Facebook app,
* or use gaia_dxnzuri_tests@tfbnw.net

I'm totally fine with using gaia_dxnzuri_tests@tfbnw.net. It's an account with some fake friends in it, and none of our tests changes the associated data. The risk of race condition is low.
Flags: needinfo?(jlorenzo)
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: