Closed lstreamDave closed 9 years ago
Any suggestions would be appreciated.
I would check my hosts
file, if there is any misredirection for localhost. In version 2.5, we were using http://127.0.0.1 to connect to the underlying node.js web server. It was later changed to use localhost: ServerBase.cs#L24.
Here is how mine looks like:
:: in cmd
C:\>type %SystemRoot%\System32\drivers\etc\hosts
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 localhost
If you don't have 127.0.0.1 localhost
or localhost
is set to some other IP, then you can run notepad as administrator, open hosts file in it, add this line, save and logoff/logon (last step is not really necessary, but I'd do it anyway).
If you already have it there, then I will try killing node process while VS is still running:
using task manager or:
# in powershell
c:\> stop-process -name node
c:\> exit
# or cmd equivalent:
c:\> Taskkill /IM node.exe /F
After that, save .scss file in VS and see if it compiles.
If it still doesn't, then please make an SSCCE (a zipped project preferably) and I will have a look.
I'd expect a lot more tooling to break if localhost
were incorrect remapped. (Among other things; the default URLs generated by Visual Studio for projects hosted in IIS Express...)
I'd sooner believe the culprit to be the incomplete node_modules
installation I reported in
https://github.com/madskristensen/WebEssentials2013/issues/1917 and the Sass compiler breaking internally on a missing supporting file.
Thanks for the comments. am11. My hosts file did not have a localhost entry, so I added it. Then rebooted (just to be sure), but it did not correct the issue. rjgotten: I went through all your steps, which executed very easily. Again I rebooted before testing, but it did not correct the problem either.
Rather than generate and SSCCE, I can give a very easy series of steps.
The split screen should show that a Compilation Error occured, and build pane of the output window should show the missing resource error.
As you can see, I have just used a standard template, with no additional code or modifications except the type of the one file.
We made the release 2.6.13 two days ago. @madskristensen will probably be releasing it soon.
I've tried 2.6.13, still have this problem.
@lstreamDave, @ChrisTorng, do you get any other WE's node.js-based service working (less, coffeescript, sweetjs, cson, autoprefixer etc..) or are you seeing this issue with only Scss service?
I use scss only. I try to open a basic Web Application, add .less/.coffee file, get the same result. I add .md file, only get markdown: Compiling x.md
message, without error, but no output file generated, I don't know whether it is right or not.
Sorry, I’ve only tried SCSS. I haven’t had a need for the others, so I’ve never learnt anything about them.
David Legg Senior Programmer Analyst LifeStream 384 West Orange Show Road San Bernardino, CA 92408 Office: 909.885.6503 ext. 471 www.LStream.orghttp://www.bbsbrc.org/
We help save lives by connecting donors and patients through the gift of blood...give blood today!
From: Adeel Mujahid [mailto:notifications@github.com] Sent: Saturday, July 25, 2015 4:15 PM To: madskristensen/WebEssentials2013 Cc: David Legg Subject: Re: [WebEssentials2013] Version 2.6.12 in VS 2013 ultimate won't compile scss to css (#1914)
@lstreamDavehttps://github.com/lstreamDave, @ChrisTornghttps://github.com/ChrisTorng, do you get any other WE's node.js-based service working (less, coffeescript, sweetjs, cson, autoprefixer etc..) or are you seeing this issue with only Scss service?
— Reply to this email directly or view it on GitHubhttps://github.com/madskristensen/WebEssentials2013/issues/1914#issuecomment-124912173.
LifeStream Disclaimer - 2014
Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail or call 909.885.6503 and destroy all copies of the original message. We help save lives by connecting donors and patients through the gift of blood
@ChrisTorng, @lstreamDave, thanks for your replies. The reason I asked was that it may not be the issue with Scss service specifically in your environment, but all node.js based services used in WE are failing due to connectivity issue; few months ago, the internal URL has been changed from 127.0.0.1
to localhost.
to call node.js server.
I need some more information before I could figure out if that change is to blame. I work with WE2013 all day at my workplace and sometimes at home. Luckily, I haven't experience this connectivity issue thus far. Please perform the following steps to help me diagnose this issue:
cd %localappdata%\Microsoft\VisualStudio\12.0\Extensions\
Zencoding.dll
at its root. Once you get that figure out, switch back to cmd and run:cd <name-of-we2013-directory>
cd Resources\nodejs
node tools\server\we-nodejs-server.js --port 3001 --environment development
If it shows you something like Server has started in development environment
, then open Firefox, Chrome or MSEdge (any browser which renders JSON but IE :smile:) and navigate to http://localhost:3001
. If it shows you something like:
{"Success":false,"Remarks":"TypeError: Cannot read property 'toLowerCase' of undefined\n at Server.onReques ...
that would mean node.js server has no issue getting UP but our heartbeat check is failing (and localhost.
-- with period -- is to blame). In this case, I will make the ServerBase.HeartbeatCheck
fallback to localhost
(without period) and then 127.0.0.1
(and reset _address
variable accordingly in base class).
At this point, you can exit the server by pressing Ctrl+C and type exit to close the Command Prompt.
Please let us know about your findings.
Hi.
Ok, here are the results I got.
First, the command
node tools\server\we-nodejs-server.js --port 3001 --environment development failed with the message Mon, 27 Jul 2015 17:44:31 GMT => The server cannot start due to the insufficient or incorrect arguments. Exiting..
However, removing the environment argument allowed it to work. The startup message was Mon, 27 Jul 2015 17:44:40 GMT => Server has started in development environment Mon, 27 Jul 2015 17:44:40 GMT => Started listening on port 3001
I ran chrome and went to address 127.0.0.1:3001 (I hope that was correct, the instructions just said to open the browser ☺) The response in the browser was {"Success":false,"Remarks":"TypeError: Cannot call method 'toLowerCase' of undefined\n at Server.onRequest (C:\Users\leggda\AppData\Local\Microsoft\VisualStudio\12.0\Extensions\vzd4owj3.tpb\Resources\nodejs\tools\server\we-nodejs-server.js:111:70)\n at Server.emit (events.js:98:17)\n at HTTPParser.parser.onIncoming (http.js:2112:12)\n at HTTPParser.parserOnHeadersComplete as onHeadersComplete\n at Socket.socket.ondata (http.js:1970:22)\n at TCP.onread (net.js:527:27)"}
And the server reported: Mon, 27 Jul 2015 17:47:44 GMT => Request recieved: {"host":"127.0.0.1:3001","connection":"keep-alive","user-agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWeb Kit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36","accept":"/","dnt":"1","referer":"http://127.0.0.1:3001/", "accept-encoding":"gzip, deflate, sdch","accept-language":"en-US,en;q=0.8"}
This was with the WE 2.5.4 installed, although I have no issue with the SCSS files in this version.
Thanks for looking into this.
David Legg Senior Programmer Analyst LifeStream 384 West Orange Show Road San Bernardino, CA 92408 Office: 909.885.6503 ext. 471 www.LStream.orghttp://www.bbsbrc.org/
We help save lives by connecting donors and patients through the gift of blood...give blood today!
From: Adeel Mujahid [mailto:notifications@github.com] Sent: Monday, July 27, 2015 10:36 AM To: madskristensen/WebEssentials2013 Cc: David Legg Subject: Re: [WebEssentials2013] Version 2.6.12 in VS 2013 ultimate won't compile scss to css (#1914)
@ChrisTornghttps://github.com/ChrisTorng, @lstreamDavehttps://github.com/lstreamDave, thanks for your replies. The reason I asked was that it may not be the issue with Scss service specifically in your environment, but all node.js based services used in WE are failing due to connectivity issue; few months ago, the internal URL has been changed from 127.0.0.1 to localhost. to call node.js server.
I need some more information before I could figure out if that change is to blame. I work with WE2013 all day at my workplace and sometimes at home. Luckily, I haven't experience this connectivity issue thus far. Please perform the following steps to help me diagnose this issue:
cd %localappdata%\Microsoft\VisualStudio\12.0\Extensions\
cd
cd Resources\nodejs
node tools\server\we-nodejs-server.js --port 3001 --environment development
If it shows you something like Server has started in development environment, then open Firefox, Chrome or MSEdge (any browser which renders JSON but IE [cid:image001.jpg@01D0C85A.6E2EB130] ). If it shows you something like:
{"Success":false,"Remarks":"TypeError: Cannot read property 'toLowerCase' of undefined\n at Server.onReques ...
that would mean node.js server has no issue getting UP but our heartbeat check is failing (and localhost. -- with period -- is to blame). In this case, I will make the ServerBase.HeartbeatCheck fallback to localhost (without period) and then 127.0.0.1 (and reset _address variable accordingly in base class).
At this point, you can exit the server by pressing Ctrl+C and type exit to close the Command Prompt.
Please let us know about your findings.
— Reply to this email directly or view it on GitHubhttps://github.com/madskristensen/WebEssentials2013/issues/1914#issuecomment-125282386.
LifeStream Disclaimer - 2014
Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail or call 909.885.6503 and destroy all copies of the original message. We help save lives by connecting donors and patients through the gift of blood
Thanks! I edited my comment and added that missing detail subsequently. :smile:
This confirms that the issue is with localhost.
. I will prepare a fix. :)
Is there any workaround available until the fix makes it to a release?
Removing proxy server from IE settings fixes the issue (for me). I guess that due to the "dot" at the end of "localhost" is enough to get queries sent to the proxy instead to node.
(Sorry if inappropriate... just joined github to report on this).
According to @efepuntomarcos's information, instead of removing proxy setting that stops IE to connect proxy, I add "localhost." into the proxy ignore list, that also fix this problem and maintains IE's function. Thanks for this workaround.
I think @ChrisTorng comment should be promoted as "preferred workaround". Thanks, much better than my solution.
I just tried Chris Torng's solution of adding localhost. to the proxy ignore list and it works great. Definately the best workaround.
Thanks Chris.
Sadly, adding "localhost." to the proxy ignore list doesn't work for us folks that have to use "Automatically detect settings" in IE's connection settings - could you please do a hotfix release for this issue?
With the latest update (2.6.36), this workaround is not needed any more. You can delete it from IE's proxy ignore list.
After installing latest update, sccs to css fails. Returning to version 2.5.1 will fix issue. Css preview pane shows /*
Compilation Error occurred (see error list to navigate to the error location):
*/
The error list does not contain any errors, warnings or messages.
The build pane of the output window shows. 7/17/2015 3:48:36 PM: SCSS: Compiling Site.scss 7/17/2015 3:48:36 PM: Looking for resource @ http://localhost.:34853/ 7/17/2015 3:48:36 PM: Looking for resource @ http://localhost.:34853/ 7/17/2015 3:48:37 PM: Looking for resource @ http://localhost.:34853/ 7/17/2015 3:48:37 PM: Looking for resource @ http://localhost.:34853/ 7/17/2015 3:48:37 PM: Looking for resource @ http://localhost.:34853/ 7/17/2015 3:48:37 PM: Looking for resource @ http://localhost.:34853/ 7/17/2015 3:48:37 PM: Unable to find resource, aborting
I do not see any new messages in any of the system logs either.
Any suggestions would be appreciated. I think the overall package is great, so this is frustrating. Thanks.