mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
125 stars 41 forks source link

Add-on is Android compatible but does not have an Android install file #4858

Closed kumar303 closed 5 years ago

kumar303 commented 6 years ago

Describe the problem and steps to reproduce it:

I'm not sure how to reproduce this.

UPDATE: see https://github.com/mozilla/addons/issues/4858

What happened?

I have seen several add-ons that are marked as Android-compatible yet do not have an install file for either all-platforms or for the Android platform.

Here is an example of an API response from https://addons.allizom.org/api/v3/addons/addon/webext-no-platf/ : webext-no-platf.json.zip

Its current version says it is compatible with Android:

      "compatibility" : {
         "android" : {
            "min" : "48.0",
            "max" : "*"
         },
         "firefox" : {
            "min" : "48.0",
            "max" : "*"
         }
      }

but it does not have an android file. It has a mac and linux file only.

What did you expect to happen?

This version should not be marked as compatible with Android

Anything else we should know?

https://addons.allizom.org/en-US/firefox/addon/webext-no-platf/

diox commented 6 years ago

To reproduce:

We should prevent developers from doing this. I'm not sure to what extent, though. Maybe don't allow editing platform/apps entirely? Is there another way to end up in this situation without editing?

kumar303 commented 6 years ago

I've been duping a few bugs related to this and I just saw that it's affecting Privacy Badger which is a high profile add-on: https://www.reddit.com/r/firefox/comments/75azzo/i_cant_download_privacy_badger_on_firefox_android/

What can we do to fix the missing install files?

I verified that Privacy Badger's current version does not have an Android file. https://addons.mozilla.org/api/v3/addons/addon/privacy-badger17/

diox commented 6 years ago

The quickest way to fix this is probably to only keep one single file compatible with "All" platforms. The problem is, we don't know what was the intent - why didn't the developer allow the "All" platform? Was it deliberate? Does it actually work with all platforms or not?

Edit: or the opposite, drop the Android application for add-ons that don't have a file compatible with "Android" or "All" platforms.

eviljeff commented 6 years ago

I suspect STR could be:

i.e. they didn't add the application - we did

kumar303 commented 6 years ago

Here are a few notes:

kumar303 commented 6 years ago

btw, 13k users on Firefox Mobile have tried within the last week to install an add-on lacking an Android file. https://sentry.prod.mozaws.net/operations/addons-frontend-amo-prod/issues/656097/

diox commented 6 years ago

More info: from https://github.com/mozilla/addons/issues/348#issuecomment-302791236 it's clear that the support for Android was /not/ intended in Privacy Badger. https://github.com/mozilla/addons/issues/4119 also has more info about the mess that is created by having Android added by default like @eviljeff mentions a few comments above this one.

diox commented 6 years ago

So, we should do something about this. Something like:

eviljeff commented 6 years ago

Fixing mozilla/addons#348, re-organizing the checkboxes in the initial submission step to make it clear whether you want to enable Android or not. The trick is that it needs to also work for version upload

Agreed. Part of the problem is knowing what the correct UX is though - do we default Android off and Desktop on? do we force the developer to select Applications? Hide the platforms by default to stop developers from changing them?
https://github.com/mozilla/addons/issues/4119 is a semi-dupe also.

kumar303 commented 6 years ago

I found another one today on production while browsing the site in Android. It was on the front page in the trending section.

Show output `$ curl 'https://addons.mozilla.org/api/v3/addons/addon/seznam-pro-firefox-esko/' | jq .current_version` ``` { "id": 2222950, "compatibility": { "android": { "max": "*", "min": "55.0" }, "firefox": { "max": "*", "min": "55.0" } }, "edit_url": "https://addons.mozilla.org/en-US/developers/addon/seznam-pro-firefox-esko/versions/2222950", "files": [ { "id": 764078, "created": "2017-11-08T14:36:56Z", "hash": "sha256:10f953f927aa7e7f9d17b07c29857a2fc2d2f01c39a46017a731b8c648e13ed9", "is_restart_required": false, "is_webextension": true, "is_mozilla_signed_extension": false, "platform": "linux", "size": 2351964, "status": "public", "url": "https://addons.mozilla.org/firefox/downloads/file/764078/seznam_pro_firefox_esko-4.0.7-an+fx-linux.xpi?src=", "permissions": [ "", "geolocation", "management", "nativeMessaging", "storage", "tabs", "webNavigation", "http://sbrowser.dev/*", "https://www.seznam.test/doplnky*", "https://www.seznam.cz/doplnky*" ] }, { "id": 764079, "created": "2017-11-08T14:36:56Z", "hash": "sha256:2933825a337d125509b61c25c4f60b8c7e5a70c9c1a0e2ae82dc438e99d8f50c", "is_restart_required": false, "is_webextension": true, "is_mozilla_signed_extension": false, "platform": "mac", "size": 2351967, "status": "public", "url": "https://addons.mozilla.org/firefox/downloads/file/764079/seznam_pro_firefox_esko-4.0.7-an+fx-mac.xpi?src=", "permissions": [ "", "geolocation", "management", "nativeMessaging", "storage", "tabs", "webNavigation", "http://sbrowser.dev/*", "https://www.seznam.test/doplnky*", "https://www.seznam.cz/doplnky*" ] }, { "id": 764080, "created": "2017-11-08T14:36:56Z", "hash": "sha256:b79f4ab9ba7ef61022f767845de0e039be95652930646ec03b51ab12f7373a12", "is_restart_required": false, "is_webextension": true, "is_mozilla_signed_extension": false, "platform": "windows", "size": 2351964, "status": "public", "url": "https://addons.mozilla.org/firefox/downloads/file/764080/seznam_pro_firefox_esko-4.0.7-an+fx-windows.xpi?src=", "permissions": [ "", "geolocation", "management", "nativeMessaging", "storage", "tabs", "webNavigation", "http://sbrowser.dev/*", "https://www.seznam.test/doplnky*", "https://www.seznam.cz/doplnky*" ] } ], "is_strict_compatibility_enabled": false, "license": { "id": 18, "name": { "el": "Άδεια BSD", "vi": "Giấy phép BSD", "ca": "Llicència BSD", "it": "Licenza BSD", "cs": "BSD licence", "eu": "BSD Lizentzia", "sv-SE": "BSD-licens", "id": "Lisensi BSD", "es": "Licencia BSD", "ru": "Лицензия BSD", "nl": "BSD-licentie", "en-US": "BSD License", "fr": "Licence BSD", "bg": "BSD Лиценз", "de": "BSD-Lizenz", "da": "BSD-licens", "fa": "مجوز BSD", "hu": "BSD licenc", "pt-PT": "Licença BSD", "sr": "БСД лиценца", "sq": "Leje BSD", "ga-IE": "Ceadúnas BSD", "sk": "Licencia BSD", "zh-CN": "BSD 授权" }, "url": "http://www.opensource.org/licenses/bsd-license.php" }, "release_notes": null, "reviewed": "2017-11-08T14:40:41Z", "url": "https://addons.mozilla.org/en-US/firefox/addon/seznam-pro-firefox-esko/versions/4.0.7", "version": "4.0.7" } ```
muffinresearch commented 6 years ago

Summoning @jvillalobos for input on this based on https://github.com/mozilla/addons/issues/4858

jvillalobos commented 6 years ago

What I would like to do in Dev Hub eventually is that Android support is handled by a global flag (per add-on, instead of per-version), and it's off by default. Currently, I would favor switching the submission flow so that Android is off by default, since that's the most likely scenario.

EnTeQuAk commented 6 years ago

So, this more or less has been fixed by https://github.com/mozilla/addons-server/pull/9362 but before closing this, does this issue involve changing existing add-ons too? Given that we're going away from "platform" towards "compatibility apps" and you can't change the platform for a file afterward anymore I feel like this may have been properly addressed?

jvillalobos commented 6 years ago

Won't it be a problem if versions still have multiple files? Or are we just picking one of the files and sticking to it?

diox commented 6 years ago

To fix it for existing add-ons we need to extra files, yeah. I think just picking one at seemingly random is ok, in 99% of the case they are dupes.

jvillalobos commented 6 years ago

Agree. I think there's also a query that we can run to find the few cases where the files don't match and then we can warn devs about it.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.