Bug 26039 - mandroid error XA0020 Unable to launch daemon
Summary: mandroid error XA0020 Unable to launch daemon
Status: RESOLVED ANSWERED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: 3.8
Hardware: PC Windows
: Highest critical
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-14 16:44 UTC by John Miller [MSFT]
Modified: 2015-08-06 18:30 UTC (History)
8 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 ANSWERED

Description John Miller [MSFT] 2015-01-14 16:44:39 UTC
**Overview:**

   User reports intermittent error when building a solution. Building each individual project in the solution does not seem to run into this issue. 

**Steps to Reproduce:**

   Nothing reliable yet. 

**Actual Results:**

   C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(379,2): mandroid error XA0020: Unable to launch daemon.

**Expected Results:**

   No error. 

**Build Date & Platform:**

   XVS 3.8.150
   XA 4.20

**Additional Information:**

   Attached is full version info and logs from the case reporting this.
Comment 3 John Miller [MSFT] 2015-01-19 00:01:17 UTC
Having multiple Visual Studios open might cause this.
Comment 5 matthew.thomas 2015-07-28 15:48:33 UTC
Our team is also experiencing this without having multiple instances of Visual Studio open.
Comment 6 Jonathan Pryor 2015-07-30 22:53:08 UTC
The logs don't entirely make sense to me.

Firstly, there's this NullReferenceException:

> Xamarin.VisualStudio.Shell.ShellPackage Error: 0 : [2015-01-10 08:04:22.0] Background task error
> System.NullReferenceException: Object reference not set to an instance of an object.
>    at Xamarin.InsightsCore.PlatformServices.<>c__DisplayClass4.<GetDeviceInfoData>b__3()
>    at System.Threading.Tasks.Task`1.InnerInvoke()
>    at System.Threading.Tasks.Task.Execute()

Xamarin.Android does not currently use Insights, so this should be unrelated.

Then there's this SocketException:

> Mono.AndroidTools.AndroidLogger Error: 0 : [2015-01-13 17:04:33.2] [E:]:                     Error in device tracker
> System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 127.0.0.1:5037
>    at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
>    at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult)
>    at Mono.AndroidTools.Adb.AdbClient.EndConnect(IAsyncResult asyncResult)
>    at Mono.AndroidTools.TrackDeviceTask.Connected(IAsyncResult r)

This is generated because the connection to `adb` was lost, which could only be a problem if using `adb` in the first place. (Are you using `msbuild  /t:Install`? Perhaps you could try `msbuild /t:SignAndroidPackage`?)