Closed Bug 1549948 Opened 5 years ago Closed 5 years ago

Fenix jobs are failing with "activity class does not exist"

Categories

(Testing :: Raptor, defect, P1)

Version 3
defect

Tracking

(firefox68 fixed)

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: davehunt, Assigned: Bebe)

References

Details

Attachments

(1 file, 1 obsolete file)

Recent changes to Fenix has caused Raptor jobs to perma-fail with a timeout. Looking at the logs we see the following error:

Activity class {org.mozilla.fenix.raptor/org.mozilla.fenix.raptor.browser.BrowserPerformanceTestActivity} does not exist

This bug is for addressing the error itself, I will file another for detecting such errors and failing fast instead of timing out.

Failing jobs can be see here: https://treeherder.mozilla.org/#/jobs?repo=fenix&revision=447b134fe9a874d80b03febffd97f29cf64833f3&selectedJob=245208398

Priority: -- → P1
Assignee: nobody → mhentges

from my investigation looks like we are dealing with a broken build that does not have the BrowserPerformanceTestActivity

Because of this self.device.launch_activity errors out but does not raise a exception

I added a check to make sure the app is running after we run self.device.launch_activity

If the app is not started properly we raise a exception and stop the test run

This is caused by this change to address this issue.

As part of this change, the application ID of raptor Fenix changed from org.mozilla.fenix to org.mozilla.fenix.raptor.
So, the "launch identifier" to start BrowserPerformanceTestActivity, it changed from:

org.mozilla.fenix/org.mozilla.fenix.browser.BrowserPerformanceTestActivity
// to
org.mozilla.fenix.raptor/org.mozilla.fenix.browser.BrowserPerformanceTestActivity

Raptor creates the "launch identifier", but is erroneously using this, instead:

org.mozilla.fenix.raptor/org.mozilla.fenix.raptor.browser.BrowserPerformanceTestActivity

I'm guessing (?) that Raptor uses --binary (from test-linux.sh) to define the application ID, and uses --binary-path + --activity (from raptor.yml) to define the path to the activity?

$(--binary)/$(--binary-path).$(--activity)

If we can confirm this, then a patch to mozilla-central to change --binary-path from org.mozilla.fenix.raptor to org.mozilla.fenix should fix this.
If this isn't the case, and it's more involved, then I'll manually reduce the amount of raptor jobs created for Fenix until this is resolved

Flags: needinfo?(rwood)

Comment on attachment 9063458 [details]
Bug 1549948 Fenix jobs are failing with "activity class does not exist"

Revision D30343 was moved to bug 1549949. Setting attachment 9063458 [details] to obsolete.

Attachment #9063458 - Attachment is obsolete: true

Tested suggestions in comment 3 and :mhentges is right.
We use binary_path and the activity to start the app.

And mozdevice to manage all the adb commands. https://searchfox.org/mozilla-central/source/testing/mozbase/mozdevice/mozdevice/adb.py#3094

the definition of launch_activity is:

 def launch_activity(self, app_name, activity_name=None,
                        intent="android.intent.action.MAIN",
                        moz_env=None, extra_args=None, url=None, e10s=False,
                        wait=True, fail_if_running=True, timeout=None):

and inside it it runs self.launch_application with activity_name = "%s.%s" % (app_name, activity_name)

As we have 3 different variables this commands won't work for us:
Our app identifier is composed of {app name}/{activity path}.{activity_name}.

Usually {app name} and {activity path} are the same but in this case is different.
app_name = org.mozilla.fenix.raptor
activity_path = org.mozilla.fenix.browser
activity_name = BrowserPerformanceTestActivity

To make a fix we have to update mozdevice to accept this syntax
or
Hack raptor to generate the correct command for fenix and run it with launch_application

:bc would this be acceptable in mozdevice?

Flags: needinfo?(bob)

Note that reference-browser is going to be updated to have the same pattern (application ID of org.mozilla.reference.browser.raptor, while the test activity will still be at org.mozilla.reference.browser.BrowserTestActivity).
Therefore, I'm leaning towards having raptor + mozdevice accept the new syntax. I'm guessing that this will change the options of mozharness from:

--binary=org.mozilla.fenix
--activity=BrowserPerformanceTestActivity

to

--binary=org.mozilla.fenix.raptor
--activity=org.mozilla.fenix.browser.BrowserPerformanceTestActivity

Thanks all!

Assignee: mhentges → fstrugariu
Flags: needinfo?(rwood)
Status: NEW → ASSIGNED

Bebe: You seemed to have settled on passing the full activity class name which seems the most reasonable choice.

The other issue is that am start has a zero return code even if the Intent doesn't start

Starting: Intent { act=android.intent.action.VIEW dat=about:blank cmp=org.mozilla.fenix.raptor/.browser.BrowserPerformanceTestActivity (has extras) }
Error type 3
Error: Activity class {org.mozilla.fenix.raptor/org.mozilla.fenix.raptor.browser.BrowserPerformanceTestActivity} does not exist.
adb_returncode=0

Since adb.py uses the return code to determine if ADBError is to be raised, we don't see an exception. It might be worth while to file a follow up bug and add some error checking logic for the output of self.shell_output(cmd, timeout=timeout) in launch_application which would raise an ADBError if the Intent does not start properly.

Flags: needinfo?(bob)

already on it: bug 1549992

Blocks: 1547245
Pushed by fstrugariu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0867f9a289a7
Fenix jobs are failing with "activity class does not exist" r=rwood
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: