New issue
Advanced search Search tips

Issue 696513 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2017
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

String substitution not working for console.error

Reported by james.cr...@thomsonreuters.com, Feb 27 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

Steps to reproduce the problem:
1. Type in Console "console.error('test1 %s', 'test2')"

What is the expected behavior?
Output should be "test1 test2" in a log line with error styling.

What went wrong?
Output reads "test1 %s" (i.e. no string substitution happened)

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 56.0.2924.87  Channel: stable
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 24.0 r0

 

Comment 1 by woxxom@gmail.com, Feb 27 2017

Maybe that page you're trying on has overwritten console.error. Try on other pages e.g. the default new tab page.
I can reproduce this error on the default new tab page. Are you saying you can't reproduce this?
Actually, ignore this. It turns out it was a Chrome Extension called Sonar which was redefining console.error globally and breaking this.

(https://chrome.google.com/webstore/detail/sonar/dibilcjfahbokhiodajibcajcabfjein?hl=en)

Comment 4 by woxxom@gmail.com, Feb 27 2017

Indeed, that extension incorrectly intercepts console.error and passes only the first parameter: consoleErrorFunc.call(console, text); The correct code might be consoleErrorFunc.apply(console, arguments); to pass all parameters.

Comment 5 by woxxom@gmail.com, Feb 27 2017

The extension developer replied to me saying they'll fix it in the next version of their extension.

Comment 6 by a...@chromium.org, Feb 27 2017

Status: WontFix (was: Unconfirmed)
Thank you for finding the real culprit.

Sign in to add a comment