Git Product home page Git Product logo

Comments (14)

wbamberg avatar wbamberg commented on August 19, 2024

Which add-on in particular? All/any of them? Which add-ons have you tried?

Are their steps not listed in the readme that are required? eg. Some firefox flags or something?

I don't think so.

You should not need to copy any files: just clone or download the repo, and follow the instructions here: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Packaging_and_installation#Loading_from_disk to install a particular add-on into Firefox.

When you do that, does the add-on appear in about:debugging, in the list of installed add-ons, like this: https://i.imgur.com/KODdmEu.png?

from webextensions-examples.

onassar avatar onassar commented on August 19, 2024

Apologies thought this was a repo for a specific demo.
This one: https://github.com/mdn/webextensions-examples/tree/master/context-menu-demo

Because I didn't want to checkout all the examples (just testing context menu options at the moment), I just copied the files, messages and icons.

I'm loading it in debugging mode, and the context menu options show up (see here: https://i.imgur.com/gBQtApx.jpg), but clicking them does nothing, and the Browser Console does not communicate any errors.

from webextensions-examples.

wbamberg avatar wbamberg commented on August 19, 2024

Oh yeah, sorry. You need Firefox 48 for context menus to work properly. Please try with that (the current Beta, or you could use Developer Edition also) and let me know if it works any better.

from webextensions-examples.

onassar avatar onassar commented on August 19, 2024

Gotcha okay. I have Firefox 47 and it's not auto-updating, which means most users probably don't have Firefox 48 either. Is there any expected timeline on when Mozilla will be pushing out Firefox 48 as the default browser?

from webextensions-examples.

wbamberg avatar wbamberg commented on August 19, 2024

Yes! Firefox 48 will ship on August 2, according to this rather confusing table: https://wiki.mozilla.org/RapidRelease/Calendar. That's also the "first stable release" of WebExtension support: https://wiki.mozilla.org/WebExtensions/RoadMap#Firefox_48.

from webextensions-examples.

onassar avatar onassar commented on August 19, 2024

Thanks @wbamberg
I'll test things out locally in Firefox 48 dev build.
What will happen if the min version is set as 48, and someone attempts to install the extension?

from webextensions-examples.

wbamberg avatar wbamberg commented on August 19, 2024

What will happen if the min version is set as 48, and someone attempts to install the extension?

Ha, good question. As far as I know:

  • if you try to install a properly packaged-for-distribution add-on in Firefox 47, and its min version is 48, then installation will fail and you will see an error in the console
  • if you try to install the same add-on using "Load Temporary Add-on", then Firefox 47 will happily install it (and it will not work, of course).

We discussed this over in bug 1192437 but the discussion kind of petered out. I just filed bug 1281884 for this issue. Thanks for reminding me!

I've also just updated the strict_min_version for this example, and also updated the compat data for contextMenus. I think that's the best we can do here, so I'll close this issue. But let me know if you see anything else that needs attention.

from webextensions-examples.

onassar avatar onassar commented on August 19, 2024

So are you saying that even though strict_min_version will be set to 48.0, someone using 47.0 will be able to install it? My assumption would be that Firefox would communicate to the user that a minimum version is required.

If that's not the case, would you recommend sniffing the user agent for a version and then communicating to the user within the app itself? I'm reluctant to base logic like that off a user agent :(

from webextensions-examples.

wbamberg avatar wbamberg commented on August 19, 2024

So are you saying that even though strict_min_version will be set to 48.0,
someone using 47.0 will be able to install it?

Not exactly. There are 2 ways to install a WebExtension in Firefox:

  1. the "Load Temporary Add-on" way described here: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Packaging_and_installation#Loading_from_disk. This is most likely what the developer will use while they're working on the add-on. If you're used to Chrome extensions, this is like the "Load unpacked extension" thing in chrome://extensions.
  2. opening a packaged "XPI" file in Firefox. Once you've finished writing an add-on, you submit it to Mozilla for signing, and can choose also to host it on Mozilla's website. Mozilla will review it, sign it, create the signed XPI. Users will then visit Mozilla's website (or your website, if you want to distribute it yourself) to download and install the XPI. So this is the way your users will install an add-on. This is the equivalent of Chrome CRX files.

So:

  • The "strict_min_version" key will be properly respected by Firefox if the add-on is installed using method 2: meaning that Fx47 will refuse to install an add-on with strict_min_version==48.0, and will report an error.
  • Unless & until bug 1281884 is fixed, then the "strict_min_version" will not be respected if the add-on is installed using method 1.

Meaning that this problem will not affect your users, it's just a bit annoying for developers.

So no, I wouldn't recommend doing UA sniffing here :).

from webextensions-examples.

onassar avatar onassar commented on August 19, 2024

Gotcha, yah I'm not worried about developers. More, if an end user installs it via a signed version, but they don't realize they have the wrong version, having it error out in their console won't help much: they'll just think the extension is broken.

Does Mozilla communicate to them they need to upgrade their Firefox?

from webextensions-examples.

wbamberg avatar wbamberg commented on August 19, 2024

Oh, I was wrong about that, it is visible to users. It looks like this: https://i.imgur.com/nFySbzU.png

from webextensions-examples.

onassar avatar onassar commented on August 19, 2024

Awesome thanks @wbamberg
I feel like it makes a bit more sense to communicate to the user that the reason it's not compatible is because the user hasn't yet upgraded their Firefox (which at that point is an opp to prompt them with a CTA to do so).

Is there someone I can post / file that suggestion?

from webextensions-examples.

wbamberg avatar wbamberg commented on August 19, 2024

You could file a bug: https://bugzilla.mozilla.org/enter_bug.cgi?product=Toolkit&component=Add-ons%20Manager. Offhand, it does seem to me like a good idea, but I'm not really qualified to judge.

from webextensions-examples.

onassar avatar onassar commented on August 19, 2024

Great thanks for your help!

from webextensions-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.