./mach install for android emulator fails with no useful information

RESOLVED FIXED in Firefox 52

Status

()

Core
mach
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: kats, Assigned: kats)

Tracking

Trunk
mozilla52
Points:
---

Firefox Tracking Flags

(firefox52 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

I pulled latest m-c on my Linux machine, did a fennec build and tried to mach install. Here's what happened:

kats@kgupta-pc mozilla-fennec$ mach install
No Android devices connected. Start an emulator? (Y/n) y
Starting emulator running Android 4.3...
WARNING: Emulator has already completed!
 0:13.23 /usr/bin/make -C . -j9 -s -w install
 0:13.26 make: Entering directory `/home/kats/zspace/mozilla-fennec/obj-android-ndebug'
 0:13.26 No devices are connected.  Connect a device or start an emulator.
 0:13.26 make: *** [install] Error 1
 0:13.26 make: Leaving directory `/home/kats/zspace/mozilla-fennec/obj-android-ndebug'


I'd wrote a patch to add --verbose option to mach install which provides more useful information.
Comment hidden (mozreview-request)
With this patch I get actual useful information:


kats@kgupta-pc mozilla-fennec$ mach install --verbose
DEBUG: adb found at /home/kats/android/sdk/platform-tools/adb
DEBUG: Emulator created with type 4.3
DEBUG: emulator found at /home/kats/android/sdk/tools/emulator
No Android devices connected. Start an emulator? (Y/n) y
DEBUG: AVD found at /home/kats/.mozbuild/android-device/avd/mozemulator-4.3.avd
Starting emulator running Android 4.3...
DEBUG: deleted /home/kats/.emulator_console_auth_token
DEBUG: Starting the emulator with this command: /home/kats/android/sdk/tools/emulator -avd mozemulator-4.3 -port 5554 -gpu swiftshader -show-kernel -debug init,console,gles,memcheck,adbserver,adbclient,adb,avd_config,socket
DEBUG: Emulator output will be written to '/home/kats/.mozbuild/android-device/emulator.log'
DEBUG: Emulator started with pid 3893
DEBUG: Waiting for device status...
WARNING: Emulator has already completed!
 0:13.67 /usr/bin/make -C . -j9 -s -w install
 0:13.70 make: Entering directory `/home/kats/zspace/mozilla-fennec/obj-android-ndebug'
 0:13.70 No devices are connected.  Connect a device or start an emulator.
 0:13.70 make: *** [install] Error 1
 0:13.70 make: Leaving directory `/home/kats/zspace/mozilla-fennec/obj-android-ndebug'
kats@kgupta-pc mozilla-fennec$ cat ~/.mozbuild/android-device/emulator.log
<ERROR: Invalid GPU mode 'swiftshader', use one of: on off host guest mesa>

Comment 3

a year ago
mozreview-review
Comment on attachment 8801112 [details]
Bug 1310215 - Add a verbose argument to mach install which provides useful information in case the android emulator startup fails.

https://reviewboard.mozilla.org/r/85906/#review84540

Lgtm.

::: python/mozbuild/mozbuild/mach_commands.py:1080
(Diff revision 1)
>      """Install a package."""
>  
>      @Command('install', category='post-build',
>          description='Install the package on the machine, or on a device.')
> -    def install(self):
> +    @CommandArgument('--verbose', '-v', action='store_true',
> +        help='Print verbose output.')

Maybe add a note it only works with Android
Attachment #8801112 - Flags: review?(ahalberstadt) → review+
(In reply to Andrew Halberstadt [:ahal] from comment #3)
> Maybe add a note it only works with Android

Will do, thanks!

Comment 5

a year ago
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7c619ac6752f
Add a verbose argument to mach install which provides useful information in case the android emulator startup fails. r=ahal
btw, you can use -gpu swiftshader with more recent versions of the emulator. I thought everyone would be using the almost-latest sdk.

Comment 7

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7c619ac6752f
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox52: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.