Closed
Bug 1231323
Opened 9 years ago
Closed 9 years ago
hudservice module not found
Categories
(DevTools :: Console, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: u538344, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build ID: 20151029151421
Steps to reproduce:
As per various examples on stackoverflow and mdn docs, my code contains this:
const {Cu} = require("chrome");
const devtools = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools;
const HUDService = devtools.require("devtools/webconsole/hudservice");
This code has worked at some point at most a few months ago (it's in a published addon).
I'm using the official 32bit build for windows and main update channel.
Actual results:
This code now throws an error:
module devtools/webconsole/hudservice not found at resource://devtools/webconsole/hudservice.js
Expected results:
I'm supposed to get a reference to http://mxr.mozilla.org/mozilla-release/source/browser/devtools/webconsole/hudservice.js so I can manipulate the console window.
This is said faulty doc btw: https://developer.mozilla.org/en-US/docs/Tools/Browser_Console#HUDService
marnick.leau, what is the addon?
Component: Untriaged → Developer Tools: Console
Keywords: regressionwindow-wanted
(In reply to Liz Henry (:lizzard) (needinfo? me) from comment #2)
> marnick.leau, what is the addon?
https://addons.mozilla.org/en-US/firefox/addon/status-watch/
DevTools files were moved in 44 (bug 912121), so this code is no longer correct.
If you wish to support all active Firefox channels in your add-on, you would need to attempt both old and new paths when loading the module.
I believe the code you mentioned in comment 0 should work in 43 and earlier. Here is the modified version for 44 and later:
const {Cu} = require("chrome");
const devtools = Cu.import("resource://devtools/shared/Loader.jsm", {}).devtools;
const HUDService = devtools.require("devtools/client/webconsole/hudservice");
I have updated the docs as well. Does that work for you?
(In reply to J. Ryan Stinnett [:jryans] (use ni?) (at work week until Dec. 14) from comment #4)
> DevTools files were moved in 44 (bug 912121), so this code is no longer
> correct.
>
> If you wish to support all active Firefox channels in your add-on, you would
> need to attempt both old and new paths when loading the module.
>
> I believe the code you mentioned in comment 0 should work in 43 and earlier.
> Here is the modified version for 44 and later:
>
> const {Cu} = require("chrome");
> const devtools = Cu.import("resource://devtools/shared/Loader.jsm",
> {}).devtools;
> const HUDService =
> devtools.require("devtools/client/webconsole/hudservice");
>
> I have updated the docs as well. Does that work for you?
Those new paths work indeed, thanks.
I don't suppose there's a way of knowing about these changes without sifting through gigantic changelogs full of tedious technical details that don't concern me with every update?
Flags: needinfo?(marnick.leau)
(In reply to marnick.leau from comment #5)
> I don't suppose there's a way of knowing about these changes without sifting
> through gigantic changelogs full of tedious technical details that don't
> concern me with every update?
The add-ons team does summarize compatibility issues like this on their blog. Here's an example:
https://blog.mozilla.org/addons/2015/12/29/compatibility-for-firefox-44/
That's the only higher level resource I know of currently.
Marking RESOLVED INVALID since we've found a solution but it does not involve changes to Firefox itself.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•