1

The title pretty much says it all. I uploaded this HTML file to 2 domains:

<script type="text/javascript">
console.log('test');
alert('test');
</script>

On both domains, I get the alert that pops up. But on 1 domain, the console message is never logged. I tried on different computers.

I did this test because as I was working I noticed my messages were no longer coming in. After trying every setting in Chrome, I finally uninstalled Chrome and re-installed but the problem persisted. Finally, I changed computers and the problem persists on this computer.

I can't imagine what the problem is. It can't be anything in HTML file (as the file is as simple as it gets) and I tried on 2 systems soooo... is my domain somehow blocked somewhere? Has anyone ever heard of an issue like this?

Andrew
  • 2,691
  • 6
  • 31
  • 47
  • There isn't any other code, or an extension, overwriting `console.log`, is there? – Scimonster Dec 01 '14 at 20:50
  • The HTML file contains the above code only... – Andrew Dec 01 '14 at 20:50
  • But maybe there's an extension? – Scimonster Dec 01 '14 at 20:51
  • If it were an extension it would affect both domains, unless the extension is targeting a specific one. And it would have had to of been installed on both of the different systems he tested it on. – Kevin B Dec 01 '14 at 20:51
  • @Kevin OP never said they were the same website – Phil Dec 01 '14 at 20:54
  • @KevinB, yes exactly. It's a really weird problem and I was positive it was just a bug. But to happen on 2 computers is weird. – Andrew Dec 01 '14 at 20:54
  • It's 2 websites - 1 is working as expected. The other site messages are not showing from 2 different computers – Andrew Dec 01 '14 at 20:55
  • 2
    Are they publicly accessible? maybe we can help you debug – Phil Dec 01 '14 at 20:57
  • If you go to these websites, and open the javascript console, and type `console` do you get a the same object in both? As others have mentioned, it sounds like your `console` object or `console.log` function are being overridden by an external script or extension. – cjspurgeon Dec 01 '14 at 20:59
  • Is the one that isn't working being proxied through something like cloudflare, or anything else that may be modifying the src returned to the client? have you inspected using View Source? – Kevin B Dec 01 '14 at 21:05
  • The one that isn't working is on a local server running MAMP. The one that is working is running off Unix server. But the 2nd was just a test, it seems console is working just not on this specific domain running off my local server. – Andrew Dec 01 '14 at 21:07
  • As a test, I just made the domain point to a remote server (instead of my local server), uploaded the same script, and it worked. I then updated my hosts file so it points back to my local and boom, it's working. It seems this somehow refreshed something. However, this only worked on 1 computer. I tried the trick on the first computer and still not working... super weird. – Andrew Dec 01 '14 at 21:09
  • Having the same problem and it's driving my crazy! The console is not working only for my localhost:8081. There are no filters, I've tried a clean Chrome profile, nothing works. I can type anything on the console, it won't work. If I open any other website, type something, open my localhost:8081 without closing the console and type somthing, it still won't work. Then I change between "Elements" and "Console" and then I can read what I've entered. For now, I'm using Chrome Canary ... :( – André Gil Dec 02 '14 at 16:43
  • After weeks of suffering, I've found that Chrome 39.0.2171.95 console, for some reason, stops working when you load files with % inside parameters. I had `` to replace `%VERSION%` later during build and had to change it to something else. I hope it helps somebody! – André Gil Jan 07 '15 at 16:29

1 Answers1

0

Is this happening?

Click “All” on the bottom toolbar. Currently it is showing errors only.

Similar Question, this may help you

Community
  • 1
  • 1
Rafael
  • 7,605
  • 13
  • 31
  • 46