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 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.
[XVS.iOS only] Active Directory + unusual network routing causes intermittent "Unhandled Activation Error"
This is a fairly specific variation on bug https://bugzilla.xamarin.com/show_bug.cgi?id=17613 based on closely matching symptoms from 2 different customers.
There are some other known causes of this same activation stack trace related to Region settings and accented characters. We were pretty careful to rule out those issues when I was working with these 2 customers.
Performing an offline activation isn't helpful in this case because the `mtouch.exe` command does not produce accurate `--datafile` or `--entitlements` outputs. As a result, it sees the manually downloaded license file as invalid and deletes it.
## Steps to reproduce
Attempt to activate Xamarin.iOS via Visual Studio.
In both cases, the customers' computers used Active Directory logons and had somewhat complicated network routing configurations. In these conditions the Xamarin.iOS activation will fail _intermittently_. Sometimes the activation will succeed, but other times it will invalidate the licenses on disk and then fail when it attempts to reactivate.
Curiously, but maybe also helpfully, the Xamarin.Android activation seemed to work correctly in both cases, without any intermittent failures. So perhaps this particular form of the "Unhandled Activation Error" can be fixed by modifying the "datafile" and "entitlements" commands in `mtouch` to match the corresponding `mandroid` commands more closely.
## Test results (in the failing state, consistent for both customers)
- The "datafile" from `mtouch.exe`  was empty, and there was no output to standard error either.
>  "C:\Program Files (x86)\MSBuild\Xamarin\iOS\mtouch.exe" --datafile > %USERPROFILE%\Desktop\mtouch-data.out 2> %USERPROFILE%\Desktop\mtouch-data.err
- In contrast, the "datafile" from `mandroid.exe`  was _not_ empty. It contained data that at least superficially correct.
>  "C:\Program Files (x86)\MSBuild\Xamarin\Android\mandroid.exe" --datafile > %USERPROFILE%\Desktop\mandroid-data.out 2> %USERPROFILE%\Desktop\mandroid-data.err
- Similarly, the `--entitlements` option produced _no output_ for `mtouch.exe` , but normal output for `mandroid.exe` .
>  "C:\Program Files (x86)\MSBuild\Xamarin\iOS\mtouch.exe" --entitlements > %USERPROFILE%\Desktop\mtouch-entitlements.out 2> %USERPROFILE%\Desktop\mtouch-entitlements.err
>  "C:\Program Files (x86)\MSBuild\Xamarin\Android\mandroid.exe" --entitlements > %USERPROFILE%\Desktop\mandroid-entitlements.out 2> %USERPROFILE%\Desktop\mandroid-entitlements.err
- In one of the cases, we tried the `mtouch.exe -v --activate` command too. That also behaved similarly. It produced no outputs.
- The `mtouch.exe` binary was correct. I had both users send their binaries over, and in both cases I was able to produce _correct_ output when I executed the file locally on my computer.
## The primary error message observed during activation
> System.Exception: Could not load machine data:
> at Xamarin.Components.Ide.Activation.ActivationService.GetErrorWorkflow(LicenseSyncResult results, Boolean ignoreSyncErrors)
> at Xamarin.Components.Ide.Activation.ActivationService.<GenerateFullWorkflowSequence>d__89.MoveNext()
> at Xamarin.Components.Ide.Activation.ActivationDialog.DisplayWorkflowStep(ActivationWorkflowStep step)
> at Xamarin.Components.Ide.Activation.ActivationDialog.<>c__DisplayClass13.<StartSpinnerTaskAndScheduleContinuation>b__12(Task t)
Regression status: not a regression. I believe this behavior has been untouched for a long time.
CCiing Michael and Sebastien, they might know.
Raising the priority.