Visual Studio Code Remote Development crashing AWS instance - visual-studio

I came across Visual Studio Remote Development crashing a AWS instance and i'm hoping to solve this by increasing the instance memory. I have not tested it out yet.
Connection is ok and I can do Remote Development with no problems but only for a few seconds.
I am using Visual Studio Code Remote - SSH 0.51.0
Anyone experiencing this?

Yes, this is a current issue. The size of the EC2 instance does not matter. At this very moment, vscode 1.46.1 just took down one of my m5.xlarge as I typed this comment. You don't need to interact, vscode will crash/hang your instance with out any effort on your part. This comment comes on the heals of many attempts/configs/adjustments/distros (cento/ubuntu) and also waiting for the next stable/nightly builds, only to observe the same effect in all cases. This is a very large issue, for now work needs to continue with the old tried and true ssh tools, I hope MS can jump in here and fix it up or show us our mistake.
Ubuntu 20.04
VScode 1.46.1
Remote SSH v0.51.0
OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020

I had the same issue when working with my Typescipt project on EC2.
Here is an answer that solved the issue for me:
https://github.com/microsoft/vscode-remote-release/issues/2692#issuecomment-852548425
If you are working on a typescript repo, I suggest trying the same:
Quoting the original answser:
I had the very same problem with VSCode connecting to my EC2 instance.
However, this wasn't the first time that I had VSCode running with an
EC2, and the other server that I had, was running smoothly. What was
the difference between my old server (that is actually still running)
and the new one? That in the old one, I was running an Apache server
with only PHP code, so basically, I was only using VSCode for setting
files and PHP.
I created a new server, started writing PHP again and everything was
going fine. The problem came when I started writing JS code in a
Node.js, and suddenly became very slow and began crashing, just with
the same symptoms described above.
So, it looks like VSCode has an extension built-in in a release called
"TypeScript and JavaScript Language Features" but you can find it
easily by looking at the extensions box and writing: "#Builtin
typescript". Find it and disable it and you'll be just fine.
However, it has downsides - mainly the coding experience would suck after you disabled the tool.
So Here is another way that is worth a shot:
According to https://github.com/microsoft/vscode-remote-release/issues/2692#issuecomment-901643826, VS Code Insider solved the issue.
So, try to download and use VS Code Insider: https://code.visualstudio.com/insiders/
UPDATE:
Nah, VS Code Insider did not work for me.
Disabling "TypeScript and JavaScript Language Features" definitely worked, at the cost of shitty coding experience.

Related

Script works on Windows Server 2003 but returns error 0x8007000e on Windows Server 2012

I've a Perl script that forks in order to use Win32::OLE to extract PNGs of slides from a Powerpoint presentation. I'm in the process of migrating it from my old server (Windows Server 2003) to a new server (Windows Server 2012). The script works fine on the old server (which has Microsoft Office 2010) but on the new server (with Microsoft Office 2016), the script bombs with an error about there not being enough storage available:
Win32::OLE(0.1712) error 0x8007000e: "Not enough storage is available to complete this operation"
I've found quite a few references to this error code, but none particularly useful. Whilst this Microsoft support article says what the problem is and what to do to fix it, I have no idea why this is suddenly an issue now I'm moving to a different server and it doesn't seem to apply to my situation.
The new server has loads of spare disk space and RAM, so there should be plenty to go around. (The old server has far less of both, but that still works.)
Could this be something to do with the new server being 64-bit?
Could it be because of the differing versions of Office?
Could Apache or Perl be configured differently by default than when installed on the old server? (It's a new installation of each, but from the same source as on the old server, and I can't find any configuration that limits memory.)
One interesting point that leads me to believe that it's something to do with the script running via Apache (v2.4.27) is that if I run it from the command line (requiring a minor modification), it works fine. Apache runs as a service and I've tried running it as the same user for which it works on the command line, and that has no impact.
I've run out of places to look and things to try now, so any help would be appreciated.
UPDATE (21 August): Since nobody seems to have any ideas, I refactored my code slightly so that it gets called via a scheduled task. That works fine, supporting my theory that it's something to do with it being run via Apache. I'll keep this question open, partly in case a solution is presented and partly in case my workaround can help anyone else who has a similar problem.

VS Xamarin Agent losing build host connection

I’m having an issue for the 3rd time now! VS loses connection to the mac build host. Trying to remember how it happened the other times I think it might be related to updates. Yesterday I updated to Parallels 12 and the new OSX version, 10.11.6. Please take a look at my pictures and let me know if you’ve been in this situation and how you solved.
The other times I fixed by try-and-error, so I have no idea about what was the actual fix…
By the way, I can ping, remote login is enabled and mono is set as allowed in the firewall.
Ping mac host:
Remote login:
Firewall:
PuTTY SSH working:
Everything said here is done:
https://developer.xamarin.com/guides/ios/getting_started/installation/windows/#Configuration
Any ideas?
Thanks!
EDIT:
Well, from the moment I posted this question to now it started to work again. But instead of closing this answer I'm gonna leave it open until we can find a solution for this. I'm not the only one facing this issue and it would be cool to document it for the next time it happens.
Here's the connection working now... :
We're including some reliability improvements on the connectivity between Visual Studio and the Mac build host as part of Xamarin for Visual Studio 4.2.0.
If you hit this issue again, please let me know what Xamarin version are you using, and also share the logs after the failing connection. (Help - Xamarin - Zip Logs).
If the issue is DNS related, you can try connecting by IP (adding the Mac manually) as suggested by #valtedero.
Another interesting test to diagnostic the issue is trying to build an iOS project from a developer command line, passing the ServerAddress, ServerUser and ServerPassword. That will try to connect to the Mac using the same mechanism used by Visual Studio without interference of editors, extensions or any other Visual Studio artifacts.
Finally, if you're not using the latest Xamarin version (currently 4.2.0) please give it a try, it does not only includes connectivity improvements, but it also improves the tracing around connectivity, which can give us valuable information to diagnostic other potential issues.
Thanks!

How to debug/investigate issues with YouCompleteMe for Windows

UPDATE
This question seeks help with tooling - "how do I debug my problem." As I type this, there has been no answers. I did end up stumbling on the solution for the actual problem I was trying to solve and have provided the solution as an answer.
I still would be more than happy to hear any answers on the tooling question though, and if somebody comes up with a workable answer, I'll be more than happy to transfer the checkmark
Original Question
I initially opened an issue with YouCompleteMe https://github.com/Valloric/YouCompleteMe at https://github.com/Valloric/YouCompleteMe/issues/1345. It immediately got closed because there's no official support for Windows. Ok, fine.
I'm now asking the Stackoverflow community, hopefully there are people who are messing with YCM for Windows (there is a "unofficial YCM for Windows" page, so there MUST be SOMEBODY hacking on this thing).
Below is the original content of the issue that I opened.
If somebody actually has an answer that works, great! At this point, I'm looking more for procedures that I can use to run the YCM server under a debugger to see where exactly it's choking
I'm trying to get YCM to work on my Windows 7 machine. I have a few
other XP, Win7, Win8 machines that have no problems with YCM. I've
tried building the support stuff using MinGW, Visual Studio 2010, both
on the target machine as well as the other machines where I have YCM
working.
When I open a Python or C++ file, a message immediately appears that
YCM has crashed and I should restart with :YcmRestartServer. It
mentions that I should set g:ycm_server_keep_logfiles in order to see
the log messages. I have done that, but I still don't have any
logfiles and the "set g:ycm_server_keep_logfiles" message is still
appearing.
I also get ('Connection aborted.', error(10061, 'No connection could
be made because the target machine actively refused it'))
I looked in python\ycm\youcompleteme.py and saw that the "logfiles
deleted" message comes up because of an exception in trying to open
the file specified by self._server_stderr (IOError). Right now I'm
suspecting that this is because the server never actually gets far
enough in its startup sequence to actually create the stdout and
stderr files.
What are the steps that I could do to investigate why the server (?)
fails to start properly.
I also had a vague idea that there was a firewall rule blocking
connections, I looked through Windows Firewall, but didn't really see
anything that would point to localhost connections being blocked or
whatnot.
I'm okay with doing debugging, would appreciate advice on the
procedure that I would need to do in order to get Visual Studio 2010
to step into the server process and poke around stuff.
Oh, dunno if this factoid means anything, but I'm able to use
Rip-Rip's clang_complete without issues, but I would very much rather
use YCM.
I never really did get an answer or solution to the central question of "how do I debug YCM under Windows" but I did solve the underlying problem of why YCM wasn't working for me, so for posterity (and other fellow despairing YCM users who may end up here via Google)
For me, YCM immediately crashed and burned. I figured the problem out by seeing a Windows system that had been working fine for me start exhibiting the symptoms.
The change: I had installed Python 3.x and switched it to being the system preferred python (by messing with paths, what do you expect with Windows?).
As it turns out (duh), YCM depends on Python 2.x and falls over when it can't find any of the libraries that it was trying to open.
I started going down the path of trying to locate exactly what the files YCM was trying to access and provide them locally in the YCM directory, but after spending five minutes on it, I decided that I wanted something simpler.
Since I still wanted Python 3.x to be the 'system' version, I settled for manipulating the path WITHIN Vim, so I added this before the YCM load,
if (has('win32') || has('win64'))
let $PATH = 'C:\Python27;' . $PATH
endif
Hope that this saves somebody else some pain

Team Foundation services are not available from server - The remote name could not be resolved

We are working with Visual Studio 2010 and Team Foundation Server 2010. We did not have any problems for about half a year, but:
Since a couple of days we get the following error: Team Foundation services are not available from server (...) The remote name could not be resolved; (...)
The problem occurs randomly (we are unable - yet - to pinpoint the conditions on which it occurs) and persists until we restart Visual Studio. The problem occurs about 8 times per day per developer.
Because we seem not to get past this problem and we cannot find anybody writing about this specific combination (the error and the 'remote name' part), I thought it wise to ask you guys about it ;) . Could anyone please help?
This is a client, server or infrastructure related problem on network level. The DNS entry for your TFS server cannot be resolved correctly at times for host dfz-vm223.
Suggestions for troubleshooting:
On some developer systems, replace the hostname dfz-vm223 by the ip-address of the TFS server. If the problem stop occuring there the DNS system is instable.
Setup a continuous ping stream (ping -t dfz-vmm223 from command window) and see if the host system is pingable in case you have TFS server problems.
Just found out what the problem was: the problem is proxy related. When we disable our proxy, the problem is gone. It appears our proxy and TFS are troublesome together. If anyone experiences the same problem and you are working with a proxy server, I would suggest you try disabling the proxy too.
I had the same problem, although I'm using VS2012 and a WAN connection to TFS.
I solved the problem by flushing the DNS cache.
To flush the DNS cache, start a command prompt with admin rights: ipconfig /flushdns
You need to do this in all the computers where the problem occurs.
I know this is old, but I had this problem sometimes when I ran Fiddler.
Sometimes Fiddler would crash or not clean up properly and the whole machine would get into some weird state where not even reboots were helping. The solution to it usually is to start Fiddler again, turn off any interceptors/collecting traffic and shut it down again.
Some of my co-workers and I had this problem as well. Out of about 25 developers, most never got this error. But three of us got it pretty consistently. The symptoms are identical, but we are using Visual Studio 2013 almost exclusively. In this version of Visual Studio, the error is preceded by the code: TF400324.
We found eventually that the three of us had all installed Productivity Power Tools 2013. And the developers that were not affected by this error had not installed it. Most had not heard of it. This used to be a very popular extension, so I have always installed it as I set up my system since about 2007. But apparently, in its modern incarnation in Visual Studio 2013, perhaps in combination with some quirk in our network or something, it can cause this problem. We have each uninstalled it, and have not gotten this error since. (It's been several months now.)
If you have this extension installed, you probably already know about it, because you probably installed it yourself. You probably started using it years ago, and it became a habit to add to each new installation. You will find that today, the default installation of Visual Studio actually includes most of its features already. To uninstall, go to Tools --> Extensions and Updates... Then click on Productivity Power Tools 2013, and click Uninstall.
Hade the same issue. For whatever reason the windows DNS Client service on my PC wasn't running. Changing it from Disabled to Automatic solved this problem for me.
Too long for comments:
First off, as #kroonwijk stated, this is an infrastructure issue. Your DNS queries are either timing out or the DNS server is not responding at certain times.
In a comment you mentioned a change over from regular machines to laptops for your entire dev team. If I had to make a bet I'd say that the DNS configuration on the laptops is not the same as what you had on the other machines.
You need to take this up with your infrastructure people. If you still have access to the older machines boot one of them up and compare the IP configuration. If not, get them to fix the problem. The DNS resolution problem could be any one of a number of factors. For example, the new machines could be pointing to an incorrect DNS server that has network issues or their might be some incompatibility between how Win7 makes DNS requests and your DNS server.
I have also experienced this problem and it doesn't always have to do with name resolution.
If you add an entry to your %systemroot%/system32/drivers/etc/hosts file for your TFS server, it removes any dependance on your name resolution servers.
If you are still experiencing the problem, then it has to do with either visual studio or one of the VS Extensions that you are running. There may be a memory leak somewhere. Disable all your Extensions using the extension manager, restart VS, and see if you still experience the problem.

Visual Studio 2010 Debug Server Not Recognizing My Changes

Using Visual Studio 2010 on Window 7 64bit. I'm trying to test a website project (not a web application project) using the built in dev server (cassini). The problem I'm having is that when I make a change, I now have to actually stop debugging, kill cassini, and restart before I can actually see my changes in the browser. I used to be able to edit and refresh. One of my fellow developers here is able to do this just fine with an identical setup (same project/vs version/os - and settings near as I can tell). I'm beginning to suspect some sort of permissions issue. I've been all over google trying to find an answer to no avail. Any ideas?
As it turns out, this was my fault... I had experienced the dreaded "network BIOS command limit has been reached" issue. I found a post that recommended doing a regedit hack "HKLM\Software\Microsoft\ASP.NET\FCNMode = 1", well this basically turns off File Change Notifications. Changing this value to 2, and applying the changes recommended in knowledge base 810886 fixed both problems.

Resources