Live data from Hacker News

Adblockers as the reason for InvalidAccessError

wwwtech.de

1–10 of 47 posts

Re: Adblockers as the reason for InvalidAccessError

#3
This is not mentioned in the article, so just to be more specific, the override of `XMLHttpRequest.open()` applies only for the Safari-specific code of the extension.[1]

[1] See https://github.com/chrisaljoudi/uBlock/tree/master/platform/..., the code is in `vapi-client.js`, line 247.

Re: Adblockers as the reason for InvalidAccessError

#4
It has been the case for years now that you really have to include ad and tracking blockers for browsers in your testing process somewhere, even if it's just a manual run-through in the smoke test section. Though I think that more than that is needed; e.g. adblock-enabled pools in your Selenium grid.

You really have to start from the bottom up assuming that things are going to get blocked for some people and build in graceful degradation of performance:

https://www.exratione.com/2014/12/practice-defensive-javascr...

Though the problem in this article looks more in the way of something to be caught by a sufficiently well constructed QA process, followed by a bug filed with the ad blocker in question.

Re: Adblockers as the reason for InvalidAccessError

#5
From the article: "The ad blocker replaces XMLHttpRequest.open() by its own code and checks the request URLs for keywords on a block list. If the URL matches it would throw an InvalidAccessError."

It sounds like the ad blocker misused a regular expression and matched the string "twitter" in the wrong context. Some ad blockers just use files of regular expressions somewhat blindly. If you're looking at URLs, parse them.

Re: Adblockers as the reason for InvalidAccessError

#9
post #3

This is not mentioned in the article, so just to be more specific, the override of `XMLHttpRequest.open()` applies only for the Safari-specific code of the extension.[1] [1] See https://github.com/chrisaljoudi/uBlock/tree/master/platform/... , the code is in `vapi-client.js`, line 247.

Direct link: https://github.com/chrisaljoudi/uBlock/blob/master/platform/...

Re: Adblockers as the reason for InvalidAccessError

#10
post #6

Ive been burned on this enough times where I know that any weird error that doesn't have an explanation, automatically turn off adblock. 9 times out of 10... works

I thought it was standard to open up an incognito window with everything disabled when debugging.
Post reply on HN