首页 文章

Xamarin / iOs / MSBuild:“构建代理未在Mac上运行”随机构建崩溃

提问于
浏览
1

我们最近升级了我们的本地Windows CI服务器,将我们的Xamarin解决方案构建到最新的VS2017 . 在它还在使用VS2015之前 . 从那时起,我们的构建中约有30%随机失败,并出现以下错误:

C:\Program Files (x86)\Microsoft Visual
 Studio\2017\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Windows.After.targets(63,5):
 warning : Failed to execute 'which mono64': ExitStatus = 1  C:\Program
 Files (x86)\Microsoft Visual
 Studio\2017\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Windows.After.targets(63,5):
 error : The Build Agent 'Build 4.8.0.753' is not running on the Mac.
 Please ensure that the assembly versions between the XMA Agents and
 the XMA clients matches. A compatible Build Agent is needed in order
 to finish the build.

在Mac构建日志中,我们得到了以下内容:

Xamarin.Messaging.Build.BuildAgent: Information: 0: Stopping Agent:
 Build: 2018-01-09 10:12:44Z System.Net.Mqtt.Sdk.MqttClientImpl: Error:
 0: No session has been found for the client at
 System.Net.Mqtt.Sdk.MqttClientImpl.CloseClientSession () [0x00098] in
 <65aadb65fa...> at System.Net.Mqtt.Sdk.MqttClientImpl+d__34.MoveNext
 () [0x00035] in <65aadb65fa...> System.Net.Mqtt.Sdk.MqttClientImpl:
 Information: 0: Client - Disposing. Reason: Error:

Xamarin.iOS.Windows.After.targets 第63行运行SayHello MSBuild任务,因此它看起来像是一个随机失败的任务,即使很难连接到Mac并且正在运行 .

我们在Windows机器和Mac mini上使用的版本:Windows:

  • Visual Studio 2017,版本15.5.2

  • Windows 2012r2

  • Java开发工具包8u152

  • Xamarin 4.8.0.753

  • Xamarin Designer 4.8.188

  • Xamarin.Android SDK 8.1.0.25

  • Xamarin.iOS和Xamarin.Mac SDK 11.6.1.2

苹果电脑:

  • Visual Studio 2017 for Mac,版本7.3.2.12

  • Mac OS X 10.13.2

  • 单声道:5.4.1.7

  • Xamarin.Android 8.1.0.25

  • Xamarin.iOS 11.6.1.2

  • Xamarin.Mac 4.0.0.214

任何的想法?
我们怎样才能让它更稳定?

1 回答

  • 0

    我们已经看到了类似的行为(并且运行几乎相同的设置) . 我不确定这是否相关,但我们经常会注销到有问题的mac,我们会看到一个对话框已经弹出询问凭据;特别:

    codesign wants to access key "access" in your keychain. To allow this, enter the "login" keychain password

    “codesign想要在您的钥匙串中访问密钥”访问权限 . 要允许此操作,请输入“登录”密钥链密码“

    我们已经输入了登录密码并在多次这样做之后说“总是允许”(我们有很多iOS项目)我们的构建最终会通过并且“稳定” . 但是,无论何时我们必须重新分配我们的iOS开发人员密钥,这个周期似乎都会重置 .

    再次因为这个问题是如此随机,很难说它是否相关,但看起来确实如此 .

相关问题