Weekly Virtual Machine / Stack updates - 2017.10.14

Highlights

Bitrise CLI 1.10.0 preinstalled on all stacks:

Android/Linux stacks

  • No significant changes.

Xcode stacks

  • No significant changes.

VS for Mac stacks

Hybrid stacks

  • No significant changes.

This week’s changes (diffs)

Stack System Reports

You can find the full system report of all of the available Stacks on GitHub: https://github.com/bitrise-io/bitrise.io/tree/master/system_reports.

If you’d like to add additional tools to be pre-installed you can find the instructions on GitHub, for both the Linux and for the macOS stacks.

Information about Stack types & update schedules can be found here: discuss.bitrise.io/t/281.

Happy Building!

1 Like

All stacks passed our tests and ready for deploy on Saturday :rocket:

New stacks deployed and are available in production :tada:

Hi guys,
After the weekend stack updates all of my builds are failing. Doing some research into this it seems to be a known issue with Mono 5.4.

The issue is that some unit tests are failing with an assertion failure and reflection exception.

NUnit Console Runner 3.4.1
Copyright Ā© 2016 Charlie Poole

Runtime Environment
OS Version: MacOSX 16.7.0.0
CLR Version: 4.0.30319.42000

Test Files
/Users/vagrant/git/Expenses/Expenses.Core.Tests.NUnit/Expenses.Core.Tests.NUnit.csproj

  • Assertion at dynamic-image.c:209, condition `prev == MONO_HANDLE_RAW (obj)’ not met

Stacktrace:

at <0xffffffff>
at (wrapper managed-to-native) System.Reflection.Emit.ModuleBuilder.getToken (System.Reflection.Emit.ModuleBuilder,object,bool) [0x0000b] in :0
at System.Reflection.Emit.ModuleBuilder.GetToken (System.Reflection.MemberInfo,bool) [0x00061] in :0

All our unit tests ran fine under the previous version of Vs for Mac and Mono 5.2.
We’re using MOQ for mocking in our unit tests and this issue was reported in their repo a few weeks ago: https://github.com/moq/moq4/issues/449
But, they’re referring to it as a mono bug.

The issue has also been reported on the Xamarin bugzilla:
https://bugzilla.xamarin.com/show_bug.cgi?id=59364
Its for IronPython but the bug is the same.

It appears to be fixed in Mono master https://github.com/mono/mono/commit/0f76c2acec24cd45b71d6e21c450b51ecdfe96f0

But the root cause is the version that Vs for Mac is pulling in.

I recommend rolling back the Vs for mac patch until Microsoft pull in a later version of Mono.

Can I also suggest that you include a unit test in your test suite that uses Moq to test for this issue?

var obj = new Mock<Object>().Object;
var stream = new Mock<Stream>().Object;

Thanks guys.

1 Like

In the interim the only workaround I have is to downgrade to the Hybrid stack. This will have to be a very temporary measure as I’m preparing an iPhone X release.

@benrnz-sv did you try it on the Visual Studio for Mac Beta channel stack? It seems the beta channel has fixes for most things.

We’d be glad to do that if you can send us a sample repository we can test with :slight_smile:

I haven’t, as we’re days away from preparing a release. Our corporate policy is to not release production code built on beta components. So using a beta release of Vs4Mac is out of the question.

Out of interest I’ve tried the beta stack and it works fine. The difference between the stable and beta Mono version is
Stable (this fails to run unit tests):

  • Mono version:
    Mono JIT compiler version 5.4.0.201 (2017-06/71277e78f6e Thu Sep 21 19:22:55 EDT 2017)

Beta (this runs unit tests fine):

  • Mono version:
    Mono JIT compiler version 5.4.0.212 (2017-06/fbc487ff424 Fri Oct 6 06:41:39 EDT 2017)
1 Like

Just published a Script here Install specific Mono version - with that you can install any available Mono version. @benrnz-sv it’d be awesome if you could confirm that it works for you too :slight_smile:

Thanks so much @viktorbenei!
That works great. Iceberg averted :slight_smile:

1 Like

Glad to hear, thanks for confirming @benrnz-sv! I’ll create a #how-to for it with some customization notes once I have some time :slight_smile:

Happy Building! :wink: