mozregression doesn't work on Kindle Fire HD8
Categories
(Testing :: Mozbase, defect)
Tracking
(Not tracked)
People
(Reporter: kats, Assigned: kats)
References
Details
(Whiteboard: [leave-open])
Attachments
(1 file)
I was trying to use mozregression with the GVE app (-n gve) on a Kindle Fire HD8 device, but it doesn't work. The reason seems to be that mozdevice successfully creates a profile at /storage/sdcard0/tests/whatever.mozrunner but then the app can't actually read that profile.
mozdevice code that picks this path: https://searchfox.org/mozilla-central/rev/b2d35912da5b2acecb0274eb113777d344ffb75e/testing/mozbase/mozdevice/mozdevice/adb.py#992
GVE code that fails at reading the path: https://searchfox.org/mozilla-central/rev/b2d35912da5b2acecb0274eb113777d344ffb75e/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoProfile.java#195 (I see the warning printed there in the logcat)
and then the GVE code that crashes shortly after: https://searchfox.org/mozilla-central/rev/b2d35912da5b2acecb0274eb113777d344ffb75e/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoProfile.java#353
Other devices I've tried don't have this problem, for two reasons. One is that the app can actually read from the dir. And second, even if I run via am start manually and give it a profile dir in /storage/sdcard0/tests that doesn't actually exist, the app can create the dir and proceed with initializing a fresh profile. This also fails on the HD8.
I'm not sure if this is fixable but it would be nice if mozdevice somehow detected that the /storage/sdcard0/tests path is not readable by the app on this device and tried a different one that might work better. On the HD8, for example using /sdcard/tests works fine.
| Assignee | ||
Comment 1•6 years ago
|
||
Looks like the ordering of paths here comes from FxOS requirements way back in bug 999506 comment 8 so it might not be trivial to change.
Comment 2•6 years ago
|
||
:bc do you have any ideas? mozregression is currently pinned to mozdevice 2.0 but it doesn't appear that anything has landed since that release that would change the behaviour here.
Comment 3•6 years ago
|
||
mid-aired...
What is the warning printed in logcat? kats: Can you go ahead and attach the logcat or point to a log / logcat somewhere?
| Assignee | ||
Comment 4•6 years ago
|
||
The logcat isn't very interesting. Here's the relevant section of logcat from the HD8:
03-07 14:55:03.963 E/GeckoLibLoad(17074): Loaded libs in 33.429385ms total, 20ms(40ms) user, 0ms(10ms) system, 0(0) faults
03-07 14:55:03.963 D/GeckoThread(17074): State changed to LIBS_READY
03-07 14:55:03.963 W/GeckoThread(17074): zerdatime 881630491 - runGecko
03-07 14:55:03.970 W/GeckoProfile(17074): requested profile directory missing: /storage/sdcard0/tests/tmpDZ4A6x.mozrunner
--------- beginning of crash
03-07 14:55:03.972 E/AndroidRuntime(17074): FATAL EXCEPTION: Gecko
03-07 14:55:03.972 E/AndroidRuntime(17074): Process: org.mozilla.geckoview_example, PID: 17074
03-07 14:55:03.972 E/AndroidRuntime(17074): java.lang.IllegalArgumentException: Profile directory must exist if specified: /storage/sdcard0/tests/tmpDZ4A6x.mozrunner
03-07 14:55:03.972 E/AndroidRuntime(17074): at org.mozilla.gecko.GeckoProfile.<init>(GeckoProfile.java:354)
03-07 14:55:03.972 E/AndroidRuntime(17074): at org.mozilla.gecko.GeckoProfile.get(GeckoProfile.java:245)
03-07 14:55:03.972 E/AndroidRuntime(17074): at org.mozilla.gecko.GeckoProfile.get(GeckoProfile.java:199)
03-07 14:55:03.972 E/AndroidRuntime(17074): at org.mozilla.gecko.GeckoProfile.initFromArgs(GeckoProfile.java:163)
03-07 14:55:03.972 E/AndroidRuntime(17074): at org.mozilla.gecko.GeckoThread.getProfile(GeckoThread.java:349)
03-07 14:55:03.972 E/AndroidRuntime(17074): at org.mozilla.gecko.GeckoThread.getMainProcessArgs(GeckoThread.java:301)
03-07 14:55:03.972 E/AndroidRuntime(17074): at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:449)
And the equivalent section of logcat from a Nexus 4 (where things work):
03-07 14:53:13.488 W/GeckoThread( 6884): zerdatime 579606 - runGecko
03-07 14:53:13.501 W/GeckoProfile( 6884): requested profile directory missing: /storage/sdcard0/tests/tmpDZ4A6x.mozrunner
03-07 14:53:13.508 I/GeckoProfile( 6884): Enqueuing profile init.
03-07 14:53:13.541 I/ActivityManager( 560): Start proc 6912:org.mozilla.geckoview_example:tab/u0a91 for service org.mozilla.geckoview_example/org.mozilla.gecko.process.GeckoServiceChildProcess$tab
| Assignee | ||
Comment 5•6 years ago
|
||
Reading through bug 999506 (in particular dhylands' comment here) it sounds like /storage/sdcard0 and /storage/sdcard1 are specific to FxOS devices that are not really used anymore. So maybe it's ok to rearrange this list ordering now.
I tried using vdc volume list on the HD8 but there's no vdc command. So I'm not sure how easy this would be to determine dynamically.
Another option is to add a command-line argument to mozregression that forces mozdevice to use a particular root. Which is probably good to do anyway since there's no guarantee that one particular list of hard-coded paths will work for all devices.
Comment 6•6 years ago
|
||
Why is it trying to use a non-existent directory for the profile. Did we just rely on Gecko creating it for us in the past? Could we just make sure to create it first before attempting to use it?
| Assignee | ||
Comment 7•6 years ago
|
||
The directory exists. I verified by adb shell-ing into the device and checking for it. GVE just can't read it for whatever reason. See comment 0.
Comment 8•6 years ago
•
|
||
Can you tell me what ls -la says for the directory?
| Assignee | ||
Comment 9•6 years ago
•
|
||
karnak:/storage/sdcard0/tests $ ls -al
total 32
drwxrwx--x 4 root sdcard_rw 4096 2019-03-08 06:28 .
drwxrwx--x 17 root sdcard_rw 4096 2019-03-07 15:11 ..
drwxrwx--x 2 root sdcard_rw 4096 2019-03-08 06:28 dummy
drwxrwx--x 2 root sdcard_rw 4096 2019-03-08 06:28 tmpItsvAu.mozrunner
karnak:/storage/sdcard0/tests/tmpItsvAu.mozrunner $ ls -al
total 24
drwxrwx--x 2 root sdcard_rw 4096 2019-03-08 06:28 .
drwxrwx--x 4 root sdcard_rw 4096 2019-03-08 06:28 ..
-rw-rw---- 1 root sdcard_rw 0 2019-03-08 06:28 prefs.js
-rw-rw---- 1 root sdcard_rw 819 2019-03-08 06:28 user.js
| Assignee | ||
Comment 10•6 years ago
|
||
I put a patch at https://github.com/mozilla/mozregression/pull/515 that works around the issue for me, I can specify --adb-profile-path=/sdcard/tests and that works (at least GVE doesn't crash on startup).
Comment 11•6 years ago
|
||
gbrown: Do you think we could try to just remove '/storage/sdcard0/tests', '/storage/sdcard1/tests' from the list of possible test roots?
Comment 12•6 years ago
|
||
(In reply to Bob Clary [:bc:] from comment #11)
gbrown: Do you think we could try to just remove '/storage/sdcard0/tests', '/storage/sdcard1/tests' from the list of possible test roots?
I think that might be fine. Those directories do not exist in the emulator images we use.
| Assignee | ||
Comment 13•6 years ago
|
||
Updated•6 years ago
|
Comment 14•6 years ago
|
||
Comment on attachment 9049942 [details]
Bug 1533517 - [mozdevice] Remove FirefoxOS candidate test root paths. r?bc
r+. Already marked in phabricator. Once this lands and merges we can deploy to pypi.
Comment 15•6 years ago
|
||
leave open for the pypi update and the associated changes to mozregression.
Updated•6 years ago
|
| Assignee | ||
Comment 16•6 years ago
|
||
Pulsebot appears to be offline
https://hg.mozilla.org/integration/autoland/rev/1aa0df07fbdd
Comment 17•6 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 18•6 years ago
|
||
Bob, do you have permissions to push the updated version to pypi?
Comment 19•6 years ago
|
||
kats: yes, I'll get to it later today.
Comment 21•6 years ago
|
||
Bumped internal dependency in mozregression: https://github.com/mozilla/mozregression/commit/45b0de32e21f6d4b5d1ee70d6ac2c1dcc5a69987
I will do a new release next week
| Assignee | ||
Comment 22•6 years ago
|
||
Thanks!
| Assignee | ||
Updated•6 years ago
|
Description
•