Closed Bug 1072225 Opened 5 years ago Closed 2 years ago

[v2.1] Tests are failing with JavascriptException: AbortError when launching an app

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: viorela, Unassigned)

Details

Attachments

(2 files, 1 obsolete file)

Attached file logcat
Test test_cost_control_data_alert_mobile.py is failing intermittently on latest v2.1, while launching Browser app, with a JavaScriptException error: http://jenkins1.qa.scl3.mozilla.com/view/UI/job/flame-319.mozilla-aurora.ui.functional.smoke/76/HTML_Report/

I've been able to reproduce the issue locally, by running the automated test several times.
Repro rate: 1 out of 10. I haven't seen this test failing on master. Also, this is the first time I see it failing with this error on v2.1-

In the logcat of the issue I see:
E/GeckoConsole(18829): [JavaScript Error: "AbortError"]
E/GeckoConsole(18829): [JavaScript Error: "IndexedDB UnknownErr: IDBTransaction.cpp:870"]
I'll attach the complete log of the test failure.

Traceback (most recent call last):
File "/var/jenkins/2/workspace/flame-319.mozilla-aurora.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.8.3-py2.7.egg/marionette/marionette_test.py", line 171, in run
testMethod()
File "/var/jenkins/2/workspace/flame-319.mozilla-aurora.ui.functional.smoke/tests/python/gaia-ui-tests/gaiatest/tests/functional/cost_control/test_cost_control_data_alert_mobile.py", line 44, in test_cost_control_data_alert_mobile
search.launch()
File "/var/jenkins/2/workspace/flame-319.mozilla-aurora.ui.functional.smoke/tests/python/gaia-ui-tests/gaiatest/apps/search/app.py", line 17, in launch
Base.launch(self)
File "/var/jenkins/2/workspace/flame-319.mozilla-aurora.ui.functional.smoke/tests/python/gaia-ui-tests/gaiatest/apps/base.py", line 27, in launch
self.app = self.apps.launch(self.name, self.manifest_url, self.entry_point, launch_timeout=launch_timeout)
File "/var/jenkins/2/workspace/flame-319.mozilla-aurora.ui.functional.smoke/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 62, in launch
% (manifest_url, json.dumps(entry_point)), script_timeout=launch_timeout)
File "/var/jenkins/2/workspace/flame-319.mozilla-aurora.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.8.3-py2.7.egg/marionette/marionette.py", line 1251, in execute_async_script
filename=os.path.basename(frame[0]))
File "/var/jenkins/2/workspace/flame-319.mozilla-aurora.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.8.3-py2.7.egg/marionette/decorators.py", line 35, in _
return func(*args, **kwargs)
File "/var/jenkins/2/workspace/flame-319.mozilla-aurora.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.8.3-py2.7.egg/marionette/marionette.py", line 638, in _send_message
self._handle_error(response)
File "/var/jenkins/2/workspace/flame-319.mozilla-aurora.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.8.3-py2.7.egg/marionette/marionette.py", line 686, in _handle_error
raise errors.JavascriptException(message=message, status=status, stacktrace=stacktrace)
JavascriptException: JavascriptException: AbortError
stacktrace:
@, line 0

Device firmware (date) 	23 Sep 2014 16:27:40
Device firmware (incremental) 	eng.cltbld.20140923.192730
Device firmware (release) 	4.3
Device identifier 	flame
Gaia date 	23 Sep 2014 09:39:59
Gaia revision 	b542080231bb
Gecko build 	20140923160203
Gecko revision 	d614ae398c03
Gecko version 	34.0a2
Attached video browser_fail.webm
video of the test failure
Just 1/10, that's odd.. maybe it's just unrelated to launching the browser?

When you run this test, do you still see the same:
E/GeckoConsole(18829): [JavaScript Error: "AbortError"]

in the logcat every time, regardless of whether the test continues or not?
(In reply to Zac C (:zac) from comment #2)
> Just 1/10, that's odd.. maybe it's just unrelated to launching the browser?
> 
> When you run this test, do you still see the same:
> E/GeckoConsole(18829): [JavaScript Error: "AbortError"]
> 
> in the logcat every time, regardless of whether the test continues or not?

No, that error is not in the logcat when the test is passing.
This seems related to a whole lot of IndexedDB issues we had recently. All looks good now.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
Test test_add_to_an_existing_contact_from_messages.py has failed in the latest v2.1 build with the error described in this bug, while launching Contacts app: http://jenkins1.qa.scl3.mozilla.com/job/flame-kk-319.mozilla-b2g34_v2_1.ui.functional.non-smoke/73/HTML_Report/

I ran the test locally and I was able to reproduce the failure. 
Reproduction rate: 1/10
I checked the logcat of the test when failing and I saw [JavaScript Error: "IndexedDB UnknownErr: IDBTransaction], so I supposed we still have IndexedDB issues.

I'm not sure how this issue was previously fixed.
Zac, do you have more info related to this issue and how it got fixed? Thanks!
Status: RESOLVED → REOPENED
Flags: needinfo?(zcampbell)
Resolution: WORKSFORME → ---
No I don't, I'd have to search myself and you could do the same.
Flags: needinfo?(zcampbell)
QA Whiteboard: [fxosqa-auto-backlog+]
Assignee: nobody → viorela.ioia
test_add_to_an_existing_contact_from_messages.TestSmsAddToExistingContact also failed with this error.
http://jenkins1.qa.scl3.mozilla.com/view/UI/job/flame-kk-319.mozilla-b2g34_v2_1.ui.functional.non-smoke/91/HTML_Report/

I was able to reproduce the issue locally with automation: 1 out of 10
QA Whiteboard: [fxosqa-auto-backlog+] → [fxosqa-auto-backlog+][fxosqa-auto-s5]
QA Whiteboard: [fxosqa-auto-backlog+][fxosqa-auto-s5] → [fxosqa-auto-s5]
I've investigated this and I was able to reproduce the failure locally, by running test_add_to_an_existing_contact_from_messages.py several times on latest v2.1.
The test is failing when trying to launch Contacts app while on Messages. 
But as a user, in order to launch an app I have to go to homescreen and then tap that app.
 
I propose to update this test by adding a touch on home button in order to get on homescreen, and then launch the app. 
Also, I'll do the same change in test_add_to_new_contact_from_messages.py and test_cost_control_data_alert_mobile.py, where we also launch an app while on another app. 
I'll open a PR with the changes on master, and uplift it to v2.1 if it gets merged. 
Please let me know what you think. Thanks!
Summary: test_cost_control_data_alert_mobile.py is failing when launching Browser app with JavascriptException: AbortError → Update tests to go to homescreen before launching an app
Attachment #8532532 - Flags: review?(zcampbell)
Attachment #8532532 - Flags: review?(florin.strugariu)
(In reply to Viorela Ioia [:viorela] from comment #8)
> I've investigated this and I was able to reproduce the failure locally, by
> running test_add_to_an_existing_contact_from_messages.py several times on
> latest v2.1.
> The test is failing when trying to launch Contacts app while on Messages. 
> But as a user, in order to launch an app I have to go to homescreen and then
> tap that app.
>  
> I propose to update this test by adding a touch on home button in order to
> get on homescreen, and then launch the app. 
> Also, I'll do the same change in test_add_to_new_contact_from_messages.py
> and test_cost_control_data_alert_mobile.py, where we also launch an app
> while on another app. 
> I'll open a PR with the changes on master, and uplift it to v2.1 if it gets
> merged. 
> Please let me know what you think. Thanks!

I'm not convinced that going to the homescreen is going to change the behaviour of the test.

If it does 'fix' the test, it's probably just adding 1 second of time to the test that's changing something.
Comment on attachment 8532532 [details] [review]
Github PR: https://github.com/mozilla-b2g/gaia/pull/26638

r-
Attachment #8532532 - Flags: review?(zcampbell) → review-
Comment on attachment 8532532 [details] [review]
Github PR: https://github.com/mozilla-b2g/gaia/pull/26638

Zac might be right here... Can you investigate some more this issue?
Attachment #8532532 - Flags: review?(florin.strugariu) → review-
QA Whiteboard: [fxosqa-auto-s5] → [fxosqa-auto-s5][fxosqa-auto-s6]
QA Whiteboard: [fxosqa-auto-s5][fxosqa-auto-s6] → [fxosqa-auto-from-s5][fxosqa-auto-s6]
Summary: Update tests to go to homescreen before launching an app → [v2.1] Tests are failing with JavascriptException: AbortError when launching an app
I'm not working on this issue anymore.
Assignee: viorela.ioia → nobody
QA Whiteboard: [fxosqa-auto-from-s5][fxosqa-auto-s6] → [fxosqa-auto-from-s5][fxosqa-auto-s6][fxosqa-auto-dropped-s6]
Attachment #8532532 - Attachment is obsolete: true
Attachment #8532532 - Flags: review-
Firefox OS is not being worked on
Status: REOPENED → RESOLVED
Closed: 5 years ago2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.