-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
TypeError null is not an object (evaluating 'elt.parentNode') #756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Well, if "ruling out" means "can't find any references to it" in code, It might be caused by a 3rd-party browser extension or browser malware. |
@benvinegar Ok, I will assume it's from a browser extension then, thanks. Is there a way to somehow avoid browser extensions from triggering sentry errors? |
Sorry to bother you, but I'm seeing the exact same issues since I've installed Prebid.js on my website. I caught errors in a dedicated script, but I can't figure out what is causing this. Do you have more info in your Sentry's log? |
I got the same issue also on iOS/Safari with an Angular application. No way to track this down. |
@suavelizard do you manage to see it in your console? If so, can you point us to a demo of your application? I'll narrow it down :-) |
No I'm also only getting it through Sentry
I think it may be something to do with an input field. |
Same thing in my debug code, line 1, column is random, on the main url. Seems like an inline code... And a real bug in iOS, for a specific Javascript code. |
Breadcrumbs:
|
i'm not using sentry but my own little window.onerror handler is sending me the same message, coming from an ipad running safari, as i've got only one js file I think I tracked it down to this helper function
line number and column number point to this function even though in the function it's el.parentNode and not elt.parentNode so maybe this info might help someone to track this down |
@CanRau can you run a console.log(el) to see what you have in the el.parentNode? Does this function exist in your own code or it's part of something else? Everyone here has the issue on |
hmm the thing is I got this error by mail so I can't reproduce it myself right now and just placing console.log(el) in production might lead to other issues, besides it's not my console^^ maybe you got a hint? |
I'll try the same code on a Safari of one iPhone I have here... hoping it'll trigger the same behaviour! Thanks for the code! |
I am suspecting there are 2 possible scenario's based on all the information we have:
Since manipulation of the DOM parent node is such a common thing, it would be easy to find some reference in your own (or vendor) code that has But I think the giveaway that something else is going on is the unusual And in addition, the fact that quite a few people have found this issue since I created it, even people that don't use Sentry, leads me to believe it's quite a widespread problem, which makes it even more likely that it's something Safari or plugin specific. |
sounds valid..but my error message told me line and column which referenced the remove function above, could be coincidence though... |
I am also trying to find what causes this. We have some stats on our website that shows this started happening on October 25th, the day after Apple and Safari got updates: https://support.apple.com/en-ca/HT201222 It also happens exclusively on Safari on IOS on our side, according to the requests User-Agent |
I get a similar error message occasionally on Safari on IOS devices and they first started on Oct 26th. |
I found this post here by googling for the error... I'm not using raven but I have the same issue popping up starting at the same mentioned time. I'm using jquery, sisyphus, mixpanel, jquery.inputmask, jquery.blockUI, and bootstrap on the page and there is no elt.parentNode in ANY of those sources, I looked everywhere. At the same time I'm also seeing these errors coming in right after each other only from iPhone/iPad:
My guess is that all those errors and the elt.parentNode is caused by some adblocker... along the errors above I now constantly see from Android devices: Not sure whats going on, those errors started popping up over the last 2 weeks from pages that had no errors thrown since they were put live. |
Chiming in as I see the same problem on prod sites + have some supplemental info + this thread is the #1 result on Google.
I'd wager this is an iOS 8 Safari specific issue, for some code that's written in JS and injected into the HTML. Could be someone using iOS Safari behind some corporate firewall that injects JS that is not compatible with iOS8? |
See above, seeing this exclusively on iOS 10 latest public stable (iPhone/iPad). |
Some more data from yet another website's traffic (got it via the magical sentrycli by Opera):
|
I have been receiving a lot of these same error reports as well (I do not use Sentry).
This leads me to believe Safari 600.1.4 introduced a change that broke someone's browser extension (GSA?). I plan to filter the error and ignore it. |
Just had another occurrence of this error: browser: Mobile Safari 10.0.2 (Safari/600.1.4)
I guess we can be pretty sure now that it's an issue isolated to specific versions of Safari somehow. |
Getting thousands of these errors. |
I am getting the same error for IPads |
I'm getting this issue too. Similar report at https://discuss.newrelic.com/t/typeerror-null-is-not-an-object-evaluating-elt-parentnode/43075. @borg4242 said he was using New Relic browser and I am also, but are all of you? Building off the comment by @bflora2, the GSA in the user agent seems very key here and I've looked at a handful of instances of my errors and this lines up. The IPs were from various home ISPs too, so some kind of appliance (especially one that could MITM and add code) wouldn't make sense. http://superuser.com/questions/739863/ipad-user-agent-changes-depending-on-location-work-home indicates that GSA means Google Search App on iOS. The errors I'm getting are all from iOS 10.0-10.1.1 so this would make perfect sense. I'm not sure how the app works, but maybe it can inject code into the web view and perhaps that's what's erroring out. I fired up the simulator to try and reproduce this initially, but since it seems GSA related, I can't test without an actual iOS device since you can't install apps in the simulator. Anybody care to verify this hypothesis? |
I'm seeing the same elt.parentNode in my bug reports. Always GSA on iOS. Like wuservices, I don't have a device to test this on. |
Just wanted to add to this. I'm using Rollbar for my monitoring, and I'm also catching this error on iPhones. No trace of this particular reference in the project code however. |
Here is one more GSA. In last 100 events in our project the most repeated one was GSA/21.1.139288856. |
Seems to be related to zoom in/out in the GSA. Whenever I zoom in/out my website, this event triggered. |
We ran into same issue, it happen when open page with Google app for iphone https://itunes.apple.com/us/app/google-app-search-made-just/id284815942?mt=8 But website working just fine, so we just ignore it |
We're hitting our quota in Sentry due to so many of these events. Is there a way to filter this event? Ignoring the event still counts toward the quota. |
Raven.config('https://<key>@sentry.io/<project>', {
shouldSendCallback: function (data) {
// do something with data.exception
}
}).install(); |
Why not
Intuitively I would expect ignoring at this level should prevent the event being sent, while ignoring from the Sentry dashboard would stop it from cluttering the UI but still count towards the quota? |
This is correct. |
I'm going to investigate adding something to our 3rd-party inbound filter to reject this, probably on user agent match ( Any comments/objects on that? Note that events filtered by our official filters do not count towards your organization quota. |
@benvinegar I think that'd be great, it seems this error is captured by a lot of apps out there and is basically just noise that we can't really do anything about anyway in our apps. I was going to create an ignore rule for it in all my apps, but if it can be done on a Sentry level that'd be excellent. |
Yeah, I'm just debating how to put this in our filters. e.g. do we add Google Search app as a "legacy browser", giving you the ability to reject all errors from that browser? Or do I add an entry for I'm leaning towards the latter: this is not a 3rd-party extension per-say, but it's probably more in line with what people expect from that filter (throw out errors that don't belong to them). |
I agree, judging by the responses in this thread, this error seems to be unique enough to make it safe to filter on the The only risk is that it would block legitimate errors if someone uses the |
I comment in getsentry/sentry#4823 about this. TL;DR the risk is low because this is a Safari-specific error message, so if you had a legitimate error with the same variable/property names, it would manifest in other more popular browsers. |
So, getsentry/sentry#4823 is now merged, which means that as soon as it deploys (within hours), you can enable the "Filter out errors known to be caused by browser extensions" inbound filter to filter/suppress this error. It will not count towards your quota. You can find this at: Project → Project Settings → Inbound Filters |
Hi knorthfield, try zooming in/out in the GSA. Whenever I simply zoom in/out my website with no browser extensions, this event triggered, hope this help. |
After a few hours of "investigation", I accidentally found out that the only way you can reproduce this bug is simply downloading "Google Search" on your iPhone. I guess someone has figured it out. |
I'm getting multiple |
i was getting the same error for drag drop library, it was specific for safari 14 version, i think its variable type issue, code which was used by library was this has resolved my problem, i hope this helps someone else as well. |
I have started getting some error reports in Sentry from our JS app which look like this:
TypeError null is not an object (evaluating 'elt.parentNode')
Problem is, that nowhere in our own source code, nor in our vendor source code, can I find a single instance of
elt.parentNode
in the code.Also, Sentry seems to have a hard time reporting the source of the error as well:
This doesn't actually point to any JS code, just the rendered HTML of our SPA.
And in the breadcrumbs, it just gets repeated several times:
In short, I have no idea where this error is coming from, and I am suspecting it might be generated by Sentry itself somehow, as I can't find any references to it in our own code.
Any suggestions on how to analyse this further and/or rule out Sentry/ravenjs as the source of this issue?
The text was updated successfully, but these errors were encountered: