VSCode remote-ssh cant connect to win server 2019 - visual-studio-code

I'm using VSCode remote-ssh extension for development on winserv2016 and it works as intended. We recently switched to winserv2019 and the extension does not work. the error I get in output is
Server failed to start. - Program 'icacls.exe' failed to run: Win32 internal err
> or "Access is denied" 0x5 occurred while reading the console output buffer. Cont
> act Microsoft Customer Support Services.At line:4 char:1
> + icacls $ai_ /reset /Q
I have and admin rights on this machine, does anyone encounter this issue? I've also tried nightly build of VScode and nightly extension. No Success so far.

Related

vscode SSH connect failed using SSH-remote extension but success by terminal

I'm trying to setup a ssh server using my win10 PC. After following steps to setup the server, it is now can be connected via terminal from by laptop(win11).
However, if I use vscode extension Remote - SSH with connecting config :
Host 192.168.0.183
HostName 192.168.0.183
User User
Port 22
I always encounter Could not establish connection :
[23:49:42.494] Got password response
[23:49:42.494] "install" wrote data to terminal: "**********"
[23:49:42.521] >
[23:49:42.815] > powershell : �L�k���� 'powershell' ���J�O�_�� Cmdlet�B��ơB���O�ɩΥi����{�����W�١C���ˬd�W�٫��r�O�_���T�A�p�G�]�t
[23:49:42.826] > ��|���ܡA�нT�{��|�O�_���T�A�M��A�դ#���C
��� �u��:1 �r��:1
+ powershell
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (powershell:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
[23:49:44.124] "install" terminal command done
[23:49:44.125] Install terminal quit with output:
[23:49:44.126] Received install output:
[23:49:44.129] Resolver error: Error:
at g.Create (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:583926)
at c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:581767
at t.handleInstallOutput (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:582462)
at t.tryInstall (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:680469)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:642848
at async t.withShowDetailsEvent (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:646166)
at async t.resolve (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:643898)
at async c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:723024
[23:49:44.138] -----
Then I tried to use the laptop setting up as server and PC otherwise. It connect successfully with following output log :
[23:56:27.929] Got password response
[23:56:27.929] "install" wrote data to terminal: "************"
[23:56:27.951] >
[23:56:28.645] > Windows PowerShell
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> Install the latest PowerShell for new features and improvements! https://aka.ms/
> PSWindowsPS C:\Users\lspss>
> PS C:\Users\lspss> $uuid="d68ebbafd913"
> PS C:\Users\lspss> "${uuid}: running"
> d68ebbafd913: running
> PS C:\Users\lspss> "d68ebbafd913: pauseLog"
> d68ebbafd913: pauseLog
In comparison, the failed one have some random code I do not understand follow the powershell, while the other success after Windows Powershell.
I have tried to reinstall the ssh-server on my PC, and also tried using other laptop as client, which all failed.

Why windows commands are not working in vscode-insiders' terminal (error: <3>init: (632) ERROR: UtilConnectUnix:466: connect failed 111)

VSCode Version: 1.53.0-insider (x64)
OS Version: Microsoft Windows [Version 10.0.21292.1010]
WSL version: WSL 2
distribution: Ubuntu-20.04
Steps to Reproduce:
(in wsl.exe)Type code-insiders ~ && exit
Press ctrl+j in the VSCode window
Type explorer.exe .
Result:
It shows me this error:
<3>init: (632) ERROR: UtilConnectUnix:466: connect failed 111
Question:
How can I fix it and why it is happening ?
Extensions on WSL:
ms-vscode.cpptools
eamodio.gitlens
ms-toolsai.jupyter
ms-python.vscode-pylance
ms-python.python
I think I had a similar issue here, you have to check the environment variables of you WSL2 session.
WSL_INTEROP=/run/WSL/197_interop
if this points to a not existing socket the connection fails.
cheers
Marco

Running PowerShell terminal in 2.0 mode

VSCode Version: 1.16.1
OS Version: Windows Server 2012 R2 Standard
Is it possible to run the PowerShell terminal using PowerShell v2.0? I have an older SharePoint farm that requires earlier version of PowerShell and would like to run that version instead of more current versions. When I open VS Code on my server the PowerShell terminal crashes.
Here is the log of the crash.
9/18/2017 10:09:24 AM [NORMAL] - Visual Studio Code v1.16.1 64-bit
9/18/2017 10:09:24 AM [NORMAL] - PowerShell Extension v1.4.3
9/18/2017 10:09:24 AM [NORMAL] - Operating System: Windows 64-bit
9/18/2017 10:09:24 AM [NORMAL] - Language server starting --
9/18/2017 10:09:24 AM [NORMAL] - exe: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
9/18/2017 10:09:24 AM [NORMAL] - args: C:\Users\me\.vscode\extensions\ms-vscode.powershell-1.4.3\scripts\Start-EditorServices.ps1 -EditorServicesVersion '1.4.1' -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '1.4.3' -AdditionalModules #('PowerShellEditorServices.VSCode') -BundledModulesPath 'C:\Users\me\.vscode\extensions\ms-vscode.powershell-1.4.3\modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath 'C:\Users\me\.vscode\extensions\ms-vscode.powershell-1.4.3\logs\1505754564-f1d3cfae-50af-4f74-9503-061208469b8d1505754561535\EditorServices.log' -SessionDetailsPath 'C:\Users\me\.vscode\extensions\ms-vscode.powershell-1.4.3\sessions\PSES-VSCode-10764-479503' -FeatureFlags #()
9/18/2017 10:09:25 AM [NORMAL] - powershell.exe started, pid: 6412
9/18/2017 10:09:25 AM [NORMAL] - powershell.exe terminated or terminal UI was closed
9/18/2017 10:10:25 AM [NORMAL] - Language server startup failed.
9/18/2017 10:10:25 AM [ERROR] - The language service could not be started:
9/18/2017 10:10:25 AM [ERROR] - Timed out waiting for session file to appear.
I experienced the same symptoms after updating VS Code (1.25.1) and PowerShell extension (1.8.2). Discovered that C:\Users\USERNAME.vscode\extensions\ms-vscode.powershell-1.8.2\modules\PowerShellEditorServices\Start-EditorServices.ps1 was failing to launch by looking at the logs and trying to launch it manually from a separate PowerShell instance with the same arguments. It returned the following prompt: Do you want to run software from this untrusted publisher? [V] Never run [D] Do not run [R] Run once [A] Always run [?] Help (default is "D"): indicating that the digital signature was not trusted.
To remedy this I performed the following:
Browse to the file noted in the error message above. (ex. C:\Users\USERNAME.vscode\extensions\ms-vscode.powershell-1.8.2\modules\PowerShellEditorServices\Start-EditorServices.ps1)
Right click on the file and choose Properties | Digital Signatures
Select the signature and click Details | View Certificate
Choose the Details tab and click Copy to File...
Save the file with a .CER extension.
Using the Certificates MMC Snapin, import this file into the Trusted Publishers Certificate Store on the Local Machine.
(original solution post in https://github.com/PowerShell/vscode-powershell/issues/1360 )

CasperJS with SlimerJS under linux

I'm trying to execute a CasperJS script using SlimerJS (My tests must check html5 video which is not available using PhantomJS).
Using CasperJS on top of PhantomJS, all of my scripts work just fine, however with CasperJS on top of SlimerJS, I cannot execute any of them. instead, I just always get the following error message:
[alex#webdev-srv test]$ xvfb-run casperjs --engine=slimerjs test2.js
Script Error: Cannot find package.json at /home/alex/headless/phantomjs/test/package.json
Stack:
-> : 0
1474876419994 addons.repository WARN cacheEnabled: Couldn't get pref: extensions.getAddons.cache.enabled
I'm using CentOS 7 as VPS (No GUI), with Firefox being installed, and XVFB too.
How can I make it work? Or is there any solution for this?

Chain psexec and nunit is not working (psexec exit with code 1 and nunit is crashed)

Sorry for unclear subject but i really don't understand where problem.
I use a system for autotests c#+webdriver for chrome + nunit (2.6) + cc.net ( 1.6.7981.1)
And my tests is run on remote machine (Windows XP SP 2 x86)via psexec which start bat file on remote machine
bat file includes 2 commands:
run msbuild
run nunit-console
Well, psexec has next arguments
/accepteula \MachineName -u Login -p Pass -s Path\start.bat
Bat file has next command
nunit-console-x86.exe "%PROJECT_FOLDER%\Path\Tests.dll" "/xml=%TEST_RESULT_PATH%"
When cc.net launch psexec tests is started and the tests work during some time. Unexpected, psexec exit with code 1
message level="Error">Path\start.bat exited on MachineName with error code 1. message
But nunit-console on remote machine is continue working
And after some time console is crashed with error
szAppName : nunit-console-x86.exe szAppVer : 2.6.0.12051
szModName : kernel32.dll szModVer : 5.1.2600.2180 offset :
0001eb33
Message from Event log
Application: nunit-console-x86.exe Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.IOException Stack: at
System.IO._Error.WinIOError(Int32, System.String) at
System.IO._ConsoleStream.Write(Byte[], Int32, Int32) at
System.IO.StreamWriter.Flush(Boolean, Boolean) at
System.IO.StreamWriter.Write(Char[], Int32, Int32) at
System.IO.TextWriter.WriteLine(System.String) at
System.IO.TextWriter.WriteLine(System.String, System.Object) at
System.IO.TextWriter+SyncTextWriter.WriteLine(System.String,
System.Object) at System.Console.WriteLine(System.String,
System.Object) at NUnit.ConsoleRunner.Runner.Main(System.String[])
at NUnit.ConsoleRunner.Class1.Main(System.String[])
If run nunit locally than no problem(nunit-console works fun).
Some time ago system worked, and i don't know what is changed (This is most bad case)
How can i resolve this problem?
Thanks!
This problem is resolved!
Now system is working