This ticket was originally posted at https://github.com/xamarin/Xamarin.Forms/issues/4335 and could be related to the issues here https://github.com/xamarin/xamarin-macios/issues/5098
The launch of debugger seems to build @bin/iPhone while the launcher appears to target @bin/iPhoneSimulator which makes the debug process fail. See screenshots for further evidence. Something appears to be wrong with some .target file i suppose.
Debugger should attach
Debugger does not attach properly because MAC picks the wrong cache path. Check screenshots for further indications on what is going wrong.
This is what i am getting in the Debugging part for my output window

This is what i am getting in the build part for my output window

My VS settings are to build for "iPhone" not "iPhoneSimulator". While the build part picks the correct platform, MSBuild seems to pass on the wrong arguments to the debugging process - thus the expected cache Path is not available and the debugger won't launch properly.
Note that i had to set up "iPhoneSimulator" previously in order to get a proper error message which pointed me to another build issue (on iPhoneSimulator msbuild told me i need to update XCode on mac, while iPhone gave me a generic error code with no additional information)
So there's something messy going on in the build chain right now.
.targets code used for my custom build integration script to deduct paths (build chain was regularly broken (automated symbol upload etc) because of target changes until i made a custom build script)
<CreateProperty Value="/Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/$(BuildSessionId)/bin/$(Platform)/$(Configuration)/"><Output PropertyName="MacBuildFolder" TaskParameter="Value" /></CreateProperty>
The used build properties are nothing unordinary as you can see.
VS bug #726153
I did some testing with my own Windows VM using Parallels (not VMWare) and I deployed an iOS Xamarin.Forms template project 10 out of 10 times without any issue using iPhone 5S iOS 12.1 simulator and building for my personal device consecutively. Do you see this happening with a specific project? Or it always happens even with a new project from the X.F/X.I templates?
Could you also attach your build host version information and the full logs? To see if we get more information on the issue.
@dalexsoto Sorry for the huge delay - Would you be willing to participate in a teamviewer session? I am sure that way you can obtain all the logs you want and see the issue in action.
2018-11-26_17-56-07.4900.Ide.log
2018-11-26_17-56-07.4900.XamarinLive.log
Here's the logs in case that's the issue. I didn't check yet if there is any indicator as to why the build path on mac is */iPhoneSimulator/ instead of */iPhone/
@dalexsoto first occurence of the error is line 2586 - for some reason it's using the wrong platform and therefore assembles the wrong path to launch the debugger. the build happens at */iPhone/
@taori I couldn't reproduce this, I've created a Xamarin Forms app, then I tried running it on device and simulator, switching between those several times but it worked fine for me. I've tried on VS 15.9.2. Am I missing any step?
Could you reproduce this issue one more time and attach the Xamarin Zip logs of that VS session? You can grab it from Help -> Xamarin -> Zip Logs (while connected to the Mac)
Also, could you attach the VS version information? (Help -> About Microsoft Visual Studio)
@emaf
I was on 15.8.x and updated to 15.9.2 today. Now launching the debugger works, at least when deploying to the tablet.
On tablet my debugger is locking up + freezing VS, on the iphone it won't deploy the app - i'll send you the logs of that issue tomorrow.
@emaf
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Xamarin.VisualStudio.IOS.AssetCatalog.AssetCatalogManager.<>c.
bei System.Linq.Enumerable.<>c__DisplayClass7_03.<CombineSelectors>b__0(TSource x)
bei System.Linq.Enumerable.WhereSelectListIterator2.MoveNext()
bei System.Linq.Enumerable.
bei Xamarin.VisualStudio.IOS.AssetCatalog.AssetCatalogManager.GetAppIconSetMissingSpecs(XCasset xcasset) in E:\A_work\21\s\src\Core\VisualStudio.IOS.AssetCatalog\AssetCatalogManager.cs:Zeile 185.
bei Xamarin.VisualStudio.IOS.AssetCatalog.AssetCatalogManager.LoadCatalogs() in E:\A_work\21\s\src\Core\VisualStudio.IOS.AssetCatalog\AssetCatalogManager.cs:Zeile 92.
bei Xamarin.VisualStudio.IOS.AssetCatalog.AssetCatalogFlavoredProject.
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs3324admin - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Information|0|Client vs3324admin - Dispatching PingResponse message to flow PingFlow
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs3324admin - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Information|0|Client vs3324admin - Dispatching PingResponse message to flow PingFlow
Xamarin.Messaging.Ssh.SshMessagingConnection|Error|0|An unexpected error occurred with the current SSH Session
Renci.SshNet.Common.SshConnectionException: Eine bestehende Verbindung wurde softwaregesteuert
durch den Hostcomputer abgebrochen ---> System.Net.Sockets.SocketException: Eine bestehende Verbindung wurde softwaregesteuert
durch den Hostcomputer abgebrochen
bei System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
bei Renci.SshNet.Abstractions.SocketAbstraction.Read(Socket socket, Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei Renci.SshNet.Session.SocketRead(Int32 length, Byte[] buffer)
bei Renci.SshNet.Session.ReceiveMessage()
bei Renci.SshNet.Session.MessageListener()
--- Ende der internen Ausnahmestapelüberwachung ---
System.Net.Mqtt.Sdk.Bindings.TcpChannel|Warning|0|The underlying communication stream has completed sending bytes. The observable sequence will be completed and the channel will be disposed
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs3324admin - Packet Channel observable sequence has been completed
System.Net.Mqtt.Sdk.MqttClientImpl|Information|0|Client vs3324admin - Disposing. Reason: SelfDisconnected
System.Net.Mqtt.Sdk.ClientPacketListener|Information|0|Disposing System.Net.Mqtt.Sdk.ClientPacketListener...
System.Net.Mqtt.Sdk.PacketChannel|Information|0|Disposing System.Net.Mqtt.Sdk.PacketChannel...
System.Net.Mqtt.Sdk.Bindings.TcpChannel|Information|0|Disposing System.Net.Mqtt.Sdk.Bindings.TcpChannel...
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Server State transition from ConnectedState to DisconnectedState on 192.168.107.39 (192.168.107.39)
Xamarin.Messaging.Ssh.MessagingService|Information|0|The underlying client has been closed
System.Net.Mqtt.Sdk.MqttClientImpl|Error|0|The client has been disconnected while trying to perform the unsubscribe to topics: xma/last-will
System.Net.Mqtt.Sdk.MqttClientImpl|Error|0|System.Net.Mqtt.MqttClientException: The client has been disconnected while trying to perform the unsubscribe to topics: xma/last-will
bei System.Net.Mqtt.Sdk.MqttClientImpl.
System.Net.Mqtt.Sdk.MqttClientImpl|Information|0|Client - Disposing. Reason: Error
Xamarin.Messaging.Ssh.MessagingService|Error|0|An error occurred on the underlying client while executing an operation. Details: Eine bestehende Verbindung wurde softwaregesteuert
durch den Hostcomputer abgebrochen
Xamarin.Messaging.Client.TopicObservable{System.String}|Error|0|System.Net.Mqtt.MqttClientException: The client has been disconnected while trying to perform the unsubscribe to topics: xma/last-will
bei System.Net.Mqtt.Sdk.MqttClientImpl.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Xamarin.Messaging.Client.TopicObservable`1.<
Note that the ipad oddly enough does start debugging and freezes, while the iphone won't get a deployment at all.
Good news - Updated VS on mac today again - Problem is gone. Deployment+Debugging works with both now
Bad news - Updated to VS2017.9.3 - Can't debug again.
Die App wurde beendet.
Fehler beim Starten. Die App "STM.iOS" konnte auf "Patricks iPad" nicht gestartet werden. Fehler: error MT1006: Could not install the application '/Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/d985896d390bb5f4261e98248db45c51/bin/iPhoneSimulator/Debug/STMiOS.app' on the device 'Patricks iPad': AMDeviceSecureInstallApplicationBundle returned: 0xe800801c.. Detaillierte Informationen finden Sie in den Protokollen.
Die App wurde beendet.
2018-12-10_12-03-46.2232.XamarinLive.log
4> STM.iOS -> D:\SVN\STM\src\STM.iOS\bin\iPhone\Debug\STMiOS.exe
4> Detected signing identity:
4> Code Signing Key: "iPhone Developer: Patrick Maurer (W7TPQ25663)" (D5350A530ABE0CC3D83F16A5CA26B397079DDD7A)
4> Provisioning Profile: "ST Mobile Dev Nov 2018" (c70d94fe-979a-4fc8-8759-d8413e381632)
4> Bundle Id: Solvum.SiteTracker.XMobile
4> App Id: Q9M6H4JA4A.Solvum.SiteTracker.XMobile
4>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(795,3): warning MT0129: Debugging symbol file for '/Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/d985896d390bb5f4261e98248db45c51/bin/iPhone/Debug/device-builds/ipad4.1-12.1/SQLite-net.dll' does not match the assembly and is ignored.
4>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(795,3): warning MT0129: Debugging symbol file for '/Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/d985896d390bb5f4261e98248db45c51/obj/iPhone/Debug/device-builds/ipad4.1-12.1/mtouch-cache/1-Link/SQLite-net.dll' does not match the assembly and is ignored.
4> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: removing global symbols from a final linked no longer supported. Use -exported_symbols_list at link time when building: /Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/d985896d390bb5f4261e98248db45c51/bin/iPhone/Debug/device-builds/ipad4.1-12.1/STMiOS.app/STMiOS
4> bin/iPhone/Debug/device-builds/ipad4.1-12.1/STMiOS.app: valid on disk
4> bin/iPhone/Debug/device-builds/ipad4.1-12.1/STMiOS.app: satisfies its Designated Requirement
4> bin/iPhone/Debug/device-builds/ipad4.1-12.1/STMiOS.app: explicit requirement satisfied
4> AfterTarget CopyIpaFromMac
4> AfterTarget CopyArchiveFromMac
4> AfterTarget Archive
4> 12:09:16 Connecting to SSH Client [email protected].
4> 12:09:16 Executing find /Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/d985896d390bb5f4261e98248db45c51/bin/iPhone/Debug/ -type d -name "*.dSYM" -print -quit | xargs dirname | xargs printf '%s/'
4> 12:09:16 ssh command result: /Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/d985896d390bb5f4261e98248db45c51/bin/iPhone/Debug//device-builds/ipad4.1-12.1/
4> 12:09:16 Disconnecting SSH Client.
4> Found MacDsymFolderPath on MAC: /Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/d985896d390bb5f4261e98248db45c51/bin/iPhone/Debug//device-builds/ipad4.1-12.1/
4> Downloading dSymFile: STMiOS.app.dSYM
4> Zipping Dsym Folder on Mac: /Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/d985896d390bb5f4261e98248db45c51/bin/iPhone/Debug//device-builds/ipad4.1-12.1/STMiOS.app.dSYM/
4> 12:09:16 Connecting to SSH Client [email protected].
4> 12:09:16 Executing cd /Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/d985896d390bb5f4261e98248db45c51/bin/iPhone/Debug//device-builds/ipad4.1-12.1/; zip -r -X STMiOS.app.dSYM.zip STMiOS.app.dSYM
4> 12:09:42 ssh command result: updating: STMiOS.app.dSYM/ (stored 0%)
4> updating: STMiOS.app.dSYM/Contents/ (stored 0%)
4> updating: STMiOS.app.dSYM/Contents/Resources/ (stored 0%)
4> updating: STMiOS.app.dSYM/Contents/Resources/DWARF/ (stored 0%)
4> updating: STMiOS.app.dSYM/Contents/Resources/DWARF/STMiOS (deflated 77%)
4> updating: STMiOS.app.dSYM/Contents/Info.plist (deflated 52%)
4>
4> 12:09:42 Disconnecting SSH Client.
4> Downloading zip file /Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/d985896d390bb5f4261e98248db45c51/bin/iPhone/Debug//device-builds/ipad4.1-12.1/STMiOS.app.dSYM.zip
4> 12:09:42 Connecting SFTP Client [email protected].
4> 12:09:42 Downloading "/Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/d985896d390bb5f4261e98248db45c51/bin/iPhone/Debug//device-builds/ipad4.1-12.1/STMiOS.app.dSYM.zip" to "D:\SVN\STM\src\STM.iOS\bin\iPhone\Debug\STMiOS.app.dSYM.zip".
4> 12:09:43 Disconnecting SFTP Client
4> Removing generated Zip-File on Mac: /Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/d985896d390bb5f4261e98248db45c51/bin/iPhone/Debug//device-builds/ipad4.1-12.1/STMiOS.app.dSYM.zip
4> 12:09:43 Connecting to SSH Client [email protected].
4> 12:09:43 Executing rm -rf /Users/admin/Library/Caches/Xamarin/mtbs/builds/STM.iOS/d985896d390bb5f4261e98248db45c51/bin/iPhone/Debug//device-builds/ipad4.1-12.1/STMiOS.app.dSYM.zip
4> 12:09:43 ssh command result:
4> 12:09:43 Disconnecting SSH Client.
4> Download Complete.
4> Looking for DsymFile at D:\SVN\STM\src\STM.iOS\bin\iPhone\Debug\
4> Found DsymFolder at D:\SVN\STM\src\STM.iOS\bin\iPhone\Debug\STMiOS.app.dSYM.zip
4> Does the build support symbol uploads? - True
4> Info.plist file used for ExtractVersionStringTask: D:\SVN\STM\src\STM.iOS\\Info.plist
4> Build variable PListVersion created: 1.0.25.0
4> Build variable BuildTimeFileFriendly created: 2018-12-10-12-09-43
4> Dumping Content Delivery Variables:
4> IsSymbolUploadEnabled 1
4> CopyToNetworkShare 0
4> AgentConfirmedUpload 1
4> CreateSvnBranch 0
4> IsSymbolUploadSupported True
4> Uploading symbol contents to AppCenter
4> 12:09:43 Executing UploadSymbolsTask.
4> 12:09:43 Located dSYM-File "D:\SVN\STM\src\STM.iOS\bin\iPhone\Debug\STMiOS.app.dSYM.zip".
4> 12:09:43 Uploading file to Mobile Center API ...
--snip--
CopyingFile - PercentComplete: 99%
CopyingFile - PercentComplete: 99%
CopyingFile - PercentComplete: 99%
CopyingFile - PercentComplete: 99%
CopyingFile - PercentComplete: 99%
CopyingFile - PercentComplete: 99%
CopyingFile - PercentComplete: 99%
CreatingStagingDirectory - PercentComplete: 5%
ExtractingPackage - PercentComplete: 15%
InspectingPackage - PercentComplete: 20%
TakingInstallLock - PercentComplete: 20%
PreflightingApplication - PercentComplete: 30%
VerifyingApplication - PercentComplete: 40%
ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.xfDvMq/extracted/STMiOS.app : 0xe800801c (No code signature found.)
@taori could you try rebuilding your app? It looks like there was a signing issue.
If that works and you're still facing this issue with incremental builds, could you upload a detailed build output for both builds (Rebuild and incremental build)?
@taori could you try rebuilding your app? It looks like there was a signing issue.
If that works and you're still facing this issue with incremental builds, could you upload a detailed build output for both builds (Rebuild and incremental build)?
detailed build output as in VS build log level @detail or is there something else i should set, too? Incremental build does not ring a bell to me btw.
Sorry, yes detailed means changing the build output verbosity to Detailed in Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity.
Regarding incremental builds, when you rebuild your app VS will run a full build of your project (it will run all MSBuild build targets), if after that you make changes and run a Build it will only run the MSBuild targets related to that change. From your description it seems that the incremental build is not running all necessary targets to make the app work.
So what I need here to identify the root cause of your problem are two build outputs, one from a full build (Rebuild, which I'm assuming will work) and another one after you make a change in your project (it could be adding a space to a cs file) and then you build it (this would be the incremental build, and I'm assuming this time the app will fail to run).
Is the app starting at all on the device?
No - The app won't deploy at all anymore currently. i've collected some logs for you.
I've cleaned the solutions + restarted the VS Computer + Mac which is used for building.
buildlog1.txt
buildlog2.txt
debuglog1.txt
buildlog3.txt
I hope you can make some sense of this. Note that after clean+restart "iPhone-Simulator" is "iPhone" (which also used to be an issue) now (as i would expect). It still won't deploy though.
@emaf this problem does not happen with a fresh solution so i'm going to migrate. Unsure what exactly changed, which made the build stop working but i hope this does not turn into a habbit of having to migrate projects manually.
@emaf Ok, this is odd:
and then i am getting this:

@dalexsoto, @xamarin-release-manager Can you give me a brief guideline on how to compile the build tasks environment in a fashion where there is the least amount of work required, so i can just build it from sources, replace it on my build machine and add logging to track this down myself?
It appears like you are either not interested in looking at this, because not everyone is experiencing this issue, or because your team might be on seasonal vacancy because of holidays. My management is really really really questioning development on xamarin, because of the nonstop build issues which break the build on a regular basis (every couple of weeks), for no apparent reason.
Most of the time i have issues others are having too, so there's usually already some workaround available - but this time i cannot seem to find out what exactly is wrong. And i think the reason is that there is a lack of logging at key places. Given that log quality and error feedback has been improved loads in the past - this message just doesnt deliver enough information to me.
@dalexsoto, @xamarin-release-manager Please add more logging the build tasks. In a desperate attempt of trying to fix this i updated the xamarin.forms nuget package.
I am used to being forced to update VS Mac+VS+XCode to be able to create builds - Being forced to update XF is new.
Correction. After a couple debug sessions it stopped working again. Now i'm getting this again...

Unerwarteter Fehler bei der RemoveDir-Aufgabe.
System.AggregateException: Mindestens ein Fehler ist aufgetreten. ---> System.ObjectDisposedException: Auf das verworfene Objekt kann nicht zugegriffen werden.
Objektname: "System.Net.Sockets.Socket".
bei System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue)
bei System.Net.Sockets.Socket.set_ReceiveTimeout(Int32 value)
bei Renci.SshNet.Abstractions.SocketAbstraction.Read(Socket socket, Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei Renci.SshNet.Session.SocketReadLine(TimeSpan timeout)
bei Renci.SshNet.Session.Connect()
bei Renci.SshNet.BaseClient.Connect()
bei Xamarin.Messaging.Ssh.SshCommandRunner.<ValidateConnectionAsync>b__8_0() in E:\A\_work\293\s\External\messaging\src\Xamarin.Messaging.Ssh\SshCommandRunner.cs:Zeile 121.
bei System.Threading.Tasks.Task.InnerInvoke()
bei System.Threading.Tasks.Task.Execute()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Xamarin.Messaging.Ssh.SshCommandRunner.<ValidateConnectionAsync>d__8.MoveNext() in E:\A\_work\293\s\External\messaging\src\Xamarin.Messaging.Ssh\SshCommandRunner.cs:Zeile 121.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Xamarin.Messaging.Ssh.SshCommandRunner.<ExecuteCommandAsync>d__5.MoveNext() in E:\A\_work\293\s\External\messaging\src\Xamarin.Messaging.Ssh\SshCommandRunner.cs:Zeile 81.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Xamarin.Messaging.Ssh.SshCommands.<RunCommandAsync>d__9.MoveNext() in E:\A\_work\293\s\External\messaging\src\Xamarin.Messaging.Ssh\SshCommands.cs:Zeile 98.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Xamarin.Messaging.Ssh.SshCommands.<DeleteDirectoryAsync>d__21.MoveNext() in E:\A\_work\293\s\External\messaging\src\Xamarin.Messaging.Ssh\SshCommands.cs:Zeile 220.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Xamarin.Messaging.Ssh.ISshServiceExtensions.<DeleteDirectoryAsync>d__6.MoveNext() in E:\A\_work\293\s\External\messaging\src\Xamarin.Messaging.Ssh\Extensions\ISshServiceExtensions.cs:Zeile 105.
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
bei System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
bei Microsoft.Build.Tasks.RemoveDir.Execute() in E:\A\_work\293\s\src\MSBuild\Xamarin.MacDev.Tasks\MsBuildTasks\RemoveDir.cs:Zeile 20.
bei Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
bei Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
---> (Interne Ausnahme #0) System.ObjectDisposedException: Auf das verworfene Objekt kann nicht zugegriffen werden.
Objektname: "System.Net.Sockets.Socket".
bei System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue)
bei System.Net.Sockets.Socket.set_ReceiveTimeout(Int32 value)
bei Renci.SshNet.Abstractions.SocketAbstraction.Read(Socket socket, Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei Renci.SshNet.Session.SocketReadLine(TimeSpan timeout)
bei Renci.SshNet.Session.Connect()
bei Renci.SshNet.BaseClient.Connect()
bei Xamarin.Messaging.Ssh.SshCommandRunner.<ValidateConnectionAsync>b__8_0() in E:\A\_work\293\s\External\messaging\src\Xamarin.Messaging.Ssh\SshCommandRunner.cs:Zeile 121.
bei System.Threading.Tasks.Task.InnerInvoke()
bei System.Threading.Tasks.Task.Execute()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Xamarin.Messaging.Ssh.SshCommandRunner.<ValidateConnectionAsync>d__8.MoveNext() in E:\A\_work\293\s\External\messaging\src\Xamarin.Messaging.Ssh\SshCommandRunner.cs:Zeile 121.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Xamarin.Messaging.Ssh.SshCommandRunner.<ExecuteCommandAsync>d__5.MoveNext() in E:\A\_work\293\s\External\messaging\src\Xamarin.Messaging.Ssh\SshCommandRunner.cs:Zeile 81.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Xamarin.Messaging.Ssh.SshCommands.<RunCommandAsync>d__9.MoveNext() in E:\A\_work\293\s\External\messaging\src\Xamarin.Messaging.Ssh\SshCommands.cs:Zeile 98.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Xamarin.Messaging.Ssh.SshCommands.<DeleteDirectoryAsync>d__21.MoveNext() in E:\A\_work\293\s\External\messaging\src\Xamarin.Messaging.Ssh\SshCommands.cs:Zeile 220.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Xamarin.Messaging.Ssh.ISshServiceExtensions.<DeleteDirectoryAsync>d__6.MoveNext() in E:\A\_work\293\s\External\messaging\src\Xamarin.Messaging.Ssh\Extensions\ISshServiceExtensions.cs:Zeile 105.<--- STM.iOS
@taori, sorry for the late response. We are still investigating your problem, all the build logs you attached show the build failed because of a connection issue.
Could you reproduce your issue once more and attach the detailed build output and the Xamarin logs? We need this info to correlate the build error with the connection problem on the Mac side. You can get the Xamarin logs from Help -> Xamarin -> Zip Logs (last 7 days), just in case the latest one doesn't give us a hint.
How are you connecting to your Mac (is your Mac connected to your LAN, are you running on a Mac + Windows on a VM, are you using any kind of Mac in the cloud service, etc)?
@emaf np. thought you're not getting notified anymore or something. i'm afraid it'll take a while to provide you those logs unless i happen to drive by the office. i'm on vacancy now so it might take up to two weeks.
build agent is a mac book pro connected to a switch on lan, right next to the laptop (also connected to that very same switch) i'm running windows on + VM (also windows) with VS 2017.9.4.
Whatever was different about the build tasks from XF 3.1 -> XF 3.4 temporarily fixed the issue. i was able to have about 3-4 debug sessions. At some point when i set a break point and interacted with the app VS froze, so i disconnected the cable to the phone, which did not unfreeze VS - after that i figured i'd restart the mac to detach the debugger that way.
After that i debugged the application again, which started up the application and froze in that state, the phone started getting hot, so i detached it again, closed the app on phone and restarted VM+build agent to try reset it. After that i was no longer able to get any debugging session working.
@emaf here's the logs you requested. i hope that helps with the investigation.
logs.zip
@taori sorry, I didn't make ir clear, but you must be connected to the Mac while you run the Zip Logs Command so VS will also grab the logs from the Mac. The logs you attached are only from Windows side.
@emaf could you please share with me , where the logs are stored on a mac, so i can extract them manually when i am back at work?
i checked https://docs.microsoft.com/de-de/xamarin/cross-platform/troubleshooting/questions/version-logs but i am not sure which one is the right one
@taori, sorry for the late response, the path to the logs on the Mac is /Users/<User>/Library/Logs/Xamarin-<Xamarin Version>/
@emaf
mac-logs.zip
there you go.
After starting to work today debugging worked once - canceled debugging.
And then it isn't working again:
latest_crash.zip
@taori are you still using Visual Studio 15.9.2? We have a potential fix, and we'd like to share new bits with you so you can confirm if that fixes your issue, but we need to know the exact VS version you are using.
@emaf i am on 15.9.4 now. I am available for a teamviewer session too, if that would help.
@taori I'd need an email address where I can send you a link to the private bits.
The connection problem that was preventing @taori from being able to debug has been fixed on Visual Studio 2019 Preview 3. He confirmed the fix with private bits that I've shared with him.
Closing this issue besides he's still facing other problems (e.g. hangs while debugging) because those are already being tracked on the Visual Studio Developer Community.
Most helpful comment
Good news - Updated VS on mac today again - Problem is gone. Deployment+Debugging works with both now