Bug 59601 - Xamarin Inspector "unable to connect"
Summary: Xamarin Inspector "unable to connect"
Status: RESOLVED FIXED
Alias: None
Product: Workbooks & Inspector
Classification: Xamarin
Component: Actually Unsure ()
Version: 1.3.0 RC 2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: xamarininteractive
URL:
Depends on:
Blocks:
 
Reported: 2017-09-20 13:18 UTC by Roy Cornelissen
Modified: 2017-09-21 00:21 UTC (History)
3 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 Roy Cornelissen 2017-09-20 13:18:58 UTC
Just updated all VS2017 for Mac and Xamarin and Xcode 9 tooling, and now Xamarin Inspector is unable to connect to my iOS app.

Reproduction:

- Create new Forms app (just take the template solution)
- Launch using iOS simulator
- Try to open Xamarin Inspector

Inspector loads, but says "unable to connect"

Grabbed this from Xamarin Inspector log:

Xamarin Inspector
Copyright 2016-2017 Microsoft. All rights reserved.
Copyright 2014-2016 Xamarin Inc. All rights reserved.
├─ Version: 1.3.0
├─ Date: 9/14/2017 11:21:26 PM
├─ Hash: 8c298a58396c5ee0d97ca0d3ab87dd89f6eb6ee8
├─ Branch: 1.3-release
└─ Lane: Workbooks & Inspector (Mac)

[Info][00:00:00.1221260] AppSession (.ctor): Starting Xamarin Inspector client @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/AppSession.cs:75
[Info][00:00:00.2733760] Telemetry (.ctor): Telemetry Session ID: f2bfebe4-c43c-44be-b965-37a1bb2bd6d0 @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Telemetry/Client.cs:64
[Info][00:00:00.4636580] UpdaterService (CheckForUpdatesInBackground): checking for updates @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Client/Updater/UpdaterService.cs:247
[Info][00:00:00.5933120] SessionDocument (ReadFromUrl): url: xamarin-interactive://127.0.0.1:54359/v1?agentType=iOS&sessionKind=LiveInspection&assemblySearchPath=%252FUsers%252Froy%252FProjects%252Finspector%252FiOS%252Fbin%252FiPhoneSimulator%252FDebug%252Finspector.iOS.app&assemblySearchPath=%252FLibrary%252FFrameworks%252FXamarin.Interactive.framework%252FVersions%252FCurrent%252FAgents%252FForms%252FiOS, typeName: Xamarin Inspector Session @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client.Mac/SessionDocument.cs:122
[Warning][00:00:00.8408970] WorkbookAppInstallation (LocateWorkbookApps): Unable to locate workbook apps manifest file: @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/WorkbookAppInstallation.cs:231
[Warning][00:00:00.8410110] WorkbookAppInstallation (LocateWorkbookApps):     /Library/Frameworks/Xamarin.Interactive.framework/Versions/Current @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/WorkbookAppInstallation.cs:233
[Warning][00:00:00.8410430] WorkbookAppInstallation (LocateWorkbookApps):     /Library/Frameworks/_build @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/WorkbookAppInstallation.cs:233
[Info][00:00:00.9849930] SessionDocument (MakeWindowControllers): Created Xamarin.Interactive.Client.Mac.SessionWindowController @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client.Mac/SessionDocument.cs:65
[Info][00:00:01.0309240] MessageViewController (LogMessage): PushMessage => Status: Loading session… @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Messages/MessageViewController.cs:126
[Info][00:00:01.1230240] UpdaterService (CheckForUpdatesInBackground): no updates are available @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Client/Updater/UpdaterService.cs:259
[Info][00:00:01.3047870] MessageViewController (LogMessage): PushMessage => Status: Loading session… @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Messages/MessageViewController.cs:126
[Info][00:00:01.5640740] MessageViewController (LogMessage): PushMessage => Status: Loading session… @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Messages/MessageViewController.cs:126
[Info][00:00:01.8154230] MessageViewController (LogMessage): PushMessage => Status: Loading session… @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Messages/MessageViewController.cs:126
[Info][00:00:01.8354520] MessageViewController (LogMessage): PushMessage => Status: Loading session… @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Messages/MessageViewController.cs:126
[Info][00:00:02.1605240] MessageViewController (LogMessage): PushMessage => Status: Connecting to agent… @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Messages/MessageViewController.cs:126
inspector (:54359) => [Info][00:00:00.1438930] iOSAgent (Start): iOS 'inspector' is available for interaction: xamarin-interactive://127.0.0.1:54359/v1?agentType=iOS&sessionKind=LiveInspection @ /Users/builder/vsts/_work/1/s/Agents/Xamarin.Interactive/Core/Agent.cs:267
[Info][00:00:02.3806810] MessageViewController (LogMessage): PushMessage => Status: Preparing workspace… @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Messages/MessageViewController.cs:126
inspector (:54359) => [Info][00:00:03.1272820] iOSAgent (ChangeDirectory): /Users/roy/Library/Developer/CoreSimulator/Devices/3482B095-005F-407C-82D4-77871BDA33F9/data/Containers/Bundle/Application/68E69D42-353B-4141-9E64-EEE1AF3B8398/inspector.iOS.app → /Users/roy/Library/Developer/CoreSimulator/Devices/3482B095-005F-407C-82D4-77871BDA33F9/data/Containers/Data/Application/8E4728F3-9D9E-4FF1-A73A-CFAEE7142BB3/tmp/ @ /Users/builder/vsts/_work/1/s/Agents/Xamarin.Interactive/Core/Agent.cs:315
[Warning][00:00:02.4096650] CompilationWorkspaceFactory (CreateDependencyResolver): Assembly search path /Users/roy/Projects/inspector/iOS/bin/iPhoneSimulator/Debug/inspector.iOS.app does not exist @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Compilation/CompilationWorkspaceFactory.cs:152
[Info][00:00:02.4098790] CompilationWorkspaceFactory (CreateDependencyResolver): Searching assembly path /Library/Frameworks/Xamarin.Interactive.framework/Versions/Current/Agents/Forms/iOS @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Compilation/CompilationWorkspaceFactory.cs:141
[Error][00:00:02.5436630] ClientSession (DoInitalizeAgentConnectionAsync): exception: System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.Interactive.Compilation.CompilationWorkspaceFactory+<LoadFormsAgentExtensions>d__2.MoveNext () [0x00096] in <9af224203bff445e870e4a0349ac3dab>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at Xamarin.Interactive.Compilation.CompilationWorkspaceFactory+<CreateWorkspaceAsync>d__1.MoveNext () [0x002d0] in <9af224203bff445e870e4a0349ac3dab>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at Xamarin.Interactive.Client.ClientSession+<InitializeCompilationWorkspaceAsync>d__79.MoveNext () [0x001ba] in <9af224203bff445e870e4a0349ac3dab>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <463ad22d355a435b87aa05c7fe124ac8>:0 
  at Xamarin.Interactive.Client.ClientSession+<DoInitalizeAgentConnectionAsync>d__66.MoveNext () [0x0015f] in <9af224203bff445e870e4a0349ac3dab>:0  @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Client/ClientSession.cs:328
[Error][00:00:02.5455470] MessageViewController (LogMessage): PushMessage => Alert: Unable to connect (Object reference not set to an instance of an object) @ /Users/builder/vsts/_work/1/s/Clients/Xamarin.Interactive.Client/Messages/MessageViewController.cs:126
Comment 1 Aaron Bockover [MSFT] 2017-09-20 13:44:30 UTC
Are you on the Xamarin Stable channel (e.g. 15.3)?
Comment 2 Sandy Armstrong [MSFT] 2017-09-20 14:00:59 UTC
Hi Roy, thanks for filing!

Please copy the Visual Studio version information as directed on https://developer.xamarin.com/guides/cross-platform/inspector/install/#Reporting_Bugs

That will help us a lot.
Comment 3 Sandy Armstrong [MSFT] 2017-09-20 14:02:49 UTC
Oh, and also what version of Xamarin.Forms is your app referencing?
Comment 4 Roy Cornelissen 2017-09-20 14:07:53 UTC
Sure, sorry for the omission.

Yes, Stable channel, updated this morning. See version info below. We were on Xamarin.Forms 2.3.4.267 but after updating to 2.3.4.270 the error still occurs.

=== Visual Studio Enterprise 2017 for Mac ===

Version 7.1.5 (build 2)
Installation UUID: 0f8a58b3-11bb-433e-b7a2-4c0319bee350
Runtime:
	Mono 5.2.0.224 (d15-3/14f2c81) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000224

=== NuGet ===

Version: 4.3.0.2418

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	1.1.1
	1.1.0
	1.0.4
SDK: /usr/local/share/dotnet/sdk/1.0.3/Sdks
SDK Versions:
	1.0.3
	1.0.0-preview2-1-003177
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.5
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 7.4.5.1 (Visual Studio Enterprise)
Android SDK: /Users/roy/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		5.0 (API level 21)
		5.1 (API level 22)
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 26.0.0
SDK Build Tools Version: 26.0.1

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Apple Developer Tools ===

Xcode 9.0 (13247)
Build 9A235

=== Xamarin.Mac ===

Version: 3.6.3.3 (Visual Studio Enterprise)

=== Xamarin.iOS ===

Version: 11.0.0.0 (Visual Studio Enterprise)
Hash: 152b654a
Branch: xcode9
Build date: 2017-09-15 02:25:56-0400

=== Xamarin Inspector ===

Version: 1.3.0
Hash: 8c298a5
Branch: 1.3-release
Build date: Thu, 14 Sep 2017 21:21:26 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 701050002
Git revision: 7afedcaef8e7542e70e3cf8f9bdb26938b8c0876
Build date: 2017-09-15 08:39:58-04
Xamarin addins: 3262aadf811a18c12eac6742532d052b0139a808
Build lane: monodevelop-lion-d15-3-xcode9

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

MFractor 3.02.07
xUnit.NET 2 testing framework support 0.7.7
Straight8's SpecFlow Integration 1.11.1.0
Gorilla Player 1.0.0.15
Comment 5 Sandy Armstrong [MSFT] 2017-09-20 15:07:26 UTC
Hi again. So, this is a bug in our IDE extension, and it's fixed in 15.4 (the version of Xamarin currently in beta and alpha channels).

You can work around this issue by going to your iOS project settings, and unchecking Build -> iOS Build -> Enable device-specific builds.

Sorry for the trouble. We will also update the Inspector client to not break the connection when this happens. There may be reduced functionality (like no XF integration in Inspector) for those cases.
Comment 6 Aaron Bockover [MSFT] 2017-09-21 00:21:16 UTC
Marking as fixed now. 1.3.1 will be out tomorrow that fixes this connection error, and as Sandy mentioned, this is fixed completely in 15.4 (Alpha, Beta), or you can work around it in 15.3.