Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
We have multiple reports of connected iOS devices not showing up in the device list in Visual Studio. So far, all reports coming in have been running VS 2013, Xcode 6.0.1, and XS 5.4 (they're on the current stable).
All reporters have been able to debug on their device using Xcode on their Macs.
## Steps to reproduce
I have personally been unable to reproduce the issue at hand. I attempted to do so using an iPhone 6 on iOS 8 using a project file that was confirmed to not work that was provided by a customer.
## Expected results
Visual Studio users should be able to see their connected device in the device list in Visual Studio and be able to test on said device.
## Actual results
Device does not show up in device list in Visual Studio.
## Version information
Each report will be added privately with version attachments
I have tried to reproduce this issue but not able to reproduce this.
To check this issue, I have used 3 iOS devices (iPhone 4S(7.1.2), iPhone 4S(8.0), iPhone 5S(8.0)) and I am able to see all the connected devices in VS device list and I am able to deploy applications on all connected devices successfully.
Screencast : http://www.screencast.com/t/8foHkCk4
Please let me know if I am missing anything.
Environment Info :
Some users on the forums have reported that downloading and reinstalling the Xamarin package from https://store.xamarin.com/account/my/subscription/downloads helped with the problem:
@Dominique N: that attachment 8177 [details] (case 3) shows the customer is using a WAY old build of XamarinVS, 3.0!
Created attachment 8218 [details]
mtbserver.log with exceptions
When this problem occurs for me I see a bunch of ArgumentNullExceptions being printed to my mtbserver.log (snip attached) on the mac build host.
QA has repro'd the reported issue against build Xamarin VS 3.6.249, VS 2013 with Update 3, and Xcode 6.0.1, and as initially reported, 3 iphone devices are in fact missing in the device list (iPhone 4S(7.1.2), iPhone5S(8.0), iPhone 6(8.0)).
QA has verified that candidate build 3.6.262 fixes this issue when tested with VS 2013 with Update 3, and Xcode 6.0.1. The 3 iphone devices are now present in the device list(iPhone 4S(7.1.2), iPhone5S(8.0), iPhone 6(8.0)).
Candidate 3.6.249 should improve the connectivity with Mac Build Host.
Setting the status of this bug to verified / Fixed.
Unfortunately, I must re-open this bug because it is not yet fully resolved.
Based on the stack trace, I'd guess that the changes related to `Mtb.Server.DeviceListener` and `Mtb.Server.Commands.ListDevices.GetDevices()` from bug 23321 might stop this problem (bug 23353) too.
But in case those fixes *don't* stop the problem, here is some additional information.
## The error is intermittent
On at least a few users' machines, this problem is appearing and disappearing "unpredictably."
For example, in one case where I looked at the problem first-hand, the `Mtb.Server.DeviceListener.GetDevices()` command would fail repeatedly with the ArgumentNullException. But then, after both computers had been left untouched for a few minutes, the problem would eventually stop, and the device list in Visual Studio would refresh correctly. As far as I could tell `mtbserver` did not crash or restart during this time: the `mtbserver` process ID stayed the same, and no new crash logs appeared in "Console.app -> User Diagnostic Reports". This system had Visual Studio installed in a Parallels VM on the Mac build host (OS X 10.9.5).
In another case, each time the user installed a new Xamarin update from the updater service, the problem would stop temporarily (for maybe a day or two).
## The exception message and stack trace
The exception that appears in the log files is nothing too fancy. Here's the top of the stack trace (from comment 9):
> Exception: Exception type: System.ArgumentNullException
> Argument cannot be null.
> Parameter name: version
> at System.Version..ctor (System.String version) [0x00000] in <filename unknown>:0
> at Mtb.Server.DeviceListener.<GetDevices>m__1 (Xamarin.MacDev.IPhoneDevice d) [0x00000] in <filename unknown>:0
For some reason the call to `Mtb.Server.DeviceListener.<GetDevices>m__1 (Xamarin.MacDev.IPhoneDevice d)` is attempting to create a new `System.Version` object with a null input:
> new System.Version(null)
Presumably this means that an earlier method call is failing silently and returning `null` instead of a valid version string like "7.1.2". That kind of failure sounds like it could be the result of an Objective-C method call or a failed `as` conversion. Just to make one guess, the explanation might be that Xcode 6 sometimes return `null` when the build server queries it for the iOS versions of the attached simulators and devices. This could even be an _intentional_ behavior of Xcode 6. If that is the case, then the Xamarin build server will need to be adjusted accordingly.
## Possible temporary workaround
If the problem does depend on Xcode 6, then switching back to Xcode 5 might be one way to work around the problem temporarily.
I've posted most of this information and a little more discussion about possible workarounds on the forums:
*** Bug 23657 has been marked as a duplicate of this bug. ***
I think we might now have at least 1 reliable way to reproduce this problem thanks to a forum comment . Unfortunately the problem still exists on the latest hotfix builds from yesterday.
>  http://forums.xamarin.com/discussion/comment/81048/#Comment_81048
In short: enable "Sync with this iPhone over Wi-Fi" in iTunes for a device within Wi-Fi range.
## Steps I followed to reproduce
1. Start the Xamarin.iOS Build Host.
2. Attach iPhone 4s, iOS 7.1.2.
3. Open iTunes 12.0.1.
4. Select the iPhone icon toolbar under the rewind, play, fast-forward controls.
5. Enable "Sync with this iPhone over Wi-Fi", and then click "Apply".
6. Open an iOS project in Visual Studio.
If I leave iTunes running after step 6, then as long as I have the "Sync with this iPhone over Wi-Fi" setting enabled I _always_ hit the problem, and I get the same stack trace from comment 9.
## "Workaround" (for this particular way to reproduce the problem)
I can then stop the problem with the following 2 steps:
1. Disable the "Sync with this iPhone over Wi-Fi", and click "Apply".
2. Quit iTunes.
## Version information
Xamarin 22.214.171.124 (bde1ced5c221b04ff6c6c147e50fd5ca0000cbd1)
Xamarin.Android 126.96.36.199 (c0168255507205e3f50aba560ccf971c41a682ff)
Xamarin.iOS 188.8.131.52 (06812e63c56a62c5ed6298167da3c71c6baf8852)
Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Windows 8.1 64-bit (VMWare Fusion 6.0.5)
### Mac build host
Xamarin.iOS 184.108.40.206 (Business Edition)
Build date: 2014-10-15 21:44:26-0400
Xcode 6.0.1 (6528), Build 6A317
Mono 3.10.0 ((detached/e204655)
Mac OS X 10.9.5
I can further confirm the problem does not occur using the same conditions from comment 16 if I downgrade to Xamarin 3.5.58 + Xamarin.iOS 220.127.116.11.
After downgrading, I can successfully deploy and debug on the iPhone 4s, iOS 7.1.2. For this particular test, I didn't bother to downgrade Xcode, so I was still using Xcode 6.0.1. Of course, downgrading to Xcode 5 would be necessary in order to use the simulators.
*** Bug 23999 has been marked as a duplicate of this bug. ***
I verified this bug again with the following test environment and devices connected to the macbuild host are successfully retrieved and listed in VS instance. Also, more info can be found in bug 23999.
Windows 7 VM
This issue has been verified by QA and is fixed. Closing this bug.
Windows 8.1 VM