Bug 12728 - "Failed to show Connection Wizard" error
Summary: "Failed to show Connection Wizard" error
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.1.x
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Jose Miguel Torres
URL:
Depends on:
Blocks:
 
Reported: 2013-06-17 15:39 UTC by Jörg B.
Modified: 2013-06-17 17:15 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Jörg B. 2013-06-17 15:39:12 UTC
Hello there,

I started playing with a HelloWorld project, left my machine (Windows 8 / VS2012 / Xamarin.iOS 1.1) alone for dinner, came back & wanted to continue fiddling, however I could not run my project on my Mac (even though that one never went to sleep or anything (explicitely prohibit/prevent that)) and the following information was shown in the Debug Output:

Mono.IOS.VisualStudio.BuildServerAddressProvider.BuildServerAddressProvider Warning: 0 : Failed to show Connection Wizard
System.InvalidOperationException: The current SynchronizationContext may not be used as a TaskScheduler.
   at System.Threading.Tasks.SynchronizationContextTaskScheduler..ctor()
   at Mono.IOS.VisualStudio.Wizard.BuildServerDialogBase..ctor()
   at Mono.IOS.VisualStudio.Wizard.ConnectionWizardDialog..ctor()
   at Mono.IOS.VisualStudio.BuildServerAddressProvider.BuildServerAddressProvider.ShowExplorer()
   at Mono.IOS.VisualStudio.BuildServerAddressProvider.BuildServerAddressProvider.Start(BuildServerAddressContext context)
'HelloWorld_App1.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'
'HelloWorld_App1.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'
'HelloWorld_App1.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'
'HelloWorld_App1.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'
'HelloWorld_App1.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'
'HelloWorld_App1.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'
'HelloWorld_App1.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'
'HelloWorld_App1.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\joerg\Development\spottd\Prototyping\HelloWorld_App1\HelloWorld_App1\bin\iPhoneSimulator\Debug\HelloWorld_App1.vshost.exe'
'HelloWorld_App1.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'
The thread 'vshost.NotifyLoad' (0x17a0) has exited with code 0 (0x0).
The thread 'vshost.LoadReference' (0xe0) has exited with code 0 (0x0).
'HelloWorld_App1.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\joerg\Development\spottd\Prototyping\HelloWorld_App1\HelloWorld_App1\bin\iPhoneSimulator\Debug\HelloWorld_App1.exe', Symbols loaded.
The program '[5432] HelloWorld_App1.vshost.exe: Managed (v4.0.30319)' has exited with code -1 (0xffffffff).


Looking at the Mac Server Log revealed something similiar:

[2013-06-17 20:54:50.3] ERROR: Another instance is running
Mono.IOS.VisualStudio.BuildServerAddressProvider.BuildServerAddressProvider Warning: 0 : Failed to show Connection Wizard
System.InvalidOperationException: The current SynchronizationContext may not be used as a TaskScheduler.
   at System.Threading.Tasks.SynchronizationContextTaskScheduler..ctor()
   at Mono.IOS.VisualStudio.Wizard.BuildServerDialogBase..ctor()
   at Mono.IOS.VisualStudio.Wizard.ConnectionWizardDialog..ctor()
   at Mono.IOS.VisualStudio.BuildServerAddressProvider.BuildServerAddressProvider.ShowExplorer()
   at Mono.IOS.VisualStudio.BuildServerAddressProvider.BuildServerAddressProvider.Start(BuildServerAddressContext context)
Mono.IOS.VisualStudio.BuildServerAddressProvider.BuildServerAddressProvider Warning: 0 : Failed to show Connection Wizard
System.InvalidOperationException: The current SynchronizationContext may not be used as a TaskScheduler.
   at System.Threading.Tasks.SynchronizationContextTaskScheduler..ctor()
   at Mono.IOS.VisualStudio.Wizard.BuildServerDialogBase..ctor()
   at Mono.IOS.VisualStudio.Wizard.ConnectionWizardDialog..ctor()
   at Mono.IOS.VisualStudio.BuildServerAddressProvider.BuildServerAddressProvider.ShowExplorer()
   at Mono.IOS.VisualStudio.BuildServerAddressProvider.BuildServerAddressProvider.Start(BuildServerAddressContext context)


Whatever the cause is, seems like there is a bug in iOS for VS's usage of the TPL's synchronization context.

So to sum up it up - both machines were up inbetween my 'leave', both are connected via local lan and it did work just fine the first our of coding, not sure what happened inbetween.

-J
Comment 1 Jörg B. 2013-06-17 16:53:08 UTC
I just realized I left out some details regarding the environment for reproducability's sake: I had pasta with zucchini and oyster mushrooms for dinner. Not sure if that helps to track the cause down, but it was delicious ;)
Comment 2 Jose Miguel Torres 2013-06-17 17:15:41 UTC
Hi Joerg,

Yes we are improving the TPL handling during iOS session. Actually is going to be fixed in the next release.

Please let us know if you came across with this issue in the future, meanwhile I will leave it as fixed.

PS: I am glad you enjoyed your dinner.