1.1-repacked addons using hotkeys module might not work anymore.



7 years ago
5 years ago


(Reporter: KWierso, Assigned: irakli)


Windows 7
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)




7 years ago
It seems like something changed in the hotkeys module between SDK 1.0 and 1.1, because an addon that was repacked to use 1.1 suddenly started complaining about needing a modifier key.

This is the addon I'm referring to: https://addons-dev.allizom.org/z/en-US/addon/reload-plus
It intentionally does not specify a modifier key for one of its hotkeys, and apparently it didn't complain about that in SDK 1.0. (Even though the string for the "no modifier key" warning's been in there since prior to 1.0?)

So either SDK 1.0 had no actual modifier key requirement, or it was supposed to be there and it just wasn't actually throwing the error (and got fixed post-1.0), or maybe this extension has always thrown that warning, even before the repack and we don't know about it.

I'm having trouble testing out that last part because when I install the non-repacked version ( https://addons.mozilla.org/en-US/firefox/addon/reload-plus/ ) in Firefox 6, it throws a different error:
Error: An exception occurred.
Traceback (most recent call last):
  File "<string>", line 2, in 
TypeError: can't change object's extensibility

If this is a change on the SDK side, I'd say bug 664361 would be a likely candidate for introducing the change. But it's entirely possible that this extension never really worked...

Comment 1

7 years ago
Irakli, can you take a look at this?
Assignee: nobody → rFobic
Priority: -- → P1
Target Milestone: --- → 1.2
I remember there were some bugs with a way hotkeys were handled, if at some point non-modifiered keys ever worked that was a bug that got solved.

Anyhow there is bug 677785 that asks to add support for it. We still need to decide whether it will be limited to non printables only or not, but either way this will be fixed once it'll land.
Depends on: 677785

Comment 3

7 years ago
I'm the author of Reload Plus. Just wanted to point out that the version of the SDK bundled with my add-on is MODIFIED. I stripped the code that throws the "no modifiers" exceptions from addon-kit/lib/hotkeys.js and api-utils/lib/keyboard/utils.js to work around bug 677785. This is why my add-on had its "Upgrade SDK?" flag disabled and why bug 690824 was filed when your repacker didn't respect that.

This, though? It's not a bug and can safely be closed.
Thanks a lot @blackwind for letting us know what happened! I have created new bug 692404 to make sure we'll address issue with repacker, to make it respect "Upgrade SDK" flag in a future.

Also I've CC-ed you on bug 677785 so that you'll know once support for non-modifier keys have landed.

I would also encourage you to work with us closer if you find some APIs limiting. If you modify sdk code, please consider sending us a pull request ;)

Closing this one as invalid in favor of bug 689420!
Last Resolved: 7 years ago
Resolution: --- → INVALID
Whiteboard: [triage:followup]
You need to log in before you can comment on or make changes to this bug.