47

I would like to remove all the ERR_BLOCKED_BY_CLIENT errors I get due to AdBlock, so I thought the Filter field would be appripriate but I can't use it to reverse filter.

enter image description here

Basically what I want is ... | grep -v ERR_BLOCKED_BY_CLIENT

49

Nowadays Chrome has an exclusion mechanism in its filter box:

-net::ERR_BLOCKED_BY_CLIENT

This removes all console errors that block access to network resources. These errors are usually caused by ad blockers and similar scripts. But watch out, this can also be caused by service workers on your own site.

As a more thorough solution, you might want to block the output generated by all extensions. This also leaves less chance for false positives.

Located at the top-right corner of the console there's a cog wheel to manage console settings. The option Selected context only ignores all of the nested browser extension contexts. Below some example screenshots.

Settings with Selected context only disabled:

Settings with "Selected context only" disabled

Settings with Selected context only enabled:

Settings with "Selected context only" enabled

| improve this answer | |
  • (?!.*BLOCKED_BY_CLIENT) is sufficient (for the superlazyuser). – Scott Weaver Jan 20 '17 at 19:33
  • No, it doesn't. Did you turn on regex? And did you check other output not being deleted as well? Your solution filters out all console output when regex is disabled, and filters nothing when regex is enabled. – Guido Bouman Jan 24 '17 at 10:29
  • 7
    Chrome changed the way this works, you'll need to surround the regex with forward slashes: /^(?!net::ERR_BLOCKED_BY_CLIENT).*$/ – camomileCase Oct 6 '17 at 21:03
  • how do I hide the following message Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist. – Ahmed Eid Nov 24 '18 at 10:26
  • That looks like an error from a specific website. Just filtering the error doesn't seem like a great idea. If you're really sure you want to filter that, you could do this: /^(?!lastError: Could not establish connection\. Receiving end does not exist\.).*$/ – Guido Bouman Nov 26 '18 at 9:47
30

Mac Pro (Retina, 13-inch, Early 2013) OSX: 10.10.5 Chrome: 46.0.2490.71 (64-bit)

  1. Open 'Console' and right click on the Error log you do not want to see.
  2. Click on 'Filter'-> 'Hide message from xxx.js'

Screenshot
(Click image to enlarge)

| improve this answer | |
  • Also working nicely on Windows. – Stijn Geukens Nov 22 '16 at 9:41
  • 1
    but fails with source maps (all messages are from one huge vendor.js) – oluckyman Jan 16 '17 at 19:07
  • 1
    How do you cancel that? I believe I just clicked it by mistake and I don't see any filter enabled. => Ok, found it, gotta click on another message -> filter -> unhide all – Vadorequest Mar 20 '18 at 18:11
  • Cannot find "unhide all" on the last Chrome version... – Emaborsa Oct 10 '18 at 13:30
4

I found that right-clicking on each message allows to hide it, but this doesn't work for scripts with autogenerated file names.

right click in dev console to hide a script

Edit: There is a "hide network messages" option now (the gods of Google Chrome answered our prayers :D):

Before:

Before

After:

After

| improve this answer | |
  • Am I crazy, or did the ability to do this go away in the latest version of Chrome? – Jason Jun 11 '14 at 0:51
  • Still here in Chrome 35 – Dorian Jun 11 '14 at 19:18
  • I'm on Mac. Maybe that's a difference? – Jason Jun 11 '14 at 19:20
  • I'm on Mac too ;) – Dorian Jun 11 '14 at 19:28
  • 3
    Looks like I'm crazy. Weird. When I right click all I get is the "Unhide All" option greyed out. No list of files. – Jason Jun 11 '14 at 20:28
2

While it is less specific, I find that I can click the gear icon and check the "Hide Network" checkbox. What's more, this setting persists for new instances of the console and across restarts. Filters do not.

So while the filter is good if you just want to shut it off temporarily, this option removes these errors by default.

| improve this answer | |
0

Same thing for me(( Chrome version 36, Windows 8 clicked exactly on a log message many times

| improve this answer | |
0

You cannot filter out console errors (in red) using the filter option.

Your best option is to either wait for an update of the extension which solves the problem, or find an alternative extension that does the same thing, or manually download the extension, unpack it, change the code that causes the error, then pack it back and install it.

Recent versions of Chrome seem to have reverse filter as mentioned in Guido Bouman's answer.

| improve this answer | |
  • Thanks I guess I will just wait, I found that right clicking on each error message can allow me to "hide" them, but most of the files are analytics files (blocked by AdBlock) and the file names are auto generated but this method works for only a few analytics providers. – Dorian Apr 20 '14 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.