I keep getting this error in Firefox console.
onmozfullscreenchange is deprecated. editresume.js:411:4
onmozfullscreenerror is deprecated. editresume.js:411:4
Ignoring get or set of property that has [LenientThis] because the “this” object is incorrect.
If I go to my code file, for that line number, this is what I have
tempbutton.setAttributeNode(attid);
and, I am not using onmozfullscreenchange or onmozfullscreenerror anywhere.
Why am I getting this? It is also triggers a debugger exception for some reason, at that line number.
Note : I dont get a similar error/warning/breakpoint trigger on Chrome. So, its Firefox only.
Firefox version - 70.0
Chrome version - 77.0.X
This message may appear when logging the window or document objects and extending the resulting message in the Console.
It's because these getters are configured to warn about this deprecation so that developers can update their code accordingly.
However, this deprecation notice doesn't look at what tried to get it, so when the Console itself tries to get the value of these properties, it will also trigger the warning notification.
But your debugger exception certainly comes from somewhere else.
Related
I'm new to BDD with Jasmine. In fact, I've just downloaded Jasmine, written my first spec, and launched the SpecRunner.html file. I have yet to write a particular init method, and in Firefox/Safari I see a nice description of this error:
(Firefox) TypeError: Object.create(...).init is not a function in file...
(Safari) TypeError: undefined is not a function (evaluating 'Object.create(Seminar).init(seminarName)') in file...
However, in Chrome I see a technically correct, but disappointingly obtuse error:
TypeError: undefined is not a function
at Object.Seminar.create (file...Seminar.js:7:39)
Is there a way to make Chrome tell me the actual name of the missing method, as opposed to just the line number and column name of where the error occurred?
Is there a way to make Chrome tell me the actual name of the missing method, as opposed to just the line number and column name of where the error occurred?
No, but looking at the line and column should tell you what it is. You can also use Chrome's Dev Tools to make it stop execution on an exception that isn't handled, which will take you right to the place where the exception occurs, when it occurs, so you can inspect things. To do that:
Open Dev Tools
Go to the Sources pane
Click this icon on the right-hand side to turn it blue:
When that icon is blue, it will make Chrome stop when an exception occurs that isn't caught (there's also a checkbox that will appear if you want to stop on exceptions that are caught).
Just doing some JavaScript stuff in google chrome (don't want to try in other browsers for now, in case this is really doing real damage) and I'm not sure why this seemed to break my console.
>var x = "http://www.foo.bar/q?name=%%this%%";
<undefined
>x
After x (and enter) the console stops working... I restarted chrome and now when I do a simple
console.clear();
It's giving me
Console was cleared
And not clearing the console. Now in my scripts console.log's do not register and I'm wondering what is going on. 99% sure it has to do with the double percent signs (%%).
Anyone know what I did wrong or better yet, how to fix the console?
A bug report for this issue has been filed here.
Edit: Feeling pretty dumb, but I had Preserve log checked... That's why the console wasn't clearing.
As discussed in the comments, there are actually many different ways of constructing a string that causes this issue, and it is not necessary for there to be two percent signs in most cases.
http://example.com/%
http://%%%
http://ab%
http://%ab
http://%zz
However, it's not just the presence of a percent sign that breaks the Chrome console, as when we enter the following well-formed URL, the console continues to work properly and produces a clickable link.
http://ab%20cd
Additionally, the strings http://%, and http://%% will also print properly, since Chrome will not auto-link a URL-link string unless the http:// is followed by at least 3 characters.
From here I hypothesized that the issue must be in the process of linking a URL string in the console, likely in the process of decoding a malformed URL. I remembered that the JavaScript function decodeURI will throw an exception if given a malformed URL, and since Chrome's developer tools are largely written in JavaScript, could this be the issue that is evidently crashing the developer console?
To test this theory, I ran Chrome by the command link, to see if any errors were being logged.
Indeed, the same error you would see if you ran decodeURI on a malformed URL (i.e. decodeURI('http://example.com/%')) was being printed to the console:
[4810:1287:0107/164725:ERROR:CONSOLE(683)] "Uncaught URIError: URI malformed", source: chrome-devtools://devtools/bundled/devtools.js (683)
So, I opened the URL chrome-devtools://devtools/bundled/devtools.js in Chrome, and on line 683, I found the following.
{var parsedURL=new WebInspector.ParsedURL(decodeURI(url));var origin;var folderPath;var name;if(parsedURL.isValid){origin=parsedURL.scheme+"://"+parsedURL.host;if(parsedURL.port)
As we can see, decodeURI(url) is being called on the URL without any error checking, thus throwing the exception and crashing the developer console.
A real fix for this issue will come from adding error handling to the Chrome console code, but in the meantime, one way to avoid the issue would be to wrap the string in a complex data type like an array to prevent parsing when logging.
var x = "http://example.com/%";
console.log([x]);
Thankfully, the broken console issue does not persist once the tab is closed, and will not affect other tabs.
Update:
Apparently, the issue can persist across tabs and restarts if Preserve Log is checked. Uncheck this if you are having this issue.
Update 2:
As of Chrome 40, this issue is fixed.
TypeError: Unable to get value of the property 'childNodes': object is null or undefinedundefined
After making a long list of modifications to my application in order to support IE8, including:
running all of the views in their compiled form through W3C validator, setting up xdomain.js proxy to support CORS API calls, making some general restructures, etc.
I was very disappointed to find out that IE8 still throws this weird error at me, while IE9 works perfectly fine.
Making changes to the Angular-seo package to prevent it from running when the client is an IE browser.
Any ideas on what can it be?.
Make sure that all your tags are closed properly. I just spent hours trying to figure out what the problem was, until I noticed this in my code:
<span>some text<span>
I finally realized I didn't close the <span> tag properly. After that everything just worked.
Without the code you are running it is a bit difficult. However there is a command to use for debugging. First you need to identify which variable might not contain an object [i.e.
"object is null or undefined"].
For example, parent, then you can use
//next look to see if parent is something
if('undefined'==(typeof parent)) alert("variable empty:parent");
Once you find something that is empty that you are expecting to be an object then you can go trace back from there. Also use a browser debugged tool, to identify the line number of the error.
Often if using the child nodes, you may not have the right level or you need to access as an array i.e. you need something like.
parent.childNodes[0].childNodes[0].value
In IE you are also dealing with unsupported functions. So getElementById will work but some other similar ones do not. Again typeof can be useful.
//next ensure function supported
if( 'undefined'==(typeof document.getElementsByClassName) ){
alert("Not Supported"); // notice ^ no () required here
//...add code to handle differently when not supported
}
This may reveal if you can use a function
IE8 is so old and non-standards compliant it doesn't support childNodes[]. http://quirksmode.org/dom/core/#t70
http://pastie.org/856698
Anyone have any idea why the script is causing this error?
Check your jQuery file to see if you don't have extra characters in there. That is the first referenced script and your error doesn't give a file.
UPDATE:
I'm not getting any errors on your site in IE8 until I press submit. Then it tells me regSubmit() is not an object, and indeed it isn't, your function is called submitReg(). Perhaps the reason you are getting errors "in IE" is simply because without a debugger loaded, non-IE browsers tend to just skip errors, whereas IE stops processing and puts up a notification.
Try installing Firebug or using Chrome, CTRL+SHIFT+J and watch and see if you get errors there now (you will if you watch the console, but processing will continue anyway).
I'm having problems with getting decent JavaScript error invormation in a Production environment.
When I'm developing I can just attach a debugger and (usually) fix the problem.
When I get the same error in a production environment however at best I see is an error report that looks like this:
Error: Object doesn't support this property or method
Url: SomePage
Line: 42
Char: 13
Which doesn't help me very much - I can't see the rendered page and so I have no idea what line 42 looks like.
Is there any way for me to log the entire rendered page contents whenever an error like this occurs? (So line 42 of the output is the line where the error occured)
While I'm at it, are there any other techniques that I can use to help with getting useful error information from JavaScript (without need to break into the debugger) - failing that is there any way that I can structure my JavaScript slightly differently to help getting decent debug information?
I'm predominantly interested in IE - this is the browser that tends to cause me most problems.
I don't think you'll be able to get the exact original HTML source of the page back in all pages and all browsers.
Regarding debugging, you could use a logging library such as log4javascript (disclaimer: I wrote it) and intersperse logging calls in your code. log4javascript enables you to send logging messages back to the server via Ajax.
Unfortunately, IE has by default the most utterly useless error reporting. The script and line number reported in the error are essentially guaranteed to be absolutely wrong. You can, however, install the IE developer tool bar (for IE7 and older, it's built into IE8) from Microsoft, which can help track down the error source.