Adding gcli commands using scratchpad doesn't work (anymore)

hi
Adding commands as described here https://developer.mozilla.org/en-US/docs/Tools/GCLI/Scratchpad no longer work.


Firefox 42.0
Ubuntu 14.04

Code from the page:

Components.utils.import("resource:///modules/devtools/gcli.jsm");

gcli.addCommand({
  name: 'hello',
  description: 'Show a message',
  params: [
    {
      name: 'name',
      type: 'string',
      description: 'Who to say hello to',
    }
  ],
  exec: function(args, context) {
    return 'Good morning, ' + args.name;
  }
});

Error:

/*
Exception: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: Scratchpad/2 :: <TOP_LEVEL> :: line 1"  data: no]
*/



When I try with 

Components.utils.import("resource://gre/modules/devtools/gcli.jsm");

I get the error:
/*
Exception: TypeError: gcli.addCommand is not a function
@Scratchpad/2:3:1
WCA_evalWithDebugger@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webconsole.js:1195:16
WCA_onEvaluateJS@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webconsole.js:811:20
WCA_onEvaluateJSAsync@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webconsole.js:782:20
DSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1586:15
LocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:569:11
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:83:14
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:83:14
*/



The mozcmd stored on disk in the devtools path are working though.

Regards
Ben




0
ben
11/27/2015 10:40:54 AM
mozilla.dev.apps.firefox 3660 articles. 0 followers. Post Follow

0 Replies
685 Views

Similar Articles

[PageSpeed] 57
Get it on Google Play
Get it on Apple App Store

Reply:

Similar Artilces:

I'm very upset to say i can't use firefox, it doesn't work anymore...
Name: Stephen Email: retrodotrevivalathotmaildotcom Product: Firefox Summary: I'm very upset to say i can't use firefox, it doesn't work anymore... Comments: I'm very upset to say i can't use firefox, it doesn't work anymore... the addons menu is blank with all weird buttons on the button, and all my addons i cant get to but some still are there like my google toolbar but it won't show in addons, and some buttons are in the navagation toolbar. i will have to uninstall if you can't help Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5....

registration script doesn't work using IE but works fine using firefox
Hi its an asp.net / c# script which was working fine till about few days ago when suddenly it stopped. I know it is something to do with the validation script which runs at server but I can't figure out what had happened to stop it working. I have two sections for registration ... free and pay parts the free section give an error after filling the form and click register, the error I get is an invalid email address ... the pay registration form just doesn't do anything when filling the form and click register .. here is the a snipet of the code in the free registration section....

Same app in two application directories
Hi All, I'm developing an ASP.net app on my local machine.  I have had Visual Studio create an application directory under "Default Web Site", and I have also created an application directory myself via inetmgr (IIS7 on Vista).  The directory created by VS works perfectly, but the directory which I created manually doesn't - every page I load returns a "could not load type" error.  The exact same files exist in both directories (I literally copied them from my dev directory to the one I created), so I know it's not the source files themselves.&...

Firefox 4 beta doesn't work very well + couldn't sign up for Firefox Sync
Name: Product: Firefox Summary: Firefox 4 beta doesn't work very well + couldn't sign up for Firefox Sync Comments: Having installed Firefox Home on my iPod touch, I was prompted to install Firefox Sync on my desktop computer. That led to downloading the Firefox 4 beta. First, I attempted to set up Firefox Sync. Unfortunately, every single e-mail address I tried resulted in an "invalid e-mail address" error message, thus preventing me from continuing. Then, I attempted to get more information on the Firefox 4 beta web page. Unfortunately, none of the li...

AUTOLOG.EXE used for a VM doesn't work for "AutoLogon to Wkstn, don't use E-Dir"
Hi. Server: Open SUSE 10 (2.6.18.2.34), running VMWare 1.0.4 Client: WinXP-SP2 + all sec.upd., VMWare tools installed. NWClient: 4.91.4 + patches [1] When I use Autolog to set "AutoLogon to Wkstn, don't use E-Dir", then the result is *NOT* what I'm used to for other workstations: The Novell Login Screen *DOES* show up. After 2-3 Minutes it dissappeares without any user interaction and then the local WinLogon happens as expected. Any suggestions? Regards, Rudi. [1] _491psp2_3_4_nwspool_3.inf _491psp3_4_nicm.inf _491psp4_lgncxw32.inf _491psp4_log...

Urgent: AutoCompleteExtender doesn't work/Updatepanel doesn't work
This is my code for the AutoCompleteExtender <asp:textbox id="txtQuickSearch" runat="server" CssClass="inputText" style="width:145px; "></asp:textbox> <atlas:AutoCompleteExtender runat="server" ID="acSearch"> <atlas:AutoCompleteProperties TargetControlID="txtQuickSearch" Enabled="True" ServicePath="http://localhost/Sony.BusinessSuite.Web.UI/AtlasServices/MasterData.asmx" ServiceMethod="GetAllModels" minimumprefixlength="2" /> </atlas:AutoCompleteExtender> When i start typing fiddler shows: # Result Host URL Body Caching Content-Type User-...

Spellchecker doesn't work: no error, just doesn't work
Hey all. This is only happening with one person. It's all GW7 no SP. has worked fine before. Anyway when they type along it doesn't catch that spelling and it doesn't fire up spell check before it's sent like it is checked off to do. It does nothing. It just sends it when you click send; no error, nothing. I did a rebuild, analyze/fix. I have it set at all levels for this user. any ideas Mark, well, I'd try a more recent client version first. GW7 was less than stellar before SP1. Uwe -- Novell Support Connection Volunteer SysOp Please don...

Firefox doesn't work anymore
Hello all, I have a question: why is my Firefox working not properly anymore? 90% of the times I open it, he stops immediately. Then Microsoft tells that there's a problem and that Firefox needs to be closed. When the problem started I saw everything just as normal, but the site ( my startpage) didn't appear. And I couldn't click on anything, any bar or whatever. Only the close-button worked. I'v reinstalled Firefox, but the problem stayed. Has anybody the same problem? Do you know how to fix this? Please tell me, I hate IE! Regards, theforce On 05/02/0...

It isn't useful to me at all
Name: Dan Product: eBay Companion Summary: It isn't useful to me at all - doesn't seem to work Comments: The sidebar doesn't function at all. I can't client the "connect to ebay" button - nothing happens. There doesn't seem to be any place that I can tell it about what account to log in with. The buttons in the menu that it added to my menu bar don't work. The only function that does work is the button in the menu bar that brings up the options, takes me to the ebay home page, and the search bar in the sidebar takes me to searches. All ...

Freenx doesn't work, NX doesn't work with compiz. Questions
FreeNX just doesn't work. NX from nomachine installed well, but I guess that limits me to two logins? NX doesn't work with compiz, tho, at least from machines not running compiz. So no great surprise. :-) Is there any way to run startkde that disables compiz and uses kwin? Alternatively, hows the easiest way to handle alternative logins? I could link the two documents folders together, but then I'd have problems with file permissions. I'm just looking for ideas here, I could live with two logins. -- dougnc -------------------------------------------...

i'm not happy that Firefox 2 doesn't work with Flash, and you don't even list it as a known issue
Name: kb Product: Firefox Summary: i'm not happy that Firefox 2 doesn't work with Flash, and you don't even list it as a known issue Comments: doesn't sound loke good DevTest before release if you haven't listed the problems with Flash. I have to close Firefox and resort to IE. So IE, is still widely used on my computer since Firefox continues to not work all the time. Browser Details: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 ...

Using arrows doesn't work anymore?
Name: Alexandre Gaudreau Email: KriegerDerHolleatGmaildotcom Product: Firefox Summary: Using arrows doesn't work anymore? Comments: Hello. I absolutely love firefox 3.5, it's definitely the very best browser ever mostly once you get to know about the add-ons and script/styles. However I noticed since I think 3.5 betas that when I click on a tab, I can't move from one tab to another with the mouse wheel or the arrows like before... and that was a very useful feature that I awas always using. I'd like to have it back or at least make a checkbox to enable it. ...

Firefox doesn't work well in 'User' mode as opposed to 'Administrator' mode
Name: Dave Wintermute Email: dewin59atgmaildotcom Product: Firefox Summary: Firefox doesn't work well in 'User' mode as opposed to 'Administrator' mode Comments: Logging into my account fails on http://www.boynton-beach.org/ in User logon, but works fine in Administrator logon. Similarly, loggin into my account at wireless.att.com fails in the User logon, but works ok in the Administrator logon. I recently downloaded Chrome and discovered that I do not have these problems when logging into my accounts with either of the above sites. I will probably s...

I don't know why paging, sorting doesn't work in firefox
Hi. I have a gridview and paging and soring enabled but I tested on IE it works perfectly fine but when I load it on Firefox, the page link and sort link don't work at all. I don't know what the problem is. Anybody knows how to make them work on Firefox?  Hi:   It seems your problem is solved here: http://forums.asp.net/p/1183698/2015763.aspx#2015763   This post will be closed. ThanksSincerely,Allen ChenMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help....

Web resources about - Adding gcli commands using scratchpad doesn't work (anymore) - mozilla.dev.apps.firefox

Resources last updated: 1/22/2016 2:42:51 PM