Unable to connect Visual studio to MAC Mini - Xamarin - xamarin

I am trying to connect to a MAC Mini to a Windows PC running visual studio but it fails to connect.
I have tried everything mentioned in the Xamarin Docs HERE
We have successfully connected the same MAC Mini to another PC on the network, but can't seem to get it to connect with another PC (Note: We are not connecting both at the same time)
We have checked the SSH and it seems to be fine - we can connect using PUTTY and GIT Bash.
Also we are using the correct username of MAC - we retrieved using whoami command.
Below is the log file content.
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-10-28 15:58:04.7169] MacServer State transition from DisconnectedState to SshConnectingState on XT-14.local (192.168.0.214)
Xamarin.Messaging.Client.Ssh.SshMessagingConnection Error: 0 : [2016-10-28 15:58:15.0329] An unexpected error occurred on with the current SSH Session
Renci.SshNet.Common.SshException: Message type 80 is not valid.
at Renci.SshNet.Session.LoadMessage(Byte[] data)
at Renci.SshNet.Session.ReceiveMessage()
at Renci.SshNet.Session.MessageListener()
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-10-28 15:58:18.9447] Starting Broker 4.1.1.3 in port 50843...
System.Net.Mqtt.TcpChannel Warning: 0 : [2016-10-28 15:58:26.0069] The TCP Network Stream has completed sending bytes. The observable sequence will be completed and the channel will be disposed
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-10-28 15:58:26.2103] MacServer State transition from SshConnectingState to DisconnectedState on XT-14.local (192.168.0.214)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Error: 0 : [2016-10-28 15:58:26.3702] An error occurred on the underlying client while executing an operation. Details: The client vs4940Lenov has been disconnected while trying to perform the connection
System.Net.Mqtt.Client.ClientPacketListener Warning: 0 : [2016-10-28 15:58:26.5290] Client vs4940Lenov - Packet Channel observable sequence has been completed
Xamarin.VisualStudio.IOS.Messaging.State.DisconnectedState Information: 0 : [2016-10-28 15:58:26.6871] Disconnected from Mac XT-14.local (192.168.0.214)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Error: 0 : [2016-10-28 15:58:26.8482] Couldn't connect to XT-14.local. Please try again.
System.Net.Mqtt.Client.Client Error: 0 : [2016-10-28 15:58:27.0164] System.Net.Mqtt.Client.ClientException: The client vs4940Lenov has been disconnected while trying to perform the connection
at System.Net.Mqtt.Client.Client.<ConnectAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xamarin.Messaging.Client.MessagingConnection.<ConnectAsync>d__18.MoveNext()
Xamarin.VisualStudio.IOS.Messaging.State.DisconnectedState Error: 0 : [2016-10-28 15:58:27.2886] There was an error while trying to connect the client vs4940Lenov to the server.
Xamarin.Messaging.Exceptions.MessagingException: There was an error while trying to connect the client vs4940Lenov to the server. ---> System.Net.Mqtt.Client.ClientException: The client vs4940Lenov has been disconnected while trying to perform the connection
at System.Net.Mqtt.Client.Client.<ConnectAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xamarin.Messaging.Client.MessagingConnection.<ConnectAsync>d__18.MoveNext()
--- End of inner exception stack trace ---
at Xamarin.Messaging.Client.MessagingConnection.<ConnectAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xamarin.Messaging.Client.Ssh.SshMessagingConnection.<ConnectAsync>d__37.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Xamarin.Messaging.VisualStudio.MessagingService.<ConnectAsync>d__73.MoveNext()
System.Net.Mqtt.TcpChannel Error: 0 : [2016-10-28 15:58:27.7771] An error occurred while closing underlying channel. Error code: 10054
System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
at System.Net.Mqtt.TcpChannel.Dispose(Boolean disposing)
Update 1
Here is an image

When connecting Visual Studio to the Mac host it's important to ensure that the Xamarin tooling is in sync on both systems and that the version numbers match.
In this case it looks like one of the computers was running an outdated version of the Xamarin tooling. Updating this to the latest Stable version fixed the problem.
More information can be found in Xamarin's Connecting to the Mac guide, and if problems persist I'd recommend checking out the Troubleshooting guide as this outlines common issues / known problems / workarounds.

Related

Docker install failed on Windows 10

I am trying to install docker on windows 10. I therefore downloaded the installer as per the official documentation, but when I execute it I get the following error:
Docker.Core.HttpBadResponseException:
{"message":"1 error occurred:\n\t* starting WSL integration service: synchronising agents: starting added distros: 1 error occurred:\n\t* waiting for WSL integration for Ubuntu: timed out while polling for WSL distro integration to become ready in "Ubuntu"\n\n\n\n"}
at Docker.Core.GoBackend.GoBackendClient.d__19.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.Core\GoBackend\GoBackendClient.cs:line 226
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.WSL2.LinuxWSL2Engine.d__11.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 54
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.TaskExtensions.d__0.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.StartTransition.d__6.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 91
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.ApiServices.StateMachines.StartTransition.d__6.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 118
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.EngineStateMachine.d__15.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:line 72
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.Engines.d__23.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.Engines\Engines.cs:line 109
I tried installing multiple times, with and without admin privileges.
For Windows OS, your need to install Windows Subsystem for Linux WSL.
Here is a link to install it :
https://learn.microsoft.com/en-us/windows/wsl/install

Could not load file or assembly 'Microsoft.Windows.Simulator.Client, 'Microsoft.VisualStudio.CppSvc.Internal StreamJsonRpc.RemoteInvocationException

My OS is Windows 10, developing with Visual Studio 2019, XCode 9.4, and developing Xamarin Forms app.
When trying to connect Mac book Pro 13 (10.13.6), via Visual Studio 2019, I get this weird state where I am connected to MacBook (check the 'chain' under screen icon), but really I am not, as it does not appear in paired devices.
When running the app I get a single error that says A remote error occurred in the connected Mac
When I click on the message I get to a log and in it I see a lot of steps and four errors.
8 PkgDefManagement initialized VisualStudio 2021/03/03 14:54:24.665
9 RootFolder
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\ VisualStudio 2021/03/03 >14:54:24.665
10 ShellFolder
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\
624 ERROR Still unable to load MEF component DLL: Could not load file
or assembly 'Microsoft.Windows.Simulator.Client, Version=16.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The system cannot find the file specified.
c:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\commonextensions\platform\diagnosticshub\Microsoft.DiagnosticsHub.VisualStudio.Package.dll
Microsoft.VisualStudio.ComponentModelHost.VsShellComponentModelHost
2021/03/03 14:54:41.666
625 ERROR Still unable to load MEF component DLL: Could not load file
or assembly 'Microsoft.VisualStudio.CppSvc.Internal, Version=16.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The system cannot find the file specified.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\CodeAnalysis\Microsoft.VisualStudio.CodeAnalysis.VCPlugin.dll
Microsoft.VisualStudio.ComponentModelHost.VsShellComponentModelHost
2021/03/03 14:54:41.673
781 ERROR StreamJsonRpc.RemoteInvocationException: Error enumerating
over credential store.at
StreamJsonRpc.JsonRpc.d__1391.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at Microsoft.Developer.IdentityService.PipeManager.<InvokeRpcFuncAsync>d__131.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)at
Microsoft.Developer.IdentityService.AccountProvider.GithubAccountProviderClient.d__40.MoveNext()
--- End of stack trace from previous location where exception was thrown ---at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)at
Microsoft.Developer.IdentityService.AccountProvider.GithubAccountProviderClient.d__44.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)at
Microsoft.VisualStudio.Shell.Connected.UserInformation.UserInformationPackage.d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)at
Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c__DisplayClass32_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)at
Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c__DisplayClass35_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception
exceptionObject) RPC server exception:
Microsoft.Developer.IdentityService.GithubCredentialStorage.Interop.InteropException:
Error enumerating over credential store.at
Microsoft.Developer.IdentityService.GithubCredentialStorage.Interop.Windows.WindowsCredentialStore.Enumerate(String
filter)at
Microsoft.Developer.IdentityService.GithubCredentialStorage.GitHubCredentialStore.SearchAllCredentials()at
Microsoft.Developer.IdentityService.GithubCredentialStorage.GithubCredentialStoreService.b__10_0()at
System.Threading.Tasks.Task`1.InnerInvoke()at
System.Threading.Tasks.Task.Execute() vs/identity/githubsso
2021/03/03 14:55:12.650
....
and then at the very bottom
914 Did not find item to promote MruList 2021/03/03 15:26:46.494
915 Entering MruItemsStoreServiceDecorator.AddMRUItem. Item category:
335041a8-b61a-4e9f-b0fe-d42dfa193855, lpszItem:
%UserProfile%\source\repos\StruebyPhotoApp\StruebyPhotoApp.Api\StruebyPhotoApp.Api.csproj|{00000000-0000-0000-0000-000000000000}|0,0|False
CodeContainerTracing 2021/03/03 15:26:46.494
916 ERROR
System.NullReferenceException: Object reference not set to an instance
of an object.at
Xamarin.Messaging.Windows.ErrorsManager.<>c__DisplayClass3_0.b__0(IErrorItem
item) in
C:\A\1\36\s\src\Core\Xamarin.Messaging.Windows\ErrorsManager.cs:line
24at Clide.ErrorsManager.<>c__DisplayClass7_0.b__0(Object sender,
EventArgs e) in
E:\A_work\349\s\src\Clide.Core.Windows\Errors\ErrorsManager.cs:line
55at Microsoft.VisualStudio.Shell.Task.OnNavigate(EventArgs e)at
Microsoft.VisualStudio.Shell.Task.Microsoft.VisualStudio.Shell.Interop.IVsTaskItem.NavigateTo()at
Microsoft.VisualStudio.ErrorListPkg.Shims.ErrorListPackageEventProcessor.PreprocessNavigate(ITableEntryHandle
entryHandle, TableEntryNavigateEventArgs e)at
Microsoft.VisualStudio.Shell.TableControl.Implementation.TableControlEventManager.<>c__DisplayClass40_0.b__2(ITableControlEventProcessor
p, ITableEntryHandle entry)at
Microsoft.VisualStudio.Shell.TableControl.Implementation.TableControlEventManager.<>c__DisplayClass60_1`1.b__0()at
Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object
errorSource, Action call) --- End of stack trace from previous
location where exception was thrown --- at
Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception
exceptionObject)
and this is where it ends.
What is going on? How do I debug this further?
The answer was to get a Mac Book Air that had support for the latest macOS (High Spur) and latest XCode (12) and the Visual Studio and Mac book managed to connect.
So one potential solution would be to upgrade your hardware.

Unable to start visual studios 2019 (16.4)

I updated my visual studios to 16.4 and now I am unable to even open the IDE.
This is the error I'm receiving.
I've tried to repair and got the same error
I did a complete removal using Geek Uninstaller and reinstalled and i still get the same error.
Safemode produces same error message
Googleing the error messages solutions similar to this one
Ironicly, I first tried to report this to the visual studios team which ultimately leads me to this link. The problem is, I cant open visual studios.
I did manage to open a support request, but I don't expect a response for a few days, and I need to get my development setup up and running, so that's why I'm posting here too.
E: Forgot the log
E2: I lied, I was not able to open a support request. Appearently I have to pay?
E3: Safemode -> same error
12/05/2019 15:26:11 Eastern Standard Time : Error : Failed to start host 'desktopClr.x86$IdentityHost': Microsoft.ServiceHub.Utility.ServiceHubError: code: 'Hub host 'IdentityHost', PID: 9636 exited.'-532462766. (ErrorKind: HostExited) HResult='-2146233088'
12/05/2019 15:26:11 Eastern Standard Time : Error : Error starting service 'IdentityStorageService' requested by StorageServiceClient (pid:2456): Failed to start host 'desktopClr.x86$IdentityHost' (ErrorKind: Error HResult: 8013153B)
12/05/2019 15:26:11 Eastern Standard Time : Error : Microsoft.ServiceHub.Utility.ServiceHubError: Failed to start host 'desktopClr.x86$IdentityHost' (ErrorKind: Error HResult: 8013153B) HResult='-2146233088'
at Microsoft.ServiceHub.Controller.LocationService.<StartServiceAsync>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.LocationService.<GetHostedServiceLocationAsync>d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.ServiceHub.Controller.LocationService.<LocateAsync>d__39.MoveNext()
===InnerException===
System.OperationCanceledException: The operation was canceled. HResult='-2146233029'
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at Microsoft.VisualStudio.Threading.ThreadingTools.<WithCancellationSlow>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.HostInfo.<GetEndPointAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.LocationService.<StartServiceAsync>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
12/05/2019 15:26:13 Eastern Standard Time : Error : Error starting service 'IdentityStorageService' requested by StorageServiceClient (pid:2456): Failed to start host 'desktopClr.x86$IdentityHost' (ErrorKind: Error HResult: 8013153B)
12/05/2019 15:26:13 Eastern Standard Time : Error : Failed to start host 'desktopClr.x86$IdentityHost': Microsoft.ServiceHub.Utility.ServiceHubError: code: 'Hub host 'IdentityHost', PID: 5076 exited.'-532462766. (ErrorKind: HostExited) HResult='-2146233088'
12/05/2019 15:26:13 Eastern Standard Time : Error : Microsoft.ServiceHub.Utility.ServiceHubError: Failed to start host 'desktopClr.x86$IdentityHost' (ErrorKind: Error HResult: 8013153B) HResult='-2146233088'
at Microsoft.ServiceHub.Controller.LocationService.<StartServiceAsync>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.LocationService.<GetHostedServiceLocationAsync>d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.ServiceHub.Controller.LocationService.<LocateAsync>d__39.MoveNext()
===InnerException===
System.OperationCanceledException: The operation was canceled. HResult='-2146233029'
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at Microsoft.VisualStudio.Threading.ThreadingTools.<WithCancellationSlow>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.HostInfo.<GetEndPointAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.LocationService.<StartServiceAsync>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
12/05/2019 15:26:13 Eastern Standard Time : Error : Error starting service 'VsixServiceDiscovery' requested by VsixServiceDiscovery-extensionManager (pid:10144): Failed to start host 'desktopClr.x86$VSDetouredHost' (ErrorKind: Error HResult: 8013153B)
12/05/2019 15:26:13 Eastern Standard Time : Error : Microsoft.ServiceHub.Utility.ServiceHubError: Failed to start host 'desktopClr.x86$VSDetouredHost' (ErrorKind: Error HResult: 8013153B) HResult='-2146233088'
at Microsoft.ServiceHub.Controller.LocationService.<StartServiceAsync>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.LocationService.<GetHostedServiceLocationAsync>d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.ServiceHub.Controller.LocationService.<LocateAsync>d__39.MoveNext()
===InnerException===
System.OperationCanceledException: The operation was canceled. HResult='-2146233029'
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at Microsoft.VisualStudio.Threading.ThreadingTools.<WithCancellationSlow>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.HostInfo.<GetEndPointAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.LocationService.<StartServiceAsync>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
12/05/2019 15:26:13 Eastern Standard Time : Error : StreamJsonRpc.RemoteInvocationException: Failed to start host 'desktopClr.x86$VSDetouredHost' (ErrorKind: Error HResult: 8013153B) HResult='-2146233088'
at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__96`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Framework.RemoteServiceBroker.<GetPipeAsync>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Client.HubClient.<GetPipeAsync>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Client.HubClient.<RequestServiceAsync>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.DiscoveryServiceProxy.<GetDiscoveryServiceProxyAsync>d__7.MoveNext()
12/05/2019 15:26:13 Eastern Standard Time : Error : Error starting service 'extensionManager' requested by ExtensionManagerServiceProxy (pid:2456): Cannot find service module info file 'extensionManager.servicehub.service.json' in 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\ServiceHub\Services' (ErrorKind: ServiceModuleInfoNotFound)
12/05/2019 15:26:13 Eastern Standard Time : Error : Microsoft.ServiceHub.Utility.ServiceHubError: Cannot find service module info file 'extensionManager.servicehub.service.json' in 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\ServiceHub\Services' (ErrorKind: ServiceModuleInfoNotFound) HResult='-2146233088'
at Microsoft.ServiceHub.Controller.ServiceDiscovery.<GetServiceModuleInfoAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.LocationService.<GetHostedServiceLocationAsync>d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.ServiceHub.Controller.LocationService.<LocateAsync>d__39.MoveNext()
12/05/2019 15:26:14 Eastern Standard Time : Error : Error starting service 'IdentityStorageService' requested by StorageServiceClient (pid:2456): Failed to start host 'desktopClr.x86$IdentityHost' (ErrorKind: Error HResult: 8013153B)
12/05/2019 15:26:14 Eastern Standard Time : Error : Failed to start host 'desktopClr.x86$IdentityHost': Microsoft.ServiceHub.Utility.ServiceHubError: code: 'Hub host 'IdentityHost', PID: 12996 exited.'-532462766. (ErrorKind: HostExited) HResult='-2146233088'
12/05/2019 15:26:14 Eastern Standard Time : Error : Microsoft.ServiceHub.Utility.ServiceHubError: Failed to start host 'desktopClr.x86$IdentityHost' (ErrorKind: Error HResult: 8013153B) HResult='-2146233088'
at Microsoft.ServiceHub.Controller.LocationService.<StartServiceAsync>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.LocationService.<GetHostedServiceLocationAsync>d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.ServiceHub.Controller.LocationService.<LocateAsync>d__39.MoveNext()
===InnerException===
System.OperationCanceledException: The operation was canceled. HResult='-2146233029'
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at Microsoft.VisualStudio.Threading.ThreadingTools.<WithCancellationSlow>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.HostInfo.<GetEndPointAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.LocationService.<StartServiceAsync>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
12/05/2019 15:26:15 Eastern Standard Time : Error : Error starting service 'IdentityStorageService' requested by StorageServiceClient (pid:2456): Failed to start host 'desktopClr.x86$IdentityHost' (ErrorKind: Error HResult: 8013153B)
12/05/2019 15:26:15 Eastern Standard Time : Error : Microsoft.ServiceHub.Utility.ServiceHubError: Failed to start host 'desktopClr.x86$IdentityHost' (ErrorKind: Error HResult: 8013153B) HResult='-2146233088'
at Microsoft.ServiceHub.Controller.LocationService.<StartServiceAsync>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.LocationService.<GetHostedServiceLocationAsync>d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.ServiceHub.Controller.LocationService.<LocateAsync>d__39.MoveNext()
===InnerException===
System.OperationCanceledException: The operation was canceled. HResult='-2146233029'
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at Microsoft.VisualStudio.Threading.ThreadingTools.<WithCancellationSlow>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.HostInfo.<GetEndPointAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceHub.Controller.LocationService.<StartServiceAsync>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
I believe Hans' comment is referring to your anti-malware potentially blocking or delaying something it shouldn't during VS startup, rather than you getting malware from updating VS.
I'm currently working through this issue with our IT dept, since we don't have the ability to configure or disable these features on our own. Before this, our blocker was preventing part of the update/repair process. After resolving that, it persisted with this new error.
If you do have the ability to disable your malware checker/blocker and try the process again, it could be a telling troubleshooting method.
I'll update if/when this is resolved for me.
I had this exact problem. I believe caused by using system restore to restore back to before VS 16.4.1 upgrade in order to fix a hardware problem attributed to a Windows Update. Hardware problem was fixed by editing the registry. With VS I tried repair twice without success. Finally uninstall and re-install using Visual Studio Installer has resolved the problem.
These Steps work for me.
Step 1: User left click on "Start (button)"
enter image description here
Step 2:Type the "Visual Studio Installer" enter image description here
Step Final:
Goto the more-> repair.
its works for me.
thanks.

Visual studio 2019 fails to create rsync config when setting up remote connection

So I an trying to add a remote connection to my Ubuntu 18.04 server for remote debugging in VS. Both when I add the connection and if I try to refresh remote headers I get the following error:
Checking the log I get the following more informative error:
liblinux.IO.RsyncException: Could not create daemon configuration file on remote device
How do I solve this exactly? Is there some way for me to set up this file manually if I can't get it to work automatically?
Here is the full error in the log if needed:
liblinux.IO.RsyncException: Could not start the 'rsync' command on the remote host, please install it using your system package manager. Please see https://aka.ms/AA23jat for troubleshooting. ---> liblinux.IO.RsyncException: Could not create daemon configuration file on remote device ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'ShellStream'.
at liblinux.Ssh.ShellStream.Write(String text)
at liblinux.Ssh.ShellStream.WriteLine(String line)
at liblinux.Shell.StreamingShell.WriteLine(String line)
at liblinux.IO.RemoteRsyncDaemon.Start()
--- End of inner exception stack trace ---
at liblinux.IO.RemoteRsyncDaemon.Start()
at liblinux.IO.Rsync.StartRemoteServer(RemoteRsyncDaemon daemon)
--- End of inner exception stack trace ---
at liblinux.IO.Rsync.StartRemoteServer(RemoteRsyncDaemon daemon)
at liblinux.IO.Rsync.PrepareForDirectorySync(Int32 sessionID, String localPath, String remotePath, RsyncDirection direction, RemoteRsyncDaemon daemon, RsyncVerbosity verbosity, Boolean recursive, List`1 includes, List`1 excludes, Boolean& sourcePathExists, String customOptions)
at liblinux.IO.Rsync.<SyncDirectoryAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at liblinux.Services.RsyncRemoteCompilerIOImpl.<DownloadDirectoriesAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at liblinux.Services.RemoteCompiler.<DownloadSysrootAsync>d__152.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at liblinux.Services.RemoteCompiler.<CreateSysrootAsync>d__186.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at liblinux.Services.RemoteCompiler.<CreateLocalSysrootAsync>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.VisualStudio.Linux.Package.Dialogs.HeaderUpdateDialog.<DownloadUpdateAsync>d__18.MoveNext()

VisualStudio Online TestAgent behind proxy

summary:
I'm having difficulties getting the test agent to deploy as part of the build process in Visual Studio Online for a website, maybe due to network proxy.
details:
I work for Crab Company, "cc" for short (no, not really), and we have an account at https://cc.visualstudio.com .
We have an on-premise build server, "ccvsts", Windows Server 2012 R2.
We have an instance that will be used for intranet testing and will be hosting the website, "ccwebt1", Windows Server 2016.
Network traffic is filtered. Ports were opened. Intranet machines connect to the internet using a proxy.
We have some tests for the website utilizing Selenium. I'm trying to incorporate this testing following the guide at https://www.visualstudio.com/en-us/docs/test/continuous-testing/getting-started/continuous-test-selenium but instead of building the solution (which has a bunch of projects) I've got it building just the website project and test project:
I've gotten to the point where the project builds, and past some initial networking issues, but I think now I'm running into a problem due to the proxy. I think the relevant exception is
System.Management.Automation.MethodInvocationException: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred." ---> System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 104.214.111.103:443
Note that cc.visualstudio.com resolves to 104.214.111.103
Also note, this is failing on the "Deploy TestAgent on" build step.
Also also note, the first build steps do succeed and code is generated on ccvsts, so the build agent (at least) can already communicate with Visual Studio Online.
I believe this is proxy related by example of the following powershell
PS > $R = Invoke-WebRequest -URI http://www.bing.com?q=how+many+feet+in+a+mile
Invoke-WebRequest :
Access Denied (authentication_failed)
Your credentials could not be authenticated: "Credentials are missing.". You will not be permitted access until your
credentials can be verified.
However, this might be a credential issue. The requirements for the test agent were a bit unclear to me, so I have set up a local user account and local admin account on ccwebt1, but neither account has access to VSTS. I don't know if this will cause problems or not.
To summarize my question
1) If the network proxy is preventing access to visual studio online in the test agent power shell script, how can I fix that?
2) Will using local accounts for the test agent prevent access to visual studio online?
Log below (with a few values renamed, but otherwise unmodified)
******************************************************************************
Starting: Deploy TestAgent on
******************************************************************************
==============================================================================
Task : Visual Studio Test Agent Deployment
Description : Deploy and configure Test Agent to run tests on a set of machines
Version : 2.1.20
Author : Microsoft Corporation
Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=838890)
==============================================================================
****************************************************************
Task Input Information
----------------------------------------------------------------
testMachineInput = ccwebt1
adminUserName = ccwebt1\ccwebt1localadmin
winRmProtocal = Http
testCertificate = true
machineUserName = ccwebt1\ccwebt1local
runAsProcess = false
logonAutomatically = false
disableScreenSaver = false
isDataCollectionOnly = false
testPlatform = 14.0
agentLocation =
updateTestAgent = false
****************************************************************
Starting to deploy and configure test agent on test machines.
Inputs provided are:
Use HTTP Port: True
Username: ccwebt1\ccwebt1local
Disable Screen saver: False
Login Automatically: False
Run as process: False
Agent would be downloaded from https://go.microsoft.com/fwlink/?LinkId=615472
Update test agent: False
Run test agent as DataCollection only : False
Task 'VerifyTestAgentInstalled' on machine 'ccwebt1:5985' is being run
Deployment started on target machine...
Query for Testplatfrom version: 14.0
Test Agent does not exists
RemoteDeployerSource Verbose: 2 : [RemoteDeployer][12:Sep:17:11:37:45:2421; 4784, 4](ccwebt1)Created public key for communication
RemoteDeployerSource Information: 12 : [RemoteDeployer][12:Sep:17:11:37:45:2576; 4784, 4](ccwebt1)Deployment service - VisualStudioRemoteDeployer553ef14b-0634-460a-b535-cb40cbcb2409 is running...
RemoteDeployerSource Verbose: 4 : [RemoteDeployer][12:Sep:17:11:37:46:2851; 4784, 6](ccwebt1)Input file found
RemoteDeployerSource Verbose: 5 : [RemoteDeployer][12:Sep:17:11:37:46:2851; 4784, 6](ccwebt1)Reading input parameters
RemoteDeployerSource Verbose: 6 : [RemoteDeployer][12:Sep:17:11:37:46:2851; 4784, 6](ccwebt1)Finished reading input parameters
Task 'VerifyTestAgentInstalled' on machine 'ccwebt1:5985' completed.
Starting to download testagent
Test agent download is taking time. Please wait.
testagent is downloaded at: C:\TestAgent\365dea8f-557e-45e8-bb1d-fa59563f01ef
Task 'CopyFilesToTestAgent' on machine 'ccwebt1:5985' is being run
\\ccwebt1 was deleted successfully.
Copying recursively from C:\TestAgent\365dea8f-557e-45e8-bb1d-fa59563f01ef to C:\TestAgent on machine ccwebt1 succeeded.
\\ccwebt1 was deleted successfully.
Task 'CopyFilesToTestAgent' on machine 'ccwebt1:5985' completed.
Task 'InstallTestAgent' on machine 'ccwebt1:5985' is being run
Task 'InstallTestAgent' on machine 'ccwebt1:5985' is taking time. Please Wait
Task 'InstallTestAgent' on machine 'ccwebt1:5985' completed.
Deployment started on target machine...
Setup path: C:\TestAgent\vstf_testagent.exe
Installed Test Agent version: 0.0
Requested Test Agent version: 14.0.25463
Test Agent will be installed
Invoking the command C:\TestAgent\vstf_testagent.exe with arguments
RemoteDeployerSource Verbose: 2 : [RemoteDeployer][12:Sep:17:11:39:18:4378; 420, 4](ccwebt1)Created public key for communication
RemoteDeployerSource Information: 12 : [RemoteDeployer][12:Sep:17:11:39:18:4534; 420, 4](ccwebt1)Deployment service - VisualStudioRemoteDeployer3c6e52bc-5767-4bfd-9dba-f056c5d90671 is running...
RemoteDeployerSource Verbose: 4 : [RemoteDeployer][12:Sep:17:11:39:19:4789; 420, 6](ccwebt1)Input file found
RemoteDeployerSource Verbose: 5 : [RemoteDeployer][12:Sep:17:11:39:19:4789; 420, 6](ccwebt1)Reading input parameters
RemoteDeployerSource Verbose: 6 : [RemoteDeployer][12:Sep:17:11:39:19:4945; 420, 6](ccwebt1)Finished reading input parameters
Task 'CopyFilesToTestAgent' on machine 'ccwebt1:5985' is being run
Task 'CopyFilesToTestAgent' on machine 'ccwebt1:5985' completed.
\\ccwebt1 was deleted successfully.
Copying recursively from C:\agent\_work\_tasks\DeployVisualStudioTestAgent_52a38a6a-1517-41d7-96cc-73ee0c60d2b6\2.1.20\TestExecution.zip to C:\TestAgent on machine ccwebt1 succeeded.
\\ccwebt1 was deleted successfully.
Task 'TestAgentConfiguration' on machine 'ccwebt1:5985' is being run
RemoteDeployerSource Verbose: 2 : [RemoteDeployer][12:Sep:17:11:40:28:2919; 3220, 4](ccwebt1)Created public key for communication
RemoteDeployerSource Information: 12 : [RemoteDeployer][12:Sep:17:11:40:28:2919; 3220, 4](ccwebt1)Deployment service - VisualStudioRemoteDeployer1b3bbb26-a295-47a6-93bb-1432b9140099 is running...
RemoteDeployerSource Verbose: 4 : [RemoteDeployer][12:Sep:17:11:40:29:3232; 3220, 6](ccwebt1)Input file found
RemoteDeployerSource Verbose: 5 : [RemoteDeployer][12:Sep:17:11:40:29:3232; 3220, 6](ccwebt1)Reading input parameters
RemoteDeployerSource Verbose: 6 : [RemoteDeployer][12:Sep:17:11:40:29:3232; 3220, 6](ccwebt1)Finished reading input parameters
Task 'TestAgentConfiguration' on machine 'ccwebt1:5985' completed.
Task 'TestAgentConfiguration' for machine ccwebt1:5985's Error : System.Exception: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Unable to connect to Team Foundation Server
Task 'TestAgentConfiguration' for machine ccwebt1:5985's Log :
Deployment started on target machine...
System.AggregateException: Failed to execute the powershell script. Consult the logs below for details of the error.
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Unable to connect to Team Foundation Server ---> System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Unable to connect to Team Foundation Server
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.<>c__DisplayClass28_0.<Invoke>b__0()
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.<>c__DisplayClass19_0`1.<Execute>b__0()
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute(Action action)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute[T](Func`1 action)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable, ActionPreference errorActionPreference)
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable, ActionPreference errorActionPreference)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.ScriptExecutor.ExecuteScript(IPowerShell powerShell, String script, String arguments, Boolean isScriptDotSourced, Boolean useHttp)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.DeploymentService.RunPowerShellScripts(DeploymentMachineSpecification deploymentMachine, ScriptSpecification scriptSpecification, ScriptSpecification initializationScriptSpecification, String applicationPath, IPowerShell powerShellSession)
---> (Inner Exception #0) System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Unable to connect to Team Foundation Server
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.<>c__DisplayClass28_0.<Invoke>b__0()
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.<>c__DisplayClass19_0`1.<Execute>b__0()
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute(Action action)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute[T](Func`1 action)
at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable, ActionPreference errorActionPreference)<---
Test User ccwebt1local
Test UserDomain ccwebt1
Path: C:\TestAgent\TfsAssemblies\Newtonsoft.Json.dll
Loading module from path 'C:\TestAgent\TfsAssemblies\Newtonsoft.Json.dll'.
Loading module from path 'C:\TestAgent\TfsAssemblies\System.Net.Http.Formatting.dll'.
Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.TeamFoundation.DistributedTask.Task.TestExecution.dll'.
Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.TeamFoundation.Common.dll'.
Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.TeamFoundation.Test.WebApi.dll'.
Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.VisualStudio.Services.Common.dll'.
Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.VisualStudio.Services.WebApi.dll'.
Loading module from path 'C:\TestAgent\PrivateAssemblies\MS.VS.TestService.Client.Utility.dll'.
****************************************************************
Configure Test Agent
----------------------------------------------------------------
SetupPath : (C:\TestAgent)
TestUserName : (ccwebt1\ccwebt1local)
TfsCollection : (https://cc.visualstudio.com/)
AsServiceOrProcess : (Service)
EnvironmentUrl : (dta://env/2d109582-6dad-402e-8297-aa8de2398194/_apis//201709121137404659)
MachineName : (ccwebt1)
Capabilities : ()
TestAgentVersion : (14.0)
****************************************************************
Unable to connect to Team Foundation Server, Check if TFS is reachable from the test agent. Exception Details :
System.Management.Automation.MethodInvocationException: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred." ---> System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 104.214.111.103:443
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.<SendAsync>d__4.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\Common\VssHttpRetryMessageHandler.cs:line 159
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__48.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 818
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45`1.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 721
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\HttpClients\LocationHttpClient.cs:line 71
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<ConnectAsync>d__41.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\Location\ServerDataProvider.cs:line 692
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<EnsureConnectedAsync>d__39.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\Location\ServerDataProvider.cs:line 642
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<GetInstanceIdAsync>d__11.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\Location\ServerDataProvider.cs:line 174
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.Location.LocationService.<GetLocationDataAsync>d__2.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\Location\LocationService.cs:line 54
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssConnection.<GetClientInstanceAsync>d__18.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssConnection.cs:line 357
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssConnection.<GetClientServiceImplAsync>d__15.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssConnection.cs:line 299
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssConnection.<GetClientAsync>d__12`1.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssConnection.cs:line 227
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.TaskExtensions.SyncResult[T](Task`1 task) in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\TaskExtensions.cs:line 35
at Microsoft.VisualStudio.Services.WebApi.VssConnection.GetClient[T]() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssConnection.cs:line 195
at MS.VS.TestService.Client.Utility.TestExecutionServiceRestApiHelper.Initialize(String serviceUrl, String accesToken) in E:\v2.0\A5\_work\1\s\Ta\Agent\VS.TestService.Client.Utility\RestApiHelper.cs:line 108
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at MS.VS.TestService.Client.Utility.TestExecutionServiceRestApiHelper.RunTaskWithRetriesOnServiceUnavailability[T](Func`1 getTask) in E:\v2.0\A5\_work\1\s\Ta\Agent\VS.TestService.Client.Utility\RestApiHelper.cs:line 158
--- End of inner exception stack trace ---
at System.Management.Automation.DotNetAdapter.AuxiliaryConstructorInvoke(MethodInformation methodInformation, Object[] arguments, Object[] originalArguments)
at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[] constructors, Object[] arguments)
at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[] constructors, Object[] args)
Error occurred on 'ccwebt1:5985'. Details : 'The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Unable to connect to Team Foundation Server'. For troubleshooting, refer https://aka.ms/remotevstest.
******************************************************************************
Finishing: Deploy TestAgent on
******************************************************************************

Resources