Trying to deploy a Xamarin Android App to an emulator running on a Mac fails with error "Deployment Failed" along with Mono.AndroidTools.AdbException: secure_mkdirs failed: Permission denied
Update: The emulator was started by Android Studio. When I try to start the emulator from Visual Studio Mac, I get error
PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value [/Users/myname/Library/Developer/Xamarin/android-sdk-macosx]!
Below is an excerpt from the Deploying To Device pad round about where the errors start showing
...
Synchronizing assemblies
Synchronizing assemblies...
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: Deployment failed
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: Xamarin.AndroidTools.AndroidDeploymentException: FailedToSynchronizeFastDevAssemblies ---> Mono.AndroidTools.AdbException: secure_mkdirs failed: Permission denied
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Mono.AndroidTools.Util.AggregateAsyncResult.CheckError (System.Threading.CancellationToken token) [0x0002a] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/Util/AggregateAsyncResult.cs:72
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Mono.AndroidTools.Adb.AdbSyncClient.EndPushSyncItems (System.IAsyncResult result) [0x00006] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/Adb/AdbSyncClient.cs:1071
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Mono.AndroidTools.Internal.AdbClientTaskExtensions.InnerInvoke (System.Threading.Tasks.TaskCompletionSource`1[TResult] tcs, System.Func`2[T,TResult] endMethod, System.IAsyncResult l) [0x00000] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/Internal/AdbClientTaskExtensions.cs:256
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: --- End of stack trace from previous location where exception was thrown ---
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Xamarin.AndroidTools.AndroidDeploySession.InstallAssemblies (System.String destinationPath, System.Threading.CancellationToken token) [0x00339] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:614
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: --- End of inner exception stack trace ---
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Xamarin.AndroidTools.AndroidDeploySession.InstallAssemblies (System.String destinationPath, System.Threading.CancellationToken token) [0x003b5] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:622
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Xamarin.AndroidTools.AndroidDeploySession.FastDevAsync (System.Boolean useExternal) [0x000da] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:514
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Xamarin.AndroidTools.AndroidDeploySession.RunAsync (System.Threading.CancellationToken token) [0x004b0] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:229
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Xamarin.AndroidTools.AndroidDeploySession.RunLoggedAsync (System.Threading.CancellationToken token) [0x0002f] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:123
Done building target "_Upload" in project "xamarinwrapper.csproj" -- FAILED.
Done building project "xamarinwrapper.csproj" -- FAILED.
Build FAILED.
...
Well, I reinstalled Visual Studio for Mac, and created a new emulator using the Visual Studio Device Manager, started the emulator from Visual Studio Device Manager and it works now.
Related
Visual Studio for Mac v17.0.6
MacOS Monterey v12.4
Docker v20.10.7
Docker Desktop v3.5.2
I am trying to run my project in a Docker container on my Mac using Visual Studio for Mac. At work, I run this on a Windows 10 machine without issue, and I did not set it up myself on my work machine so I am not sure if there are any steps or settings I'm missing.
What I have tried:
Adding /Users/Blake/Desktop/WOF/WOFFirebase to the list of file sharing paths as suggested by the troubleshooting link provided in the stack trace. I am not surprised this didn't work because the documentation says this is only for Visual Studio, not Visual Studio For Mac.
Restarting visual studio
Changing permissions to the WOF and WOFFirebase directories to be as permissive as possible.
I am wondering if I need to explicitly run this as the root user, but I am not sure how I would do that. What should I do next?
Please let me know if any more info is needed. Here is the full stack trace:
/Applications/Visual Studio.app/Contents/MonoBundle/AddIns/MonoDevelop.Docker/MSbuild/Sdks/Microsoft.Docker.Sdk/build/Microsoft.VisualStudio.Docker.Compose.targets(5,5): Error MSB4018: The "PrepareForBuild" task failed unexpectedly.
Microsoft.VisualStudio.Containers.Tools.Common.ContainerToolsException: An error occurred trying to start process '/Users/Blake/Desktop/WOF/WOFFirebase/docker' with working directory '/Users/Blake/Desktop/WOF/WOFFirebase'. Permission denied.
For more troubleshooting information, go to https://aka.ms/DockerToolsTroubleshooting
---> System.ComponentModel.Win32Exception (13): An error occurred trying to start process '/Users/Blake/Desktop/WOF/WOFFirebase/docker' with working directory '/Users/Blake/Desktop/WOF/WOFFirebase'. Permission denied
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Microsoft.Docker.Utilities.CommandLineClient.<>c__DisplayClass0_0.<ExecuteAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.Docker.DockerClient.ExecuteAsync(CommandLineParameters cmdParameters, IDockerLogger logger, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.Docker.DockerClient.ExecuteAsync(CommandLineParameters cmdParameters, IDockerLogger logger, CancellationToken cancellationToken)
at Microsoft.Docker.DockerClientExtensions.GetServerOperatingSystemAsync(IDockerClient client, IDockerLogger logger, CancellationToken cancellationToken)
at Microsoft.Docker.Prerequisites.DockerTargetOSCheckPrerequisite.EvaluateAsync(CancellationToken cancellationToken)
at Microsoft.Docker.Prerequisites.DockerCompositePrerequisite.EvaluateAsync(CancellationToken cancellationToken)
at Microsoft.Docker.BuildTasks.DockerBuildTask.EvaluateBuildPrerequisitesAsync(Exception ex, DockerBuildTaskContext context)
at Microsoft.Docker.BuildTasks.DockerBuildTask.ExecuteAsync(DockerBuildTaskContext context)
at Microsoft.Docker.BuildTasks.DockerBuildTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
Error code: DT1003
Severity: Error
Command line: docker version --format {{.Server.Os}}
(MSB4018) (docker-compose)
I created a site in ASP.NET Core with VisualStudio and then copied the files to the server and linked IIS (8.5) to it.
I configured a binding with localhost:443.
However, when I browse to https://localhost:443 I obtain an error:
An error occurred while starting the application with the following message:
.NET Core 4.6.28008.01 X64 v4.0.0.0 | Microsoft.AspNetCore.Hosting version 2.1.1-rtm-30846 | Microsoft Windows 6.3.9600 | Need help?
When I access the site via dotnet .\MVF2.dll, I obtain the following critical error:
crit: Microsoft.AspNetCore.Server.Kestrel[0]
Unable to start Kestrel.
System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.BindAsync()
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass22_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
What's happening with Kestrel?
To see my Program.cs, Startup.cs and web.config see question https://stackoverflow.com/questions/59986062/website-deployment-via-iis-cant-access-site
I solved the problem. It was a problem with the app and connection strings.
I inserted in the web.config file in the server the option stdoutLogEnabled="true" and then saw the error in the log files.
This option is in the line of the file that says:
<aspNetCore processPath=".\myapp.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />
my Android app created in Xamarin has problem with internet connection, below is error code.
Time Device Name Type PID Tag Message
10-09 05:04:52.256 Genymotion Samsung Galaxy S7 - 6.0.0 - API 23 - 1440x2560 Error 1453 AndroidRuntime android.runtime.JavaProxyThrowable: System.Net.WebException: Error: ConnectFailure (Network is unreachable) ---> System.Net.Sockets.SocketException: Network is unreachable
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x000b6] in <6c708cf596db438ebfc6b7e012659eee>:0
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x0016d] in <6c708cf596db438ebfc6b7e012659eee>:0
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke (System.String method_name, System.Object[] parameters) [0x000a7] in <3f9824dbe67544e1805773e0a3dbdf6b>:0
at GWAWE.localhost.Service1.Get_Data () [0x00001] in <1baad81b40d64c6886bf076df034661f>:0
at (wrapper remoting-invoke-with-check) GWAWE.localhost.Service1:Get_Data ()
at gwawe.MainActivity.BuildLayout () [0x00031] in <1baad81b40d64c6886bf076df034661f>:0
at gwawe.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x0004e] in <1baad81b40d64c6886bf076df034661f>:0
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x0000f] in <9663139ab15947a89e15a6bcd9621f68>:0
at (wrapper dynamic-method) System.Object:e6ea694d-cf84-4098-a161-481a5ad1d4ae (intptr,intptr,intptr)
at md5a9dcb246785c0066d52ff25b77e1a72d.MainActivity.n_onCreate(Native Method)
at md5a9dcb246785c0066d52ff25b77e1a72d.MainActivity.onCreate(MainActivity.java:29)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Force finishing activity GWAWE.gwawe/md5a9dcb246785c0066d52ff25b77e1a72d.MainActivity
I'm using Visual Studio 2017 with Xamarin and Genymotion. Visual Studio, Xamarin and Genymotion are up to date. App is created only for Android 6.0.
In android manifest I added android.permission.RECEIVE_BOOT_COMPLETED.
I'm using "Wi-Fi" on emulator.
Application have to autostart after device boot up and error show only when I reboot emulator. If I run application manually everything works fine.
The application connects to IIS web service.
Does anybody have a clue what is going on here?
Well from what i understand either the internet permission isn't granted in your Android application or you do not have an internet connection, in case you don't have the permission all you have to do is add this line in your manifest.
<uses-permission android:name="android.permission.INTERNET" />
I'm having trouble connecting TeamCity server (TeamCity Enterprise 8.0.6 (build 27767)) to Viusal Studio Online. I have searched and read many articals with the following being helpful : -
Connecting TeamCity to TFS
Connecting TFS to TeamCity
Unfortunately these did not solve the current issue.
I can successfully connect to (https://bobtbuilder.visualstudio.com) via VS2013 as well as via web browser using the bob.t.builder#live.co.uk credentials. I have set up the Alternative authentication Credentials and try all combinations, but from the error log below the issue does not appear to be authentication based.
Here is the current error message : -
TFS failed. ExitCode: 111, command: "D:\Program Files (x86)\TeamCity\webapps\ROOT\WEB-INF\plugins\tfs\bin\tfs-native.exe" "##D:\Program Files (x86)\TeamCity\temp\TC-TFS-23-1111_263\command.params", in file: {https://bobtbuilder.visualstudio.com/DefaultCollection, /user:***** /password:***** /hash:S, /noProxy, D:\Program Files (x86)\TeamCity\temp\TC-TFS-23-1111_262.result, ConnectionTest, $/Builder}, completed in: 63 second(s)
stdout: TFS Native Verifier v8.0 Copyright (C) 2006-2013 JetBrains s.r.o.
Running under .NET Framework 4.0.30319.18408
INFO -
INFO - Use Team Explorer 2013
INFO -
TFS Native Accessor v8.0 Copyright (C) 2006-2013 JetBrains s.r.o.
INFO - Connecting to server https://bobtbuilder.visualstudio.com/DefaultCollection
INFO - WebProxy is disabled
Connection test:
Server='https://bobtbuilder.visualstudio.com/DefaultCollection'
Username='##LIVE##bob.t.builder#live.co.uk'
Root='$/Builder'
ERROR - TF400324: Team Foundation services are not available from server https://bobtbuilder.visualstudio.com/DefaultCollection.
Technical information (for administrator):
Unable to connect to the remote server
System.Exception: TF400324: Team Foundation services are not available from server https://bobtbuilder.visualstudio.com/DefaultCollection.
Technical information (for administrator):
Unable to connect to the remote server ---> Microsoft.TeamFoundation.TeamFoundationServiceUnavailableException: TF400324: Team Foundation services are not available from server https://bobtbuilder.visualstudio.com/DefaultCollection.
Technical information (for administrator):
Unable to connect to the remote server ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 65.52.8.37:443
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
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.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest webRequest, WebException& webException)
--- End of inner exception stack trace ---
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.ReadResponse(HttpWebResponse webResponse, WebException webException)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.IsAuthenticationChallenge(TfsMessage requestMessage, HttpWebResponse webResponse, WebException webException, TfsMessage& responseMessage)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequest()
at Microsoft.TeamFoundation.Client.Channels.TfsHttpRequestChannel.Request(TfsMessage message, TimeSpan timeout)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.Invoke(TfsClientOperation operation, Object[] parameters, TimeSpan timeout, Object[]& outputs)
at Microsoft.TeamFoundation.Framework.Client.Registration.GetRegistrationEntries(String toolId)
at Microsoft.TeamFoundation.Framework.Client.RegistrationProxy.GetRegistrationEntries(String toolId)
at Microsoft.TeamFoundation.Framework.Client.RegistrationService.RefreshMemoryCache()
at Microsoft.TeamFoundation.Framework.Client.RegistrationService.RefreshCachesIfNeeded(Boolean direct)
at Microsoft.TeamFoundation.Framework.Client.RegistrationService.GetRegistrationEntries(String toolId)
at Microsoft.TeamFoundation.Framework.Client.PreFrameworkServerDataProvider.FindServiceLocation(String serviceType, String toolId)
at Microsoft.TeamFoundation.Framework.Client.PreFrameworkServerDataProvider.LocationForCurrentConnection(String serviceType, Guid serviceIdentifier)
at Microsoft.TeamFoundation.Client.TfsConnection.EnsureProviderConnected()
at Microsoft.TeamFoundation.Client.TfsConnection.Disconnect()
at JetBrains.TeamCity.Tfs.TfsLogin.TFSDispose(TfsTeamProjectCollection t) in c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\TfsLogin_VS12.cs:line 17
at JetBrains.TeamCity.Tfs.TfsLoginBase`1.DoWithAuthenticatedConnection(String server, String username, String password, JBAction`1 action) in c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\TfsLogin.cs:line 48
at JetBrains.TeamCity.Tfs.Command.Do() in c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Command.cs:line 27
at JetBrains.TeamCity.Tfs.Program.Main(String[] args) in c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Program.cs:line 134
--- End of inner exception stack trace ---
at JetBrains.TeamCity.Tfs.Program.Main(String[] args) in c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Program.cs:line 438
Any help appreciated
I had almost exactly this problem and it was due to the companies proxy farking it up. You fix it by adding a file called internal.properties in your teamcity\data\config
with
teamcity.tfs.useSystemProxy=true
Obviously.
I have recently installed TFS 2013 on a single server (10 GB, 8 core XEON server). The installation also includes VS 2013 (pro). I tried to create a build definition and run the build, but the build immediately fails (see log below).
I tried to download the template (TfvcTemplate.12.xaml), but after what I think is a 90 second timeout I get a "One or more errors have occurred" message. When I open my local folder, the file has a size of 0 bytes.
Any idea what might be the cause?
Update
The downloading issue might be limited to the Visual Studio (2013 pro) instance that was installed on the TFS server. Downloading it on a different machine worked.
Build error log:
TF215097: An error occurred while initializing a build for build definition \TeamProject\Continuous-Build:
Exception Message: One or more errors occurred. (type AggregateException)
Exception Stack Trace: at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.TeamFoundation.Build.Client.FileContainerHelper.GetFile(TfsTeamProjectCollection projectCollection, String itemPath, Stream outputStream)
at Microsoft.TeamFoundation.Build.Client.FileContainerHelper.GetFileAsString(TfsTeamProjectCollection projectCollection, String itemPath)
at Microsoft.TeamFoundation.Build.Client.ProcessTemplate.Download(String sourceGetVersion)
at Microsoft.TeamFoundation.Build.Hosting.BuildControllerWorkflowManager.PrepareRequestForBuild(WorkflowManagerActivity activity, IBuildDetail build, WorkflowRequest request, IDictionary2 dataContext)
at Microsoft.TeamFoundation.Build.Hosting.BuildWorkflowManager.TryStartWorkflow(WorkflowRequest request, WorkflowManagerActivity activity, BuildWorkflowInstance& workflowInstance, Exception& error, Boolean& syncLockTaken)
Inner Exception Details:
Exception Message: An error occurred while sending the request. (type HttpRequestException)
Exception Stack Trace: at Microsoft.VisualStudio.Services.WebApi.VssHttpRetryMessageHandler.d_0.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.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.VisualStudio.Services.WebApi.HttpClientExtensions.d_2.MoveNext()
Inner Exception Details:
Exception Message: The underlying connection was closed: An unexpected error occurred on a receive. (type WebException)Exception Stack Trace: at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
Inner Exception Details:
Exception Message: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. (type IOException)
Exception Stack Trace: at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
Inner Exception Details:
Exception Message: An existing connection was forcibly closed by the remote host (type SocketException)
Exception Stack Trace: at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
Not sure what the problem was but clearing the cache in VS' appdata folder solved the problem.
For future reference, you can clear the cache by going into {User Profile Folder}\AppData\Local\Microsoft\Team Foundation\5.0\Cache
And delete its contents. Restart Visual Studio.
FYI - the 5.0 is the version of TFS (v5.0 is 2013). Your actual cache folder will depend on the version of TFS you're connecting to (4.0 is 2012, 3.0 is 2010, 2.0 is 2008, and 1.0 is 2005).