Closed Bug 1097492 Opened 5 years ago Closed 2 years ago

Failed running gaia-ui-test on device

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ting, Unassigned)

Details

Attachments

(1 file)

Device: Flame (v188)
Version: 2.2
Gecko: 1e0235c7b7f910135090e4f72f9f30ae74c12162
Gaia: 6af3a8a833eb8bb651e8b188cb3f3c3a43bb4184
Command: $ gaiatest --address=localhost:2828 --testvars=gaiatest/testvars.json --restart gaiatest/tests/functional/lockscreen/test_lockscreen_unlock_to_homescreen_with_passcode.py

After restart, homescreen is not launched and there're only three processes from b2g-ps: b2g, nuwa, and preallocated. From logcat can see repeated log:

I/Gecko   ( 2165): 1415771778151	Marionette	DEBUG	Got request: findElement, data: {"to":"0","sessionId":{"rotatable":true,"browserVersion":"36.0a1","takesScreenshot":true,"appBuildId":"20141112131224","XULappId":"{3c2e2abc-06d4-11e1-ac3b-374f68613e61}","secureSsl":false,"platform":"ANDROID","browserName":"B2G","version":"36.0a1","device":"flame","b2g":true,"nativeEvents":false,"platformVersion":"36.0a1","takesElementScreenshot":true,"platformName":"ANDROID","handlesAlerts":false},"name":"findElement","parameters":{"using":"css selector","value":"#homescreen[loading-state=false]"}}, id: null
I/Gecko   ( 2165): 1415771778168	Marionette	INFO	sendToClient: {"from":"0","error":{"message":"Unable to locate element: #homescreen[loading-state=false]","status":7,"stacktrace":null}}, {ab8148e9-43ee-4eb3-8395-61d8e22861cc}, {ab8148e9-43ee-4eb3-8395-61d8e22861cc}

There's another noticeable log:

I/Gecko   ( 2165): !! Creating a dummy channel for system.gaiamobile.org (no appInfo)

Note after this |adb reboot| can not boot the device successfully.
How are you flashing the device? Our automation hasn't seen this issue, so I suspect you're doing something different. Is this from a local build or releng build?
Flags: needinfo?(tchou)
It is a local build and I used |./flash.sh| to flash the device.
Flags: needinfo?(tchou)
Can you try with a releng build? Otherwise I suspect there is either something wrong with your local build, or the test harness is perhaps corrupting or deleting the profile. Can you run with --log-mach=mach.log and --log-mach-level=debug and attach the generated log file?
Flags: needinfo?(tchou)
I see, will do that tomorrow since I didn't bring the device home.
Attached file mach.log
Using PVT build (flame-kk/eng/shallow) 20141112160206 is OK. I attached the log you asked from local build, note the local build is without any modification.
Flags: needinfo?(tchou)
There's one thing I noticed that B2G-flash-tool/shallow_flash.sh push to /system/b2g/webapps, but B2G/flash.sh push to /data/local/webapps, and gaia/tests/python/gaia-ui-tests/gaiatest/gaia_test.py removes /data/local/webapps in cleanup_data() when restart.
Yeah, that's what I was going to be looking for in the logs, but you found it first! :) Needinfo'ing Zac as he added the removal of /data/local/webapps in https://github.com/mozilla-b2g/gaia/commit/787506b4f17c36f1edd87f91ebad4f218e8f7bf5
Flags: needinfo?(zcampbell)
I tried to use pdb, step by step and b2g can't launch normally right after removing

self.device.file_manager.remove('/data/local/OfflineCache')
self.device.file_manager.remove('/data/local/permissions.sqlite')

But they landed quite long ago.
STR:
1. flash device with "flash gaia"
2. run gaiatest with --restart (will run clean_data())

EXPECT: Test case can run correctly
ACTUAL: When device restarted, screen kept black and not responding.  Log is attached in description.
(In reply to Ting-Yu Chou [:ting] from comment #6)
> There's one thing I noticed that B2G-flash-tool/shallow_flash.sh push to
> /system/b2g/webapps, but B2G/flash.sh push to /data/local/webapps, and
> gaia/tests/python/gaia-ui-tests/gaiatest/gaia_test.py removes
> /data/local/webapps in cleanup_data() when restart.

Which path to webapps is correct?

We don't see any issues with this code on CI so we won't change it, but if the flash scripts are normalised to one correct version then we would update gaiatest to match it of course!
Flags: needinfo?(zcampbell)
(In reply to Zac C (:zac) from comment #10)
> (In reply to Ting-Yu Chou [:ting] from comment #6)
> > There's one thing I noticed that B2G-flash-tool/shallow_flash.sh push to
> > /system/b2g/webapps, but B2G/flash.sh push to /data/local/webapps, and
> > gaia/tests/python/gaia-ui-tests/gaiatest/gaia_test.py removes
> > /data/local/webapps in cleanup_data() when restart.
> 
> Which path to webapps is correct?

If I recall correctly both are valid locations, though it might depend on the type of build you're generating (prod, user debug, eng, etc).
(In reply to Dave Hunt (:davehunt) from comment #11)
> (In reply to Zac C (:zac) from comment #10)
> > (In reply to Ting-Yu Chou [:ting] from comment #6)
> > > There's one thing I noticed that B2G-flash-tool/shallow_flash.sh push to
> > > /system/b2g/webapps, but B2G/flash.sh push to /data/local/webapps, and
> > > gaia/tests/python/gaia-ui-tests/gaiatest/gaia_test.py removes
> > > /data/local/webapps in cleanup_data() when restart.
> > 
> > Which path to webapps is correct?
> 
> If I recall correctly both are valid locations, though it might depend on
> the type of build you're generating (prod, user debug, eng, etc).

Bother and we don't necessarily know which type build we are testing against at this test level.. 

I guess we could change this method to have logic - only delete it if the folder exists and/or has content.
QA Whiteboard: [fxosqa-auto-backlog-]
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.