Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

I have still problems using my JavaScript Console together with my Google Chrome Browser.

At the moment I get about 5532 time a warning in the console that says something like

StringUtils.htmlEscape is deprecated. Use _.escape instead. o @ workspace-editor.min-d7fe2c1….js:270 (anonymous) @ workspace-editor.min-d7fe2c1….js:288 (anonymous) @ workspace-editor.min-d7fe2c1….js:288 r @ workspace-editor.min-d7fe2c1….js:288 o @ workspace-editor.min-d7fe2c1….js:288 h @ workspace-editor.min-d7fe2c1….js:288 i.getHints @ workspace-editor.min-d7fe2c1….js:288 l @ workspace-editor.min-d7fe2c1….js:275 m @ workspace-editor.min-d7fe2c1….js:275 u @ workspace-editor.min-d7fe2c1….js:275 c._handleEditorChange @ workspace-editor.min-d7fe2c1….js:275 dispatch @ static.teamtreehouse.com/assets/workspaces/editor-dependencies-b03e9e7a18a62b6a7b134a809cd91247.js:11 v.handle @ static.teamtreehouse.com/assets/workspaces/editor-dependencies-b03e9e7a18a62b6a7b134a809cd91247.js:11 trigger @ static.teamtreehouse.com/assets/workspaces/editor-dependencies-b03e9e7a18a62b6a7b134a809cd91247.js:11 triggerHandler @ static.teamtreehouse.com/assets/workspaces/editor-dependencies-b03e9e7a18a62b6a7b134a809cd91247.js:11 (anonymous) @ workspace-editor.min-d7fe2c1….js:276 zn @ static.teamtreehouse.com/assets/workspaces/editor-dependencies-b03e9e7a18a62b6a7b134a809cd91247.js:44 te @ static.teamtreehouse.com/assets/workspaces/editor-dependencies-b03e9e7a18a62b6a7b134a809cd91247.js:43 le @ static.teamtreehouse.com/assets/workspaces/editor-dependencies-b03e9e7a18a62b6a7b134a809cd91247.js:43 t @ static.teamtreehouse.com/assets/workspaces/editor-dependencies-b03e9e7a18a62b6a7b134a809cd91247.js:43 nrWrapper @ 24149482:6 workspace-editor.min-d7fe2c1….js:270 StringUtils.htmlEscape is deprecated. Use _.escape instead.

<

When I clear the console there stands undefined.

Has this something to do with the Internet Connection to the server maybe???

I do not understand the problem - can anybody help?

Sorry: ''' I still have problems ... """ I ´m austrian (german language)

7 Answers

Mike Hickman
Mike Hickman
19,817 Points

Hi,

I'm a little late to the party, but it sounds like you might be sometimes using the console from your Treehouse workspace and sometimes using the Chrome developer console. If that's the case (not sure, just can't hurt to check), they are two completely separate things, so Treehouse items from your workspace window will not work in your main Chrome Console, and when opening up files on your computer (like the index.html file First Last asked you to make on your machine), you won't be able to see that data within the Treehouse console in workspaces.

I hope that makes sense. I don't know why you're getting all those errors, but they pretty much shouldn't say anything about Treehouse (which they do), if you were opening the index.html file he asked you to make on your computer and just opened it in chrome.

Hope you get up and running.

Cheers,

Mike

Hi Mike,

thanks. I want to use the treehouse Workspace and the console I get pressing the Shift, the String and the J button together - but it doesn´t work yet.

The Teacher Dave McFarland instructed us to do so.

Hi Sabine Kroess,

could you maybe give us more info on where this error occurs, is it on a specific page? Do you get this on every page you visit? Do you have chrome extentions installed which might cause this?

I don´t think that I have chrome extensions installed. I just Installed Chrome yesterday (default version) to have a JavaScript Console working. I am just a beginner in JavaScript (or in programming in general) and yesterday I could neither get the JavaScript Console to work with Edge nor with Mozilla Firefox (with Firefox partially - but not always). In Google Chrome the Console first worked well - then failed - after restarting the computer and performing a disc cleanup of my windows 10 Computer it worked well again firstly - now the function of the console is broken again. I get often the message undefined whenever I attempt to "console.log" some data from a JavaScript file to the console (with many different workshops so far). Sometimes when I try to do it again it suddenly works - sometimes not. The time before the last time I got 327 (or so) warnings with the weird text from above. The last time it was over 5200 (and something warnings). I don´t know what is wrong. Has it something to do with increase traffic to the TeamTreahouse server - is it something "athmospherical" (the weather or so) that limits data transfer via satelite??? Do you know???

Try this, open notepad, paste the following and save it as index.html somewhere. Then open console and tell us what you see.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>console.log("Hello World!")</script>
</head>
<body>

</body>
</html>

I got 7 Errors and 7 Warnings and the following Text:

workspace-editor.min-d7fe2c1….js:270 CodeMirror mode "text/plain" is already used by language Text - cannot fully register language Subtitles using the same mode. Some features will treat all content with this mode as language Text i @ workspace-editor.min-d7fe2c1….js:270 (anonymous) @ workspace-editor.min-d7fe2c1….js:270 f @ editor-dependencies-b03e9e7….js:11 add @ editor-dependencies-b03e9e7….js:11 h @ workspace-editor.min-d7fe2c1….js:270 (anonymous) @ workspace-editor.min-d7fe2c1….js:271 (anonymous) @ workspace-editor.min-d7fe2c1….js:268 r @ workspace-editor.min-d7fe2c1….js:268 (anonymous) @ workspace-editor.min-d7fe2c1….js:271 execCb @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 each @ editor-dependencies-b03e9e7….js:78 emit @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 each @ editor-dependencies-b03e9e7….js:78 emit @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 each @ editor-dependencies-b03e9e7….js:78 emit @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 enable @ editor-dependencies-b03e9e7….js:78 init @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ workspace-editor.min-d7fe2c1….js:269 execCb @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 enable @ editor-dependencies-b03e9e7….js:78 init @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 nrWrapper @ 24149482:6 workspace-editor.min-d7fe2c1….js:270 Cannot register file extension "txt" for Subtitles, it already belongs to Text u.addFileExtension @ workspace-editor.min-d7fe2c1….js:270 n @ workspace-editor.min-d7fe2c1….js:270 (anonymous) @ workspace-editor.min-d7fe2c1….js:270 f @ editor-dependencies-b03e9e7….js:11 add @ editor-dependencies-b03e9e7….js:11 h @ workspace-editor.min-d7fe2c1….js:270 (anonymous) @ workspace-editor.min-d7fe2c1….js:271 (anonymous) @ workspace-editor.min-d7fe2c1….js:268 r @ workspace-editor.min-d7fe2c1….js:268 (anonymous) @ workspace-editor.min-d7fe2c1….js:271 execCb @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 each @ editor-dependencies-b03e9e7….js:78 emit @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 each @ editor-dependencies-b03e9e7….js:78 emit @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 each @ editor-dependencies-b03e9e7….js:78 emit @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 enable @ editor-dependencies-b03e9e7….js:78 init @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ workspace-editor.min-d7fe2c1….js:269 execCb @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 enable @ editor-dependencies-b03e9e7….js:78 init @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 nrWrapper @ 24149482:6 224149482:6 OPTIONS https://fs-xokexkq767.treehouse-app.com/stat/ 502 (Bad Gateway) nrWrapper @ 24149482:6 send @ editor-dependencies-b03e9e7….js:12 ajax @ editor-dependencies-b03e9e7….js:12 e.ajax @ editor-dependencies-b03e9e7….js:51 e.ping @ editor-dependencies-b03e9e7….js:51 a @ workspace-editor.min-d7fe2c1….js:289 (anonymous) @ workspace-editor.min-d7fe2c1….js:289 execCb @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 each @ editor-dependencies-b03e9e7….js:78 emit @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 each @ editor-dependencies-b03e9e7….js:78 emit @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 each @ editor-dependencies-b03e9e7….js:78 emit @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 each @ editor-dependencies-b03e9e7….js:78 emit @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 enable @ editor-dependencies-b03e9e7….js:78 init @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 (anonymous) @ workspace-editor.min-d7fe2c1….js:269 execCb @ editor-dependencies-b03e9e7….js:78 check @ editor-dependencies-b03e9e7….js:78 enable @ editor-dependencies-b03e9e7….js:78 init @ editor-dependencies-b03e9e7….js:78 (anonymous) @ editor-dependencies-b03e9e7….js:78 nrWrapper @ 24149482:6 24149482#:1 XMLHttpRequest cannot load https://fs-xokexkq767.treehouse-app.com/stat/. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://teamtreehouse.com' is therefore not allowed access. The response had HTTP status code 502. 224149482:6 OPTIONS https://fs-xokexkq767.treehouse-app.com/stat/ 502 (Bad Gateway) nrWrapper @ 24149482:6 send @ editor-dependencies-b03e9e7….js:12 ajax @ editor-dependencies-b03e9e7….js:12 (anonymous) @ editor-dependencies-b03e9e7….js:51 nrWrapper @ 24149482:6 24149482#:1 XMLHttpRequest cannot load https://fs-xokexkq767.treehouse-app.com/stat/. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://teamtreehouse.com' is therefore not allowed access. The response had HTTP status code 502. workspace-editor.min-d7fe2c1….js:270 StringUtils.htmlEscape is deprecated. Use _.escape instead. o @ workspace-editor.min-d7fe2c1….js:270 g @ workspace-editor.min-d7fe2c1….js:275 (anonymous) @ workspace-editor.min-d7fe2c1….js:281 r @ workspace-editor.min-d7fe2c1….js:268 o @ workspace-editor.min-d7fe2c1….js:268 s @ workspace-editor.min-d7fe2c1….js:289 (anonymous) @ workspace-editor.min-d7fe2c1….js:289 ajax.success @ editor-dependencies-b03e9e7….js:51 f @ editor-dependencies-b03e9e7….js:11 fireWith @ editor-dependencies-b03e9e7….js:11 r @ editor-dependencies-b03e9e7….js:12 (anonymous) @ editor-dependencies-b03e9e7….js:12 nrWrapper @ 24149482:6 workspace-editor.min-d7fe2c1….js:275 addMenuItem(): missing required parameters: command f.addMenuItem @ workspace-editor.min-d7fe2c1….js:275 (anonymous) @ workspace-editor.min-d7fe2c1….js:281 r @ workspace-editor.min-d7fe2c1….js:268 o @ workspace-editor.min-d7fe2c1….js:268 s @ workspace-editor.min-d7fe2c1….js:289 (anonymous) @ workspace-editor.min-d7fe2c1….js:289 ajax.success @ editor-dependencies-b03e9e7….js:51 f @ editor-dependencies-b03e9e7….js:11 fireWith @ editor-dependencies-b03e9e7….js:11 r @ editor-dependencies-b03e9e7….js:12 (anonymous) @ editor-dependencies-b03e9e7….js:12 nrWrapper @ 24149482:6 workspace-editor.min-d7fe2c1….js:270 StringUtils.htmlEscape is deprecated. Use _.escape instead. o @ workspace-editor.min-d7fe2c1….js:270 g @ workspace-editor.min-d7fe2c1….js:275 (anonymous) @ workspace-editor.min-d7fe2c1….js:281 r @ workspace-editor.min-d7fe2c1….js:268 o @ workspace-editor.min-d7fe2c1….js:268 s @ workspace-editor.min-d7fe2c1….js:289 (anonymous) @ workspace-editor.min-d7fe2c1….js:289 ajax.success @ editor-dependencies-b03e9e7….js:51 f @ editor-dependencies-b03e9e7….js:11 fireWith @ editor-dependencies-b03e9e7….js:11 r @ editor-dependencies-b03e9e7….js:12 (anonymous) @ editor-dependencies-b03e9e7….js:12 nrWrapper @ 24149482:6 workspace-editor.min-d7fe2c1….js:270 StringUtils.htmlEscape is deprecated. Use _.escape instead. o @ workspace-editor.min-d7fe2c1….js:270 g @ workspace-editor.min-d7fe2c1….js:275 (anonymous) @ workspace-editor.min-d7fe2c1….js:281 r @ workspace-editor.min-d7fe2c1….js:268 o @ workspace-editor.min-d7fe2c1….js:268 s @ workspace-editor.min-d7fe2c1….js:289 (anonymous) @ workspace-editor.min-d7fe2c1….js:289 ajax.success @ editor-dependencies-b03e9e7….js:51 f @ editor-dependencies-b03e9e7….js:11 fireWith @ editor-dependencies-b03e9e7….js:11 r @ editor-dependencies-b03e9e7….js:12 (anonymous) @ editor-dependencies-b03e9e7….js:12 nrWrapper @ 24149482:6 workspace-editor.min-d7fe2c1….js:270 StringUtils.htmlEscape is deprecated. Use _.escape instead. o @ workspace-editor.min-d7fe2c1….js:270 g @ workspace-editor.min-d7fe2c1….js:275 (anonymous) @ workspace-editor.min-d7fe2c1….js:281 r @ workspace-editor.min-d7fe2c1….js:268 o @ workspace-editor.min-d7fe2c1….js:268 s @ workspace-editor.min-d7fe2c1….js:289 (anonymous) @ workspace-editor.min-d7fe2c1….js:289 ajax.success @ editor-dependencies-b03e9e7….js:51 f @ editor-dependencies-b03e9e7….js:11 fireWith @ editor-dependencies-b03e9e7….js:11 r @ editor-dependencies-b03e9e7….js:12 (anonymous) @ editor-dependencies-b03e9e7….js:12 nrWrapper @ 24149482:6 workspace-editor.min-d7fe2c1….js:274 Deprecated: resizable panels should be created via PanelManager.createBottomPanel(). Using Resizer directly will stop working in the future. Element: [div#console.vert-resizable.top-resizer, prevObject: init[1], context: undefined] s @ workspace-editor.min-d7fe2c1….js:274 m @ workspace-editor.min-d7fe2c1….js:280 o @ workspace-editor.min-d7fe2c1….js:289 f @ editor-dependencies-b03e9e7….js:11 add @ editor-dependencies-b03e9e7….js:11 ready @ editor-dependencies-b03e9e7….js:10 s @ workspace-editor.min-d7fe2c1….js:289 (anonymous) @ workspace-editor.min-d7fe2c1….js:289 ajax.success @ editor-dependencies-b03e9e7….js:51 f @ editor-dependencies-b03e9e7….js:11 fireWith @ editor-dependencies-b03e9e7….js:11 r @ editor-dependencies-b03e9e7….js:12 (anonymous) @ editor-dependencies-b03e9e7….js:12 nrWrapper @ 24149482:6

Did you do this in notepad? Or in workspaces?

I pasted the html code to the notepad, then saved the file as "index.html" in a documents-folder .

And yes, when I open the console thereupon using the shortcut - there are no errors anymore.

I am not sure yet if everything is fine - but I am really tired now ( can´t think anymore clearly). So I will go to sleep and try in depth tomorrow. Thank you so far.