Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mlaunch fails to list AppleTV paired with Xcode #20579

Closed
viniciusjarina opened this issue May 8, 2024 · 8 comments
Closed

mlaunch fails to list AppleTV paired with Xcode #20579

viniciusjarina opened this issue May 8, 2024 · 8 comments
Labels
need-info Waiting for more information before the bug can be investigated

Comments

@viniciusjarina
Copy link

viniciusjarina commented May 8, 2024

mlaunch fails to list paired AppleTV device causing VSMac/Rider to not show AppleTV device. The device shows normally on Devices & Simulator

Xcode 15.3 15E204a
macOS 14.4.1
Xamarin.iOS Version: 17.2.0.43 Visual Studio Community - Hash: 2cb9d6666

viniciusjarina@JarinaM3:~$ /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch --version
Xamarin.Launcher 1.0.83 (refs/heads/main: 699ed5eaf2)

Steps to Reproduce

  1. Launch mlaunch with --listdev -v

  2. Get NullReferenceException:

error MT0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
System.NullReferenceException: Object reference not set to an instance of an object.
   at Xamarin.Hosting.RealDevice.ConnectToken() in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting/RealDevice.cs:line 121
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__273_0(Object)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread, ExecutionContext, ContextCallback, Object)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread, ExecutionContext, ContextCallback, Object)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task&, Thread )
--- End of stack trace from previous location ---
   at Xamarin.Hosting.RealDevice.IsUnlockedAsync() in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting/RealDevice.cs:line 192
   at Xamarin.Launcher.DevController.GetDeviceInfoAsync(RealDevice, Boolean) in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/controller-device.cs:line 678
   at Xamarin.Launcher.DevController.<>c__DisplayClass22_1.<<GetDevicesAsyncUsingAMDevice>b__2>d.MoveNext() in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/controller-device.cs:line 552

Expected Behavior

Actual Behavior

Environment

Version information

Build Logs

Example Project (If Possible)

@rolfbjarne
Copy link
Member

What's the exact command you're executing, and the output you're getting?

Which mlaunch version are you using?

@rolfbjarne rolfbjarne added the need-info Waiting for more information before the bug can be investigated label May 8, 2024
@rolfbjarne rolfbjarne added this to the Future milestone May 8, 2024
@viniciusjarina
Copy link
Author

@rolfbjarne sorry I click save before I was finish with details.

@microsoft-github-policy-service microsoft-github-policy-service bot added need-attention An issue requires our attention/response and removed need-info Waiting for more information before the bug can be investigated labels May 8, 2024
@rolfbjarne
Copy link
Member

@viniciusjarina what's the output of this command:

xcrun devicectl list devices --columns '*'

@rolfbjarne rolfbjarne added need-info Waiting for more information before the bug can be investigated no-auto-reply For internal use and removed need-attention An issue requires our attention/response labels May 9, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the no-auto-reply For internal use label May 9, 2024
@viniciusjarina
Copy link
Author

@rolfbjarne

viniciusjarina@JarinaM3:~$ xcrun devicectl list devices --columns '*'
Devices:
Name           Hostname                                     Identifier                             State                Model                                    UDID                                       Serial Number   Platform   OS Version   OS Build
------------   ------------------------------------------   ------------------------------------   ------------------   --------------------------------------   ----------------------------------------   -------------   --------   ----------   --------
AppleTV HD     AppleTV-HD.coredevice.local                  D6C7BAB4-E3F4-4B90-BF82-01143A447DA0   connected            Apple TV (4th generation) (AppleTV5,3)   6c5914ee452a524dfa501e3d5c67bc58e2e562b3   C07FP7610FNL    tvOS       21L227       17.4    
eyePhone13     eyePhone13.coredevice.local                  A52E15D1-87CA-4231-888C-59F26E354791   connected            iPhone 13 (iPhone14,5)                   00008110-00041D440239A01E                  VHJQX5FXXR      iOS        21E237       17.4.1  
eyePhoneMini   00008110-00064912349B801E.coredevice.local   E7207BFC-EE38-4066-8574-9D1929311535   available (paired)   iPhone 13 mini (iPhone14,4)              00008110-00064912349B801E                  VVHHCV716C      iOS        21E236       17.4.1  

@microsoft-github-policy-service microsoft-github-policy-service bot added need-attention An issue requires our attention/response and removed need-info Waiting for more information before the bug can be investigated labels May 10, 2024
@viniciusjarina
Copy link
Author

i tried to forgot and repair. But still hit the same NRE:

error MT0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
System.NullReferenceException: Object reference not set to an instance of an object.
   at Xamarin.Hosting.RealDevice.ConnectToken() in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting/RealDevice.cs:line 121
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__273_0(Object)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread, ExecutionContext, ContextCallback, Object)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread, ExecutionContext, ContextCallback, Object)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task&, Thread )
--- End of stack trace from previous location ---
   at Xamarin.Hosting.RealDevice.IsUnlockedAsync() in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting/RealDevice.cs:line 192
   at Xamarin.Launcher.DevController.GetDeviceInfoAsync(RealDevice, Boolean) in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/controller-device.cs:line 678
   at Xamarin.Launcher.DevController.<>c__DisplayClass22_1.<<GetDevicesAsyncUsingAMDevice>b__2>d.MoveNext() in /Users/builder/azdo/_work/2/s/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/controller-device.cs:line 552

@rolfbjarne
Copy link
Member

Can you try using the mlaunch in this NuGet, and see if that works better?

https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.Tools.Mlaunch/overview/1.0.162-ci.pr.gh2813.162%2006007cf77d

I can't reproduce this, so we might have to iterate a few times until it's fully working.

@rolfbjarne rolfbjarne added need-info Waiting for more information before the bug can be investigated and removed need-attention An issue requires our attention/response labels May 21, 2024
Copy link
Contributor

Hi @viniciusjarina. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Copy link
Contributor

Hi @viniciusjarina. Due to inactivity, we will be closing this issue. Please feel free to re-open this issue if the issue persists. For enhanced visibility, if over 7 days have passed, please open a new issue and link this issue there. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-info Waiting for more information before the bug can be investigated
Projects
None yet
Development

No branches or pull requests

2 participants