Closed Bug 980814 Opened 11 years ago Closed 11 years ago

Fix test_system_message.py, JavaScript Error: "NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE)

Categories

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

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: askeing, Assigned: hchang)

References

Details

(Whiteboard: [xfail])

Attachments

(1 file, 1 obsolete file)

Buri Gaia 98cf46d6623b164845fe1fdc99a2a7bf64aa667d Gecko https://hg.mozilla.org/mozilla-central/rev/8095b7dd8f58 BuildID 20140306160203 Version 30.0a1 ro.build.version.incremental=eng.archermind.20131114.105818 ro.build.date=Thu Nov 14 10:58:33 CST 2013 Traceback (most recent call last): File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette_test.py", line 163, in run testMethod() File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/gaiatest/tests/functional/system/test_system_message.py", line 30, in test_app_launched_by_system_message self.on_app_launched() File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/gaiatest/tests/functional/system/test_system_message.py", line 44, in on_app_launched """ % (self._testing_system_message, self._testing_message_id)) File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette.py", line 1114, in execute_script filename=os.path.basename(frame[0])) File "/var/lib/jenkins/jobs/B2G.master.pvt.hamachi.gaiatest/workspace/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette.py", line 604, in _send_message "Connection timed out", status=ErrorCodes.TIMEOUT) TimeoutException: TimeoutException: Connection timed out Most recent errors/exceptions are: 03-07 16:04:52.430 E/GeckoConsole(32577): [JavaScript Error: "NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIMessageSender.sendAsyncMessage]" {file: "chrome://global/content/BrowserElementChildPreload.js" line: 41}] 03-07 16:04:53.740 E/GeckoConsole(32614): Content JS ERROR at app://homescreen.gaiamobile.org/gaia_build_defer_index.js:400 in loadSVConfFileError: Failed parsing singleVariant configuration file [js/singlevariantconf.json]: [Exception... "File error: Not found" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: app://homescreen.gaiamobile.org/gaia_build_defer_index.js :: loadFile :: line 392" data: no] 03-07 16:04:55.759 I/Gecko (32528): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv 03-07 16:04:55.759 I/Gecko (32528): ############ ErrorPage.js 03-07 16:04:57.549 E/GeckoConsole(32614): Content JS ERROR at app://homescreen.gaiamobile.org/gaia_build_defer_index.js:61 in retrieve: Got an exception when trying to load icon "app://music2.gaiamobile.org/style/icons/60/Music.png +" falling back to cached icon. Exception is: The B2G process has restarted after crashing during the tests so Marionette can't respond due to either a Gecko, Gaia or Marionette error. Above, the 5 most recent errors are listed. Check logcat for all errors if these errors are not the cause of the failure.
I think this is the app actually crashing, it's not something we can fix.
This can be replicated about 1 in 5 on device. The app seems to crash after it is launched.
I can replicate this locally every time and it's also reproducible on Jenkins, we should Xfail for now.
Raise a bug too AndreiH
Depends on: 986426
Attachment #8394729 - Flags: review?(zcampbell)
Henry, you wrote this and now it is failing, can you help us debug it?
Flags: needinfo?(hchang)
Comment on attachment 8394729 [details] [review] PR https://github.com/mozilla-b2g/gaia/pull/17441 It's fine but I'll probably change the bug number to 980814 before I commit it.
Attachment #8394729 - Flags: review?(zcampbell)
Attachment #8394729 - Attachment is obsolete: true
(In reply to Zac C (:zac) from comment #7) > Henry, you wrote this and now it is failing, can you help us debug it? Sure I am taking a look at it. Thanks!
Flags: needinfo?(hchang)
(In reply to [:AndreiH] from comment #3) > I can replicate this locally every time and it's also reproducible on > Jenkins, we should Xfail for now. Hi AndreiH, may I know how you replicate this bug? I tested on device and ran the test with the following command with no failure: gaiatest --repeat=50 --address=localhost:2828 --testvars=gaiatest/testvars_template.json gaiatest/tests/functional/system/test_system_message.py Does it only happen to full gaia-ui-test? Thanks.
Flags: needinfo?(andrei.hutusoru)
This is still replicated locally, just running "test_system_message.py". Most recent errors/exceptions are: 03-26 15:38:34.249 E/GeckoConsole( 729): [JavaScript Error: "NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIMessageSender.sendAsyncMessage]" {file: "chrome://global/content/BrowserElementChildPreload.js" line: 41}] 03-26 15:38:35.199 E/GeckoConsole( 777): Content JS ERROR at app://homescreen.gaiamobile.org/gaia_build_defer_index.js:398 in loadSVConfFileError: Failed parsing singleVariant configuration file [js/singlevariantconf.json]: [Exception... "File error: Not found" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: app://homescreen.gaiamobile.org/gaia_build_defer_index.js :: loadFile :: line 390" data: no] 03-26 15:38:38.289 E/GeckoConsole( 777): Content JS ERROR at app://homescreen.gaiamobile.org/gaia_build_defer_index.js:61 in retrieve: Got an exception when trying to load icon "app://music2.gaiamobile.org/style/icons/60/Music.png +" falling back to cached icon. Exception is: 03-26 15:38:40.909 I/Gecko ( 672): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv 03-26 15:38:40.919 I/Gecko ( 672): ############ ErrorPage.js I tested this on Hamachi device, build: Gaia 80af23f8c74d9d2e9388d8ed3c204040b5c528ec Gecko https://hg.mozilla.org/mozilla-central/rev/c69c55582faa BuildID 20140326040202 Version 31.0a1
Flags: needinfo?(andrei.hutusoru)
Henry I can see what is causing this to fail. When running the test my command has also: "--restart" and this is causing the fail. Without it the test run perfectly. When restarted the app seem to not launch properly.
Whiteboard: [xfail]
(In reply to [:AndreiH] from comment #13) > Henry I can see what is causing this to fail. > When running the test my command has also: "--restart" and this is causing > the fail. > Without it the test run perfectly. When restarted the app seem to not launch > properly. I can reproduce with "--restart" option. It seems we manipulate the app too soon. Adding one second delay helps fix the test failure. I just created a PR and am still looking for solutions other than adding delay. Maybe we should use certain function to wait until an app is completely loaded. https://github.com/mozilla-b2g/gaia/pull/17688
Henry's PR
Attachment #8397757 - Flags: review?(zcampbell)
Attachment #8397757 - Flags: review?(florin.strugariu)
The tests is currently disabled, we should also remove that atributte.
Attachment #8397757 - Flags: review?(florin.strugariu) → review+
Comment on attachment 8397757 [details] [review] PR https://github.com/mozilla-b2g/gaia/pull/17688 > Maybe we should use certain function to wait until an app is completely loaded. You answered your own review there :D Let's fix it properly the first time.
Attachment #8397757 - Flags: review?(zcampbell) → review-
(In reply to Zac C (:zac) from comment #18) > Comment on attachment 8397757 [details] [review] > PR https://github.com/mozilla-b2g/gaia/pull/17688 > > > Maybe we should use certain function to wait until an app is completely loaded. > > You answered your own review there :D > > Let's fix it properly the first time. Zac, I am still in search of that kind of function but do you know any? I see other tests also using "sleep(1)" trick to improve the stability so I am wondering if it's the only way so far. https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/tests/functional/system/test_edge_gestures.py#L23
(In reply to Henry Chang [:henry] from comment #19) > > Zac, > > I am still in search of that kind of function but do you know any? > I see other tests also using "sleep(1)" trick to improve the stability > so I am wondering if it's the only way so far. > What other solutions have you tried? You can use a sleep only if you convince me that there is no other reasonable option. Perhaps there is a js variable that states when the app is fully initialised and ready? Or when the URL has changed to not about:blank?
(In reply to Zac C (:zac) from comment #20) > (In reply to Henry Chang [:henry] from comment #19) > > > > Zac, > > > > I am still in search of that kind of function but do you know any? > > I see other tests also using "sleep(1)" trick to improve the stability > > so I am wondering if it's the only way so far. > > > > What other solutions have you tried? You can use a sleep only if you > convince me that there is no other reasonable option. > > Perhaps there is a js variable that states when the app is fully initialised > and ready? Or when the URL has changed to not about:blank? https://github.com/mozilla-b2g/gaia/pull/17688/files#diff-d78e02ac2aeb0abb0390c016a0f02becR32 Using "self.wait_for_element_present(By.ID, 'test-container')" instead of adding delay to make sure the app is completely loaded. It works locally.
(In reply to Henry Chang [:henry] from comment #21) > (In reply to Zac C (:zac) from comment #20) > > (In reply to Henry Chang [:henry] from comment #19) > > > > > > Zac, > > > > > > I am still in search of that kind of function but do you know any? > > > I see other tests also using "sleep(1)" trick to improve the stability > > > so I am wondering if it's the only way so far. > > > > > > > What other solutions have you tried? You can use a sleep only if you > > convince me that there is no other reasonable option. > > > > Perhaps there is a js variable that states when the app is fully initialised > > and ready? Or when the URL has changed to not about:blank? > > https://github.com/mozilla-b2g/gaia/pull/17688/files#diff- > d78e02ac2aeb0abb0390c016a0f02becR32 > > Using "self.wait_for_element_present(By.ID, 'test-container')" instead of > adding delay to make sure the app is completely loaded. It works locally. https://travis-ci.org/mozilla-b2g/gaia/jobs/22170661#L2417 Pass on travis Ci.
Attachment #8397757 - Flags: review?(zcampbell)
Attachment #8397757 - Flags: review?(florin.strugariu)
Attachment #8397757 - Flags: review-
Attachment #8397757 - Flags: review+
Attachment #8397757 - Flags: review?(florin.strugariu) → review+
Comment on attachment 8397757 [details] [review] PR https://github.com/mozilla-b2g/gaia/pull/17688 r- and wiping Bebe's review. Move the line into the launch() method of the app object.
Attachment #8397757 - Flags: review?(zcampbell)
Attachment #8397757 - Flags: review-
Attachment #8397757 - Flags: review+
Assignee: nobody → hchang
Attachment #8397757 - Flags: review- → review?(zcampbell)
That looks perfect Henry! Much cleaner and it is relevant whenever Test Container is launched (eg for future test cases).
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: