Why do I get no source for error in Firefox - javascript

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.

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?

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 ...".

Related

"Uncaught JavaScript error "Uncaught Error: Cannot read property 'length' of undefined" on page" - TestCafe

I work in a TestCafe testing program. The program repeats all user actions in the "record" mode, and then automatically repeats all previously recorded actions. But the problem. When you enter a numeric value in the input field, an error is displayed:
"Uncaught JavaScript error "Uncaught Error: Cannot read property 'length' of undefined" on page"
I'm not strong in JS, all. TestCafe code, where I like to enter the desired number in the input field:
"24.test": function() {
act.type(".input.ng-pristine.ng-untouched.ng-valid.ng-isolate-scope.ng-empty", "0");
},
And at the time of the automatic test run, the above error takes off. How to correct correctly or may be ignored. I've already tried using the try{} catch(error){} or window bundle.onerror = function () {return true;}. The error still crashes. I may not have inserted the code correctly into the function body.
Based on your information, it is unclear why this error occurs. This error might be in your website itself and TestCafe just catches it.
Try running your tests with the 'Fail if a JavaScript error occurs on a page' option in Run Configurations Dialog turned off and see if this error appears:
In addition, you can request the latest daily build from the DevExpress Support Team where this issue might be already fixed, or they will help you address it.

Why is wp-includes/js/shortcode.js rendered in gibberish

I noticed my debugger was flaring up for a javascript error.
Uncaught SyntaxError: Invalid or unexpected token
http://vionms.beee/wp/wp-includes/js/shortcode.js?ver=4.9.8 line 1
When I open it, it shows a lot of gibberish... and then some (partial) information about a Comodo RSA domain validation/SSL wildcard, see screenshot.
I deactivated all plugins and reverted to a WP default theme, but the error persisted...
If I remove the version from the url, the scripts shows its contents (as expected).
I've never seen this before... and I don't know what caused it, so annoying...

Uncaught Error: Expected to find a document already present for removed

When I try to log into app, the error I get in client console (chrome dev tools) is this:
Uncaught Error: Expected to find a document already present for removed mongo.js?69942a86515ec397dfd8cbb0a151a0eefdd9560d:253
and the login is halted: the loading gif from the accounts-google package shows and the loading never ends.
I however get no errors in server console. Unfortunately, the error gives me little understanding as to where to even start debugging my app from.
I have gone through the portion where the error is thrown in the mongo.js file, but I don't get what's going on there from it either.
Since I do not have any idea where I am going wrong, this is the link to the project repository.
Maybe you was use fast-render package and doing 2 subscriptions for the same publication as explined here
Hope this help someone.

Object #<Text> has no method 'getBoundingClientRect' on XAJAX

recently, I'm getting very strange error using the libraries XAJAX. Everything seems to work correctly, but Chrome console gives me an error every time I run any element.
The page where I is happening is this:
http://es.woow360.com/
For example clicking on any tab business that appears in the search box it does is load a new panoramic generates this error:
Uncaught TypeError: Object #<Text> has no method 'getBoundingClientRect'
WombatUtils.getElementRect
M
U
Y
CrossbrowserMutationObserver.n
d.callbackWrapper
xajax.dom.assign xajax_core.js:210
(anonymous function) xajax_core.js:318
xajax.command.handler.call xajax_core.js:315
xajax.executeCommand xajax_core.js:404
xajax.tools.queue.process xajax_core.js:150
xajax.responseProcessor.xml xajax_core.js:165
xajax.responseReceived xajax_core.js:399
oRequest.request.onreadystatechange xajax_core.js:356
Here you have the link to the file where error occurs:
http://es.woow360.com/xajax/xajax_js/xajax_core.js
It's very strange. Until recently it worked fine.
But now fails.
It fails only on this page, also I have other pages that use the same library, and gives the same error.
Even in other domains, where I have loaded the library XAJAX gives the same error.
Not to be that.
The strange thing is that except for the error message, everything works fine.
Any idea?
Thank you!
I've got the same errors/warnings. Add-less chrome extension was the issue. Try to review extensions of your chrome.

What does view-response.js in Chrome do?

When loading a page (200 OK response header), I received an error in the HTTP response add-on for Firefox:
[Exception... "File error: Not found" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://view-response/content/view-response.js :: sendRequest :: line 186" data: no]
What does that file do? (Contents pasted into JSBin here, notice how semicolons are missing.)
I was able to open it in Firefox and not just Chrome (but not Opera and IE).
That's an error with the plugin internal code, nothing to do with your code. The chrome:// is a little misleading, it's nothing to do with Google Chrome, Mozilla refers to elements of their UI engine as the "chrome".
The error is specifically around the line:
xhr.send(valueOfElement("body-textarea"))
Which is an ajax request initiated on this line:
xhr.open(valueOfElement("method-select"), valueOfElement("uri-input"), true)
...and since you are getting NS_ERROR_FILE_NOT_FOUND I presume the that URL return by the function call valueOfElement("uri-input") is returning a 404 or may be an invalid URL.
The lack of semi-colons in the JS file is (IMO) bad practice, but nothing to do with the error.
Long story short: ignore the error, there's nothing you can do about it except for add some error handling and rebuild the plugin package, which you probably can't do in a meaningful way unless you wrote the plugin.
It has nothing to do with your site code.

Categories