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 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.
[Windows only] `mtouch --datafile` fails intermittently with non-zero exit code, leading to "Unhandled Activation Error... Could not load machine data:"
This is a new bug to discuss an old tricky problem where `mtouch --datafile` sometimes (intermittently on any particular customer's machine) returns a non-zero error code on Windows. This makes Xamarin.iOS activation impossible until the command "spontaneously" starts working again. The problem often lasts for several days in a row or longer.
Curiously the number of customer reports of this version of the "Could not load machine data" error seems to have increased recently. For a long time it appeared that the attempted fix from Bug 23537 might have eliminated the problem. But unfortunately the incoming reports now indicate that the fix did not fully resolve the issue.
The recent increase in number of customer reports does _not_ seem to be related to the Xamarin version, so perhaps there is some other environmental factor that could have changed across several customer computers recently (for example, maybe a Windows system update, or maybe even something as simple as the system clock date).
## The primary error message observed in the IDE during attempted activation
Importantly this exception message does not show any additional output from the standard error of `mtouch`. There are other causes of the "Could not load machine data:" error, but so far all reports of those other problems have had different stack traces or have included additional messages from the standard error of `mtouch`.
(If any additional messages from standard error were available, they would be appended after the "Could not load machine data:" text.)
> 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)
## Possible next steps
1. Several of the customers who have reported this problem use Active Directory to log in to Windows. The Xamarin QA team will be trying some extra testing of this scenario to watch for this intermittent error.
2. I am wondering if there are any logging statements that could be added to a custom version of the `mtouch` binary, so that we could send that to customers who are currently hitting this issue. Perhaps that would be a way to locate the precise execution step that causes the command to quit with a non-zero exit status?
The mtouch command that ships on Windows is a different binary than the one from the Mac.
## Status update
The engineers have an idea for what might be causing this. Work is underway to create a new `mtouch` executable that uses an improved build process to integrate updated dependencies. As of today that new build process appears to be integrating the correct dependencies, but there is one remaining issue preventing the executable from running properly on target machines.
I will update this bug report again when a runnable candidate build is available for user testing. To give a tentative initial estimate, that build might be available before the end of the week (Friday, January 28). If the build is not available by the end of the day on Friday, I will post another status update at that time.
I now have the new candidate development build of `mtouch.exe` mentioned in Comment 8. I have sent that candidate build to several individual users.
I will update this bug when I hear back from those users about whether this new build has helped.
If any other users would like to try this candidate build, feel free to send a quick email to firstname.lastname@example.org and mention this particular bug comment (Bug 37934, Comment 9).
## For record keeping: hashes of the candidate development build I have sent out
(I will list these here for thorough record keeping in case I send out another different candidate build in the future.)
### MD5 sum
MD5 (mtouch.exe) = b5c175dfa77e55d26c2cfbde0d019427
### SHA-1 sum
### SHA-256 sum
## Preliminary verification: so far so good
2 customers have reported that the candidate development build mentioned in Comment 9 has solved this problem at least during 1 day of usage so far.
I will update the bug again if there are new reports where the candidate build fails again in the same way as described in Comment 0, but for now I will tentatively mark the bug as RESOLVED to request that this candidate fix be incorporated into a future release.
Created attachment 14860 [details]
Experimental mtouch with candidate fix
## Steps to test this experimental build
1. Download and unzip the `.zip` file to get the `mtouch.exe` file.
2. Move the old original `mtouch.exe` to a backup location. The original file is located in:
"C:\Program Files (x86)\MSBuild\Xamarin\iOS\mtouch.exe"
3. Copy the new `mtouch.exe` file into that folder:
"C:\Program Files (x86)\MSBuild\Xamarin\iOS"
4. Re-try activating Xamarin.iOS in Visual Studio. You might see a command prompt that opens briefly when you run these steps. You can safely ignore that.
Moving to C7
@Brendan, I have checked this issue with steps mentioned in comment 11
i.e replacing attached mtouch.exe with "C:\Program Files (x86)\MSBuild\Xamarin\iOS\mtouch.exe" and I am able to connect and deploy application on simulator.
Please let me know If I have to follow some specific steps to reproduce this issue.
Due to the "Xamarin for Everyone" changes, the new version of `mtouch.exe` was pushed back to a later release. I am updating the target milestone accordingly.
For reference, "Xamarin for Everyone" is discussed in https://blog.xamarin.com/xamarin-for-all/.
@Brendan, As per comment 13 I was able to see mtouch.exe at this location. "C:\Program Files (x86)\MSBuild\Xamarin\iOS\mtouch.exe"
Today I checking with master XVS 18.104.22.16889 (5cddab2) and not getting mtouch.exe at C:\Program Files (x86)\MSBuild\Xamarin\iOS\
Please suggest Is this intended behavior.
Note: I am able to build and deploy application successfully.
Env Info: https://gist.github.com/tajinder360/6e26d2698d29e879abb84970b600d581
Yes, that is expected behavior. As I recall, Cycle 8 is removing the old `mtouch.exe` binary altogether. So this bug will be approximately "fixed" or "not on roadmap" in Cycle 8.
As per comment 17 I am closing this issue.