Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong activity being started for Fenix #2206

Open
palant opened this issue Mar 18, 2021 · 3 comments
Open

Wrong activity being started for Fenix #2206

palant opened this issue Mar 18, 2021 · 3 comments

Comments

@palant
Copy link

palant commented Mar 18, 2021

Is this a feature request or a bug?

Bug

What is the current behavior?

The following command fails:

web-ext run --target=firefox-android --android-device=id

Error message:

Error: Activity class {org.mozilla.fenix.debug/org.mozilla.fenix.App} does not exist.

This works correctly with an explicit --firefox-apk-component '.HomeActivity' parameter.

What is the expected or desired behavior?

This should launch Fenix using the correct activity class.

Version information (for bug reports)

  • Firefox version: 88.0 (built from source)
  • Your OS and version: Android 11
  • Paste the output of these commands:
node --version && npm --version && web-ext --version

v15.11.0
7.6.0
6.0.0

@palant
Copy link
Author

palant commented Mar 18, 2021

Actually, an explicit --firefox-apk-component org.mozilla.fenix.debug.App works as well. This only fails when Fenix is compiled from source, not with the official Nightly.

@Rob--W
Copy link
Member

Rob--W commented Mar 18, 2021

@jonalmeida The current logic for determining the "APK component" (activity identifier) is based on the discussion starting from your comment at #1871 (comment) :

What it's sending: org.mozilla.reference.browser.debug/org.mozilla.reference.browser.debug.BrowserActivity
What it should be sending: org.mozilla.reference.browser.debug/org.mozilla.reference.browser.BrowserActivity

The logic was implemented at #1941

In this bug report, it is apparent that org.mozilla.fenix.debug.App should be used instead of org.mozilla.fenix.App, which is in contradiction with the previously described logic.

I guess that we can avoid prepending a fixed package identifier when .App is used, i.e. changing the condition from if (apkComponent.startsWith('.')) { to if (apkComponent !== ".App" && apkComponent.startsWith('.')) { at https://github.com/mozilla/web-ext/blame/ac207c6fdca5c806949adcaa7c54105ce278f606/src/util/adb.js#L328

@jonalmeida What do you suggest to resolve this bug? Does my suggestion make sense?

@jonalmeida
Copy link
Contributor

Maybe there is some inconsistency within the two mobile apps, there were some variant changes that could have affected this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants