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
,
Feb 27 2017
I can reproduce this error on the default new tab page. Are you saying you can't reproduce this?
,
Feb 27 2017
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)
,
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.
,
Feb 27 2017
The extension developer replied to me saying they'll fix it in the next version of their extension.
,
Feb 27 2017
Thank you for finding the real culprit. |
||
►
Sign in to add a comment |
||
Comment 1 by woxxom@gmail.com
, Feb 27 2017