views:

276

answers:

3

The Firebug console gives me:

------------------------------------------
(X) 0
    no source for No element with id 'inline_gallery_image_false' found)
------------------------------------------

When I click this error I get a blank source view window. The 'Stack' pane in the Script tab turns up blank as well.

Firefox 3.5.5 + Firebug 1.4.5. All other extensions are disabled.

I've turned on 'Stop on All Errors' and 'Show Javascript Errors' and 'Show Stack Trace on Errors' but all I get is the error shown above. Strangely a Google search turned up nothing helpful.

Basically I know the error is due to a bad argument passed to a function in an external JS file but I want to know what function called it and how it came to send the wrong argument. I also want to know why it won't show the source or even tell me which file the error is in.

+1  A: 

If you know what you do to repeat the error, then just put a breakpoint in that section, and just start to step through. At some point you will be jumped completely out of your code, or it will just exit, but you will begin to figure out what happened to cause the error.

It appears that you are trying to access an element that doesn't exist, or is not in the DOM, yet. You may have tried to create an element with setting innerHTML but you haven't given the browser to make the DOM change yet.

Can you explain what is going on when this happened? What are you trying to do, what do you expect to happen?

James Black
sorry you're missing the point. I KNOW what the error is and with a little work I can find what specifically caused it but I'm trying to enable tracebacks in Firebug and this source view error appears to be blocking that. I don't think the error itself is the problem, I think FF is somehow broken as evidenced by the uncaught chrome exceptions.
SpliFF
This isn't the first time this has happened either, so it isn't unique to this situation. It seems to be related to my JS files or combining inline and external scripts. Maybe a cache error, I don't know.
SpliFF
Oh, I see. When this happens to me, I just single-step, solve the problem, and go on. I haven't spent much time trying to understand what firebug may be doing, I just use it to the best that it can help me at that time.
James Black
+1  A: 

I noticed the standard Firefox console gives the same error so this issue is not an issue with Firebug after all. When I click the error to view source I get:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebNavigation.loadURI]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/viewSource.js :: viewSource :: line 221"  data: no]

UPDATE: After searching around I found another site with a JS error. Upon opening source view I get a blank page and:

Error: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name]"  nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame :: file:///D:/Apps/Firefox3.5/components/nsLoginManager.js :: anonymous :: line 328"  data: no]
Source File: file:///D:/Apps/Firefox3.5/components/nsLoginManager.js
Line: 328

Seems pretty clear some extension or plugin has screwed up my FF source view. I'm going to reinstall from scratch. Since it's clear this isn't a programming issue any more feel free to close.

UPDATE: Turned out it WAS a programming error. The offender was this line of code:

if (isStrict && !o) throw new Error(0,"No element with id '" + ref + "' found");

WTF is that 0 in there? No idea. I must have followed a dodgy tutorial because when I looked into the Error constructor the first argument is supposed to be the message string. The second argument is supposed to be the URL of the offending file (optional) so FF rightly thought there was an error called '0' in the file "No element with ...".

SpliFF
A: 

This started happening immediately after updating the Flash plugin. Grrr.

Ahah