Closed Bug 1484607 Opened 6 years ago Closed 6 years ago

Mozregression is unable to install the application

Categories

(Testing :: mozregression, defect)

Version 2
x86_64
Windows 10
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bsurd, Unassigned)

References

Details

Attachments

(6 files)

Attached file debugger.txt (deleted) —
Created from Bug 1482843 Comment 7 Device: - Nexus 9 (Android 6.0.1) Mozregression is unable to install Fennec on the device giving an [INSTALL_FAILED_ALREADY_EXISTS] notice regardless of the fact that FF is or isn't installed on the device.
Flags: needinfo?(wlachance)
I'm a little stumped as to how this could be happen, the code in mozregression which does the install is quite straightforward. First we uninstall the app (looks like that succeeded from the log, since we don't see a warning), then perform the install: https://github.com/mozilla/mozregression/blob/368a1860a55b28e3ea74fb467007afb9e84e204e/mozregression/launchers.py#L351 :bc, have you seen anything like this before?
Flags: needinfo?(wlachance) → needinfo?(bob)
Maybe. I've seen all kinds of "reasons" that installations fail. I would do a adb shell pm list package org.mozilla and uninstall everything you find and see if that helps.
Flags: needinfo?(bob)
Thanks :bc. Bogdan, could you try what he suggests? Log the output of `adb shell pm list org.mozilla` while you're doing this, in case it helps us track down the root cause.
Flags: needinfo?(bogdan.surd)
Attached file log (deleted) —
I've uninstalled all packages related to org.mozilla and I am getting the same error. Currently doing a factory reset for the device and will be back with more information.
A full logcat from the session would be great.
Attached file logcat_firefox_installed.txt (deleted) —
After the factory reset, for the first run of mozregression I got the same error as in Bug 1482843 (Unable to start the application). Nightly does get installed but the app does not start. Re-running mozregression after that gives the [INSTALL_FAILED_ALREADY_EXISTS] error. This time on the other hand after uninstalling FF it returns to the "Unable to start the application" error.
Attached file logcat_not_firefox_installed.txt (deleted) —
Flags: needinfo?(bogdan.surd)
Initially I tried using a virtualenv to install mozregression via pip but ran into a bug which was recently fixed which causes a hang on my pixel2 when it tries to detect if the device is rooted. I then blew that away and then clone the github repo for mozregression, created a virtualenv for it, then used a recent mozilla-inbound to install mozbase as a development environment, then run the pip install requirements for mozregression. I was able to run mozregression with the phone running rooted and after one failed attempt was able to run mozregression after disabling rooting on the pixel2. Bogdan: Are you using the default mozregression+mozbase (adb*.py) stuff from just running pip? I think we might just need to update mozbase/mozdevice with the most recent changes and mozregression to require the new mozbase/mozdevice.
Flags: needinfo?(wlachance)
Flags: needinfo?(bogdan.surd)
(In reply to Bob Clary [:bc:] from comment #8) > > Bogdan: Are you using the default mozregression+mozbase (adb*.py) stuff from > just running pip? I think we might just need to update mozbase/mozdevice > with the most recent changes and mozregression to require the new > mozbase/mozdevice. The latest release of mozdevice (1.0.1) used by mozregression should match what's currently in mozilla-central, except for the last two commits: https://hg.mozilla.org/mozilla-central/log/tip/testing/mozbase/mozdevice/mozdevice/adb.py
Flags: needinfo?(wlachance)
Yes I am using everything that pip installed, after checking with pip I can confirm what William said, mozdevice is at 1.0.1. Checked with pip, these are the versions for all of the installed files related to mozregression: mozdevice 1.0.1 mozfile 1.2 mozinfo 0.10 mozInstall 1.16.0 mozlog 3.3 moznetwork 0.27 mozprocess 0.26 mozprofile 1.1.0 mozregression 2.3.31 mozrunner 7.0.1
Flags: needinfo?(bogdan.surd)
BogdanS: I would try to do this from source as I described in comment 8 and see if that will work for you. If so, then we just need to update the published versions of the requirements to match what is in github and hg. If it doesn't work, I'm not sure what the next step would be. We could try updating the version of android on your Nexus 9 if you are up to that and if the version isn't a requirement for your test though I'd rather try to figure out the problem since we should support Android 6. Ping me on irc and we can work through the details if you like. wlach: How can I run mozregression for x86 builds of fennec? I'd like to use the x86 emulator with mozregression but it seems like it only supports arm.
I have installed virtualenv and the virtualenv wrapper for windows. After that, I have created an env and installed mozregression using pip... It worked without any kind of issue. Running mozregression gave me the same error. I might be doing something wrong tho... pinged you on IRC (Slack). We cannot update the device since we need it to stay at Android 6 for testing purposes. Had a colleague of mine run mozregression on another Nexus 9 with Android 7.1.1, it gave him the same error and i've also encountered this issue on a Nexus 5 running Android 6.0.1.
Thanks for checking and on so many devices. Unfortunately I don't use the mozilla instance of slack but instead meant the stone tablets and bear skins version on irc.mozilla.org <https://wiki.mozilla.org/IRC>. My nick is bc. I didn't mean to use pip to install mozregression but to clone it from the git repository https://github.com/mozilla/mozregression and to install mozbase from a mozilla-central checkout. I'll be more specific. I'm using ~/projects here as an example. You can use whatever location you prefer. mkdir -p ~/projects cd ~/projects hg clone https://hg.mozilla.org/mozilla-central git clone https://github.com/mozilla/mozregression.git cd mozregression virtualenv venv . venv/bin/activate cd ~/projects/mozilla-central/mozilla/testing/mozbase/ python setup_development.py cd ~/projects/mozregression pip install -r requirements-dev.txt mozregression -n fennec --good 2018-08-22
Depends on: 1485852
Depends on: 1485854
Depends on: 1485855
Attached patch bug-1484607.patch (deleted) — Splinter Review
This takes advantage of the patches in the related and blocking bugs for adb*.py to set the require_root in the initializer so that the initialization of the class is aware if root will be required. At first I thought the problems Bogdan was having were related to his use of Windows, but with his help in investigating it turns out it was due to differences in how devices behaved and in the output they generated which did not match the expectations in adb*.py. I was able to reproduce the failures Bogdan saw using my samsung gs3 running lineageOS with root disabled. With the patches from the related and blocking bugs, I was able to successfully run mozregression on my unrooted and rooted gs3 as well as my unrooted and rooted pixel2. The samsung gs3 did hang occasionally during adb install but I believe this is related to the quality of the 'nightly' lineageOS 14.1-20171030 build I installed on it some time ago. wlach: Sorry this isn't a pull request but I didn't expect to be submitting patches and I didn't clone mozregression and pull from my clone. This is just easier in this particular case if you don't mind.
Attachment #9003668 - Flags: review?(wlachance)
Comment on attachment 9003668 [details] [diff] [review] bug-1484607.patch Review of attachment 9003668 [details] [diff] [review]: ----------------------------------------------------------------- LGTM, I will create a PR for this and merge later.
Attachment #9003668 - Flags: review?(wlachance) → review+
Bogdan: I think we have all the required patches landed in mozilla-central. If you can hg pull those patches into your local environment, apply this patch your local clone of mozregression and confirm that this works for you, I think we'll be ready to do a release. Ping me on irc when you are ready and I'll walk you through it. wlach: Once Bogdan confirms we are good to go, if you could do a new release of mozdevice and mozregression with this patch, I think we'll be done.
Flags: needinfo?(bogdan.surd)
(In reply to Bob Clary [:bc:] from comment #17) > wlach: Once Bogdan confirms we are good to go, if you could do a new release > of mozdevice and mozregression with this patch, I think we'll be done. Sounds good, could you do up the patch to bump the mozdevice version in the tree? Bug 1482898 shows an example of this. Since we're modifying/extending the API, we should probably do a minor version bump, so 1.1.0. If you do that I can handle the other pieces (tagging mozregression and making a new release, uploading mozdevice/mozregression to pypi) pretty easily.
Will do when we confirm we are good to go. Thanks.
Devices: - Nexus 5 (Android 6.0.1); - Nexus 9 (Android 6.0.1); - OnePlus 5T (Android 8.1.0); - Nokia 6 (Android 7.1.1); - Huawei MediaPad M2 (Android 5.1.1); - Google Pixel (Android 9). Hello, Tested the fix using a variety of devices with different Android versions to ensure that there were no other problems. Everything worked as expected without any other issues popping up. Thanks Bob for all the help!
Flags: needinfo?(bogdan.surd)
mozregression 2.3.32 released with the changes.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Attached file debuglog.txt (deleted) —
Tested this on 2 separate computers running Windows 10 and getting the same error as I did in Comment 0. @Bob do you know what might be the problem here?
Flags: needinfo?(bob)
https://pypi.org/project/mozdevice/#files does not contain the updated version of adb.py from what I can tell.
Flags: needinfo?(bob)
Flags: needinfo?(wlachance)
Argh, I'm terribly sorry, I uploaded a bad version of mozdevice to pypi. I've re-uploaded 1.1.1, since unfortunately pypi doesn't allow overwriting an existing version. This unfortunately doesn't correspond to any version in mozilla-central, but hopefully that won't be too big a deal. Since features have been landed since we tagged 1.1.0, it would make sense to bump mozdevice to 1.2.0 next release.
Flags: needinfo?(wlachance)
Released a new version of mozregression (2.3.33) which depends on 1.1.1 (which should have the fixes).
Retested, everything seems to work fine now with the new release and updated mozdevice. Marking this as verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: