Closed
Bug 1272133
Opened 8 years ago
Closed 8 years ago
runtime error if commands/suggested_key isn't supplied for the target platform
Categories
(WebExtensions :: Untriaged, defect, P4)
WebExtensions
Untriaged
Tracking
(firefox48- wontfix, firefox49+ verified, firefox50+ verified, firefox51 verified)
VERIFIED
FIXED
mozilla50
People
(Reporter: wbamberg, Assigned: mattw)
References
Details
(Whiteboard: [commands] triaged)
Attachments
(1 file)
58 bytes,
text/x-review-board-request
|
kmag
:
review+
gchang
:
approval-mozilla-beta+
|
Details |
STR: Include a key like this in manifest.json: "commands": { "toggle-feature": { "suggested_key": { "linux": "Ctrl+Shift+U" }, "description": "Send a 'toggle-feature' event to the extension" } } Then try to install the add-on on some other platform. You get a runtime error logged to the console: TypeError: shortcut is null: loadCommandsFromManifest@chrome://browser/content/ext-commands.js:80:9 .... I'm not sure what the best thing to do here is. Should we make commands/suggested_key/default mandatory? Should we just check for commands/suggested_key/default in the linter? Should we print a warning in the console, or in about:debugging, when the developer tries to install an add-on like this?
Comment 1•8 years ago
|
||
We should try and raise a useful message, which sounds similar to another bug on commands. But also I'd be tempted just make a default key mandatory to solve the problem.
Comment 2•8 years ago
|
||
In Chrome, the command would just have no shortcut on that platform, by default, but the user would be able to assign one. We should probably fall back to accepting the command entry but not binding it to a key.
Updated•8 years ago
|
Whiteboard: [commands]
Comment 3•8 years ago
|
||
For me loading from chrome://extensions it just fails: https://www.dropbox.com/s/tmgkkwlg1pwdio4/Screenshot%202016-05-11%2015.50.02.png?dl=0
Comment 4•8 years ago
|
||
Ah. Interesting. Maybe we should do something similar. But, either way, Chrome allows commands without any suggested keys, and just doesn't bind them by default.
Comment 5•8 years ago
|
||
[Tracking Requested - why for this release]: this should be working in 48 for chrome requests
tracking-firefox48:
--- → ?
Comment 6•8 years ago
|
||
chrome doesn't do this - but we'd like to do something better here
Priority: -- → P4
Whiteboard: [commands] → [commands] triaged
Comment 7•8 years ago
|
||
Track this as this is a improvement request.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → mwein
Assignee | ||
Comment 8•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/66894/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/66894/
Attachment #8774455 -
Flags: review?(kmaglione+bmo)
Comment 9•8 years ago
|
||
Comment on attachment 8774455 [details] Bug 1272133 - Fix runtime error thrown when no shortcut is found for the target platform. https://reviewboard.mozilla.org/r/66894/#review64304
Attachment #8774455 -
Flags: review?(kmaglione+bmo) → review+
Assignee | ||
Comment 10•8 years ago
|
||
Comment on attachment 8774455 [details] Bug 1272133 - Fix runtime error thrown when no shortcut is found for the target platform. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/66894/diff/1-2/
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 11•8 years ago
|
||
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/47426821ace4 Fix runtime error thrown when no shortcut is found for the target platform. r=kmag
Keywords: checkin-needed
Comment 12•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/47426821ace4
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Comment 13•8 years ago
|
||
too late for 48. Shell, is it something that you want in 49?
Comment 14•8 years ago
|
||
changing need info to Andy for his call on where to land it. we triaged it as a P4 - so it's unlikely we would want uplift to 49 - but 50? or just ride the trains as en enhancement?
Flags: needinfo?(sescalante) → needinfo?(amckay)
Comment 15•8 years ago
|
||
If we can still get it in 49 that would be nice. Agreed its low priority, but it can be fatal to a WebExtension as it causes the runtime error. Should be low risk as its just in the WebExtensions code and has been baking for a while on 50.
Flags: needinfo?(amckay)
Comment 16•8 years ago
|
||
=] not sure if i should need info back with the answer. From Andyms' comment 15, the answer is "yes, in Fx49 please". low risk, but does hit webextensions and we're trying to greatly increase the usage/availability of those in 49.
Flags: needinfo?(sledru)
Comment 17•8 years ago
|
||
Matt, could you fill the uplift request to beta? Thanks
Flags: needinfo?(sledru) → needinfo?(mwein)
Assignee | ||
Comment 18•8 years ago
|
||
Comment on attachment 8774455 [details] Bug 1272133 - Fix runtime error thrown when no shortcut is found for the target platform. Approval Request Comment [Feature/regressing bug #]: N/A [User impact if declined]: Medium [Describe test coverage new/current, TreeHerder]: N/A [Risks and why]: Low risk, and prevents a fatal runtime error from occurring if an extension tries to register a shortcut without providing a valid key for the target OS. [String/UUID change made/needed]: N/A
Flags: needinfo?(mwein)
Attachment #8774455 -
Flags: approval-mozilla-beta?
Comment 19•8 years ago
|
||
Comment on attachment 8774455 [details] Bug 1272133 - Fix runtime error thrown when no shortcut is found for the target platform. This patch fixes a runtime error for extensions. Take it in 49 beta.
Attachment #8774455 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 20•8 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/878f4c530d61
Comment 21•8 years ago
|
||
I was able to reproduce the initial issue on Firefox 48.0.2 under Windows 10 64-bit. Verified fixed on Firefox 51.0a1 (2016-09-12), Firefox 50.0a2 (2016-09-12) and Firefox 49.0 (20160907153016) under Windows 10 64-bit. The error is no longer thrown in Browser Console.
Status: RESOLVED → VERIFIED
status-firefox51:
--- → verified
Comment 22•7 years ago
|
||
This issue is still present if I don't set "suggested_key" at all, tested on Firefox 51.0.1 (stable) and Firefox 53.0a2 (developer edition). Example extension https://github.com/IgorCode/webextensions-examples/tree/master/commands
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•