Bug 12594 - Activation on build for Android projects cause activation loops
Summary: Activation on build for Android projects cause activation loops
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.8.x
Hardware: Macintosh Mac OS
: High major
Target Milestone: 4.8 (async)
Assignee: Jonathan Pryor
URL:
: 10705 12330 13380 ()
Depends on:
Blocks:
 
Reported: 2013-06-07 11:17 UTC by Rodrigo Kumpera
Modified: 2013-08-15 22:44 UTC (History)
10 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 or GitHub 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:
VERIFIED FIXED

Description Rodrigo Kumpera 2013-06-07 11:17:49 UTC
Activating on build for Xamarin Android triggers an infinite activation loop.

I believe it's failing to activate me due to too many machines (I have two, but every other week activation forgets this).

Then, activation makes build fail, which triggers a rebuild, which triggers activation, which fails the build, which triggers a rebuild, which triggers activation, which fails the build.... you get the idea.

This is the second time this happens for me in the past 30 days.

The solution is to force quit XS and keep trying to activate it by other means until one stick. A process that sometimes takes an hour of my day.
Comment 1 Rodrigo Kumpera 2013-06-07 11:22:42 UTC
While franctically hitting esc to abort the activation loop I got this exceptions:

System.AggregateException: One or more errors occured ---> System.NullReferenceException: Object reference not set to an instance of an object
  at Xwt.GtkBackend.DialogBackend.SetButtons (IEnumerable`1 newButtons) [0x0001d] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.8-branch/0a09117d/source/monodevelop/main/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DialogBackend.cs:63 
  at Xwt.Dialog+WindowBackendHost.ItemRemoved (System.Object collection, System.Object item) [0x0001d] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.8-branch/0a09117d/source/monodevelop/main/external/xwt/Xwt/Xwt/Dialog.cs:60 
  at Xwt.DialogButtonCollection.ClearItems () [0x00021] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.8-branch/0a09117d/source/monodevelop/main/external/xwt/Xwt/Xwt/DialogButtonCollection.cs:84 
  at System.Collections.ObjectModel.Collection`1[Xwt.DialogButton].Clear () [0x00000] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs:84 
  at Xamarin.Components.Ide.ActivatingDialog.set_ActiveButton (Xwt.Command value) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.8-branch/0a09117d/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Activation/ActivatingDialog.cs:34 
  at (wrapper remoting-invoke-with-check) Xamarin.Components.Ide.ActivatingDialog:set_ActiveButton (Xwt.Command)
  at Xamarin.Components.Ide.Activation.ActivationWorkflowHelpers+<Activate>c__AnonStorey1D+<Activate>c__AnonStorey1E.<>m__3B (System.Threading.Tasks.Task`1 t) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.8-branch/0a09117d/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Activation/ActivationWorkflowHelpers.cs:225 
  at System.Threading.Tasks.TaskActionInvoker+ActionTaskInvoke`1[Xamarin.Components.Ide.Activation.ActivationOutcome].Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs:199 
  at System.Threading.Tasks.Task.InnerInvoke () [0x0000b] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading.Tasks/Task.cs:517 
  at System.Threading.Tasks.Task.ThreadStart () [0x00097] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading.Tasks/Task.cs:418 
  --- End of inner exception stack trace ---
 --> (Inner exception 0) System.NullReferenceException: Object reference not set to an instance of an object
  at Xwt.GtkBackend.DialogBackend.SetButtons (IEnumerable`1 newButtons) [0x0001d] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.8-branch/0a09117d/source/monodevelop/main/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DialogBackend.cs:63 
  at Xwt.Dialog+WindowBackendHost.ItemRemoved (System.Object collection, System.Object item) [0x0001d] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.8-branch/0a09117d/source/monodevelop/main/external/xwt/Xwt/Xwt/Dialog.cs:60 
  at Xwt.DialogButtonCollection.ClearItems () [0x00021] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.8-branch/0a09117d/source/monodevelop/main/external/xwt/Xwt/Xwt/DialogButtonCollection.cs:84 
  at System.Collections.ObjectModel.Collection`1[Xwt.DialogButton].Clear () [0x00000] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs:84 
  at Xamarin.Components.Ide.ActivatingDialog.set_ActiveButton (Xwt.Command value) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.8-branch/0a09117d/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Activation/ActivatingDialog.cs:34 
  at (wrapper remoting-invoke-with-check) Xamarin.Components.Ide.ActivatingDialog:set_ActiveButton (Xwt.Command)
  at Xamarin.Components.Ide.Activation.ActivationWorkflowHelpers+<Activate>c__AnonStorey1D+<Activate>c__AnonStorey1E.<>m__3B (System.Threading.Tasks.Task`1 t) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.8-branch/0a09117d/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Activation/ActivationWorkflowHelpers.cs:225 
  at System.Threading.Tasks.TaskActionInvoker+ActionTaskInvoke`1[Xamarin.Components.Ide.Activation.ActivationOutcome].Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs:199 
  at System.Threading.Tasks.Task.InnerInvoke () [0x0000b] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading.Tasks/Task.cs:517 
  at System.Threading.Tasks.Task.ThreadStart () [0x00097] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading.Tasks/Task.cs:418
Comment 2 Rodrigo Kumpera 2013-06-07 11:23:08 UTC
This is what the error pad gives me:


Building Solution: TouchMobile_BuildServer (Debug)

Building: meGeoFrameworks (Debug)

Build started 6/7/2013 11:20:51 AM.
__________________________________________________
Project "/Users/kumpera/src/monodroid/apps/TrunkBug/Core/SmartPhone/Android/meGeoFrameworks/meGeoFrameworks.csproj" (Build target(s)):
	
	Target _ComputeAndroidAssetsPaths:
		  ResourceFiles:
		  IntermediateFiles:
	
	Target _GenerateAndroidAssetsDir:
	No output files were specified for target _GenerateAndroidAssetsDir, skipping.
	
	Target _ComputeAndroidResourcePaths:
		  ResourceFiles:
		  IntermediateFiles:
	
	Target _GenerateAndroidResourceDir:
	No output files were specified for target _GenerateAndroidResourceDir, skipping.
	
	Target _AddLibraryProjectsEmbeddedResourceToProject:
		  AndroidAssets:
		  AndroidJavaSources:
		  AndroidJavaLibraries:
	
	Target PrepareForBuild:
		Configuration: Debug Platform: AnyCPU
	
	Target _ResolveMonoAndroidSdks:
		Daemon stderr: monodroid: error XA9999: Invalid license.  Please reactivate Xamarin.Android
:  monodroiderror XA9999: Invalid license.  Please reactivate Xamarin.Android
: error XA9010: Unable to determine license edition.
	Task "ResolveSdks" execution -- FAILED
	Done building target "_ResolveMonoAndroidSdks" in project "/Users/kumpera/src/monodroid/apps/TrunkBug/Core/SmartPhone/Android/meGeoFrameworks/meGeoFrameworks.csproj".-- FAILED
	
Done building project "/Users/kumpera/src/monodroid/apps/TrunkBug/Core/SmartPhone/Android/meGeoFrameworks/meGeoFrameworks.csproj".-- FAILED

Build FAILED.
Errors:

/Users/kumpera/src/monodroid/apps/TrunkBug/Core/SmartPhone/Android/meGeoFrameworks/meGeoFrameworks.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets (_ResolveMonoAndroidSdks target) ->

	:  monodroiderror XA9999: Invalid license.  Please reactivate Xamarin.Android
	: error XA9010: Unable to determine license edition.

	 0 Warning(s)
	 2 Error(s)

Time Elapsed 00:00:00.0914390

---------------------- Done ----------------------

Build: 2 errors, 0 warnings
Comment 3 Bojan Rajkovic [MSFT] 2013-06-07 11:28:20 UTC
This has nothing to do with activation--either the MSBuild tasks or the build host  is holding onto bad values, and is then sending those bad values back to XS. XS loops because it keeps getting error messages from the build process, even though the activation was (per mandroid's return code) successful. We need to fix either the tasks or the host.
Comment 5 Alan McGovern 2013-06-09 15:47:54 UTC
*** Bug 10705 has been marked as a duplicate of this bug. ***
Comment 6 Alan McGovern 2013-06-09 15:48:51 UTC
*** Bug 12330 has been marked as a duplicate of this bug. ***
Comment 7 Jonathan Pryor 2013-06-14 17:22:25 UTC
Fixed in master/7d0fe618. The tests have not yet been integrated.
Comment 8 PJ 2013-07-01 10:24:34 UTC
Was fixed.
Comment 9 Saurabh 2013-07-08 13:03:15 UTC
Today, we have checked this issue with following builds:

ML OSX 10.8.1
Mono 3.1.0
XS 4.0.9(Build 15)
MFA 4.7.11-34

Now, license is activated in one time and not showing loop activation.

Screencast: http://www.screencast.com/t/q7kiPrwu

Hence, closing this issue and changing its status as Verified.
Comment 10 Jonathan Pryor 2013-08-15 22:44:04 UTC
*** Bug 13380 has been marked as a duplicate of this bug. ***