Basically in my error log i see lots of:
mysite/undefined (with referer ing from random pages of the website)
User-Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1
(and some other user agent)
I have of course checked HTML or DOM for links with /undefined
or something like that and there is just nothing. I have checked network tab with developer tools and on those page nothing requests /undefined
(with my chrome).
I have then setted a javascript logger to save any error that e up. And in the log there isn't nothing that throws undefined or something like that...
This is driving me crazy. Of course if i go on tihs page with my chrome, javascript doesn't print any error
Notice: i have read everything here
Edit
Notice2: Beside that javascript error logger I have added an eventlistener (as explained in the answer linked)
$("body").on("click", "a[href$='undefined']", function() {
window.onerror('Bad link: ' + $(this).html()); //alert home base
});
And this never get triggered. (I have tested it with a manual /undefined link and the logger works)
Also I found this topic on google groups. Webmaster there are experiencing the same problem but no one has managed to nail down to the cause.
Maybe it's some extension on chrome or any other browser that causes this requests.
Basically in my error log i see lots of:
mysite./undefined (with referer ing from random pages of the website)
User-Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1
(and some other user agent)
I have of course checked HTML or DOM for links with /undefined
or something like that and there is just nothing. I have checked network tab with developer tools and on those page nothing requests /undefined
(with my chrome).
I have then setted a javascript logger to save any error that e up. And in the log there isn't nothing that throws undefined or something like that...
This is driving me crazy. Of course if i go on tihs page with my chrome, javascript doesn't print any error
Notice: i have read everything here
Edit
Notice2: Beside that javascript error logger I have added an eventlistener (as explained in the answer linked)
$("body").on("click", "a[href$='undefined']", function() {
window.onerror('Bad link: ' + $(this).html()); //alert home base
});
And this never get triggered. (I have tested it with a manual /undefined link and the logger works)
Also I found this topic on google groups. Webmaster there are experiencing the same problem but no one has managed to nail down to the cause.
Maybe it's some extension on chrome or any other browser that causes this requests.
Share Improve this question edited May 23, 2017 at 11:49 CommunityBot 11 silver badge asked Sep 12, 2012 at 17:46 dynamicdynamic 48.1k56 gold badges161 silver badges236 bronze badges 12- 2 Can you post a link to your page? – Mike Robinson Commented Sep 12, 2012 at 18:01
- Can you use an unminified version of the page for testing? – Andrew Morton Commented Sep 12, 2012 at 18:17
- The real problem is that i don't see in the javascript error the page that is one referer of that 404 =/ – dynamic Commented Sep 12, 2012 at 18:18
-
You appear to have an
<input>
withid=""
- the one on the left. It may not be interfering with your javascript, but why take the chance? ;) – Andrew Morton Commented Sep 12, 2012 at 18:21 - 1 You might want to run those pages through validator.w3 - there are a couple of errors you may want to correct. – Andrew Morton Commented Sep 12, 2012 at 18:42
3 Answers
Reset to default 5 +25Presumably you are using window.onerror
and logging an error in that function.
If a javascript error happens on a different domain (e.g. from some social buttons, an iframe, a cross-domain javascript, or possibly a browser extension), window.onerror could actually betray sensitive information in the error report. So for security reasons, cross-domain errors will still call the function, but all the parameters (including the url) will be undefined, and the message will just be a generic "Script error." I would guess you are having cross domain errors, and they're being logged as undefined.
Take another look at that Google Group thread you linked to. Just recently one of the members managed to figure a way to disable the plugin/malware that appears to be causing the errors:
To disable the malware and stop "undefiend" requests, apply this to every page with a search field on your site:
<script type="text/javascript"> window.suggestmeyes_loaded = true; </script>
It sounds like this is most likely an ajax request using "/" + variable
and variable
happens to be undefined instead of say user
. Are you using a library for your AJAX calls? perhaps you could try to catch the invalid url in there as well.