web-ext: Cannot load extensions on android build variants
This is a follow-up from this PR where we learnt that build variants aren’t supposed: https://github.com/mozilla/web-ext/pull/1871#issuecomment-605400070
Is this a feature request or a bug?
Bug
What is the current behavior?
- Install a local
debugbuild of Reference Browser; affects Fenix too. - Run the following command:
web-ext run -t firefox-android --android-device=<device ID here> --firefox-apk=org.mozilla.reference.browser.debug --firefox-apk-component=BrowserActivity
- Observe.
What is the expected or desired behavior?
You should be able to install your web extension.
What is the actual behaviour?
You see the following output in your terminal:
Error: Activity class {org.mozilla.reference.browser.debug/org.mozilla.reference.browser.debug.BrowserActivity} does not exist.
at /Users/jalmeida/src/web-ext/node_modules/adbkit/lib/adb/command/host-transport/startactivity.js:57:21
at tryCatcher (/Users/jalmeida/src/web-ext/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/Users/jalmeida/src/web-ext/node_modules/bluebird/js/main/promise.js:503:31)
at Promise._settlePromiseAt (/Users/jalmeida/src/web-ext/node_modules/bluebird/js/main/promise.js:577:18)
at Async._drainQueue (/Users/jalmeida/src/web-ext/node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (/Users/jalmeida/src/web-ext/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/jalmeida/src/web-ext/node_modules/bluebird/js/main/async.js:15:14)
Version information (for bug reports)
- Firefox version: Desktop: 77.0a1 (2020-04-21) (64-bit), Android: GV 77.0.20200422093542
- Your OS and version: Mac OS 10.15.4 (19E287) / Android 10
- Paste the output of these commands:
node --version && npm --version && web-ext --version
v13.11.0 6.13.7 4.1.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (19 by maintainers)
You can only have one activity with the main action since it’s the entry point for an app from the launcher. We keep it on the
.Appalias (which points to theBrowserActivity) for legacy reasons to avoid breaking older builds.@MikeM711 What would be the advantage of your proposal, over the following logic:
apkComponenthas a., use${apk}/${apkComponent}${apk}/.${apkComponent}${apk}/.AppThis would solve the issue here, without requiring a hard-coded list of values. Usage example:
You shouldn’t need to build custom app services and android components for this. The pre-built dependencies should just work. If they do not, please file an issue and we’ll fix it asap. 🙂
@MikeM711 Have you enabled “Remote debugging via USB” in the Settings view of the Reference Browser?