gpt4 book ai didi

ios - 来自 TeamCity 构建代理的 "Unable to run app in Simulator"

转载 作者:可可西里 更新时间:2023-11-01 05:04:23 26 4
gpt4 key购买 nike

我在我的 TeamCity 构建代理输出中看到此错误:

...
[14:17:50][Step 2/2] Starting: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project Foobar/Foobar.xcodeproj -scheme foobarNightly SYMROOT=/Users/Me/buildAgent/work/e60c5dca158b2d23/Foobar/build OBJROOT=/Users/Me/buildAgent/work/e60c5dca158b2d23/Foobar/build test -sdk iphonesimulator8.1
[14:17:50][Step 2/2] in directory: /Users/Me/buildAgent/work/e60c5dca158b2d23
...
[14:17:53][Step 2/2] FoobarTests (BUILD)
[14:17:53]=== BUILD TARGET FoobarTests OF PROJECT Foobar WITH CONFIGURATION Debug ===
[14:17:53]Check dependencies
[14:17:53]Testing failed:
[14:17:53] Test target FoobarTests encountered an error (Unable to run app in Simulator If you believe this error represents a bug, please attach the log file at /var/folders/yy/lc1xnprn1w3g98mcy5mprm5c0000gn/T/com.apple.dt.XCTest-status/Session-2014-11-04_11:17:51-qkVM7k.log)
[14:17:53][Step 2/2] ** TEST FAILED **
[14:17:54][Step 2/2] Process exited with code 65
...

其中提到的日志包含:

...
2014-11-04 11:17:51.085 Beginning test session with Xcode 6A1052d
2014-11-04 11:17:51.085 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project Foobar/Foobar.xcodeproj -scheme foobarNightly SYMROOT=/Users/Me/buildAgent/work/e60c5dca158b2d23/Foobar/build OBJROOT=/Users/Me/buildAgent/work/e60c5dca158b2d23/Foobar/build test -sdk iphonesimulator8.1
2014-11-04 11:17:51.085 Testing on device: <DVTiPhoneSimulator: 0x7fcb257b2210> {
SimDevice: SimDevice : iPad 2 (B694B12B-BAE3-48FD-A351-CFC5855B5D14) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPad-2 } runtime={ SimRuntime : 8.1 (12B411) - com.apple.CoreSimulator.SimRuntime.iOS-8-1 }
}
2014-11-04 11:17:51.085 Initializing test infrastructure.
2014-11-04 11:17:51.085 Writing testing status log to /var/folders/yy/lc1xnprn1w3g98mcy5mprm5c0000gn/T/com.apple.dt.XCTest-status/Session-2014-11-04_11:17:51-qkVM7k.log.
2014-11-04 11:17:51.107 Creating the connection.
2014-11-04 11:17:51.107 Listening for proxy connection request from the test bundle (all platforms)
2014-11-04 11:17:51.107 Resuming the connection.
2014-11-04 11:17:51.107 Test connection requires daemon assistance.
2014-11-04 11:17:51.469 Checking test manager availability..., will wait up to 120s
2014-11-04 11:17:52.148 testmanagerd handled session request.
2014-11-04 11:17:52.148 Waiting for test process to launch.
2014-11-04 11:17:53.323 Launch session started, setting a disallow-finish-token on the run operation.
2014-11-04 11:17:53.323 Waiting for test process to check in..., will wait up to 120s
2014-11-04 11:17:53.334 Adding console adaptor for test process.
2014-11-04 11:17:54.012 Test operation failure: Unable to run app in Simulator
2014-11-04 11:17:54.012 _finishWithError:Error Domain=IDEUnitTestsOperationsObserverErrorDomain Code=3 "Unable to run app in Simulator" UserInfo=0x7fcb28ddd570 {NSLocalizedDescription=Unable to run app in Simulator} didCancel: 1
...

如果我直接在构建代理机器上运行完全相同的命令:

$ /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project Foobar/Foobar.xcodeproj -scheme foobarNightly SYMROOT=/Users/Me/buildAgent/work/e60c5dca158b2d23/Foobar/build OBJROOT=/Users/Me/buildAgent/work/e60c5dca158b2d23/Foobar/build test -sdk iphonesimulator8.1

它有效。知道为什么 TeamCity 构建代理会失败吗?

最佳答案

好的,看起来我们已经找到了真正的问题。 plist TeamCity 提供的文件包含 SessionCreate属性,对于最新的 Mac OS X 版本不应该存在。

该问题应在 TeamCity 9.0.4 中得到解决,但作为解决方法,您应该放置 jetbrains.teamcity.BuildAgent.plist
~/Library/LaunchAgents/jetbrains.teamcity.BuildAgent.plist
并删除 SessionCreate它的属性和值(value)。

jetbrains.teamcity.BuildAgent.plist 文件的当前变体是:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>WorkingDirectory</key>
<string>/agent/home/directory</string>
<key>Debug</key>
<false/>
<key>Label</key>
<string>jetbrains.teamcity.BuildAgent</string>
<key>OnDemand</key>
<false/>
<key>KeepAlive</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>bash</string>
<string>--login</string>
<string>-c</string>
<string>launcher/bin/TeamCityAgentService-macosx-universal-32 -c ../conf/wrapper.conf</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>logs/launchd.err.log</string>
<key>StandardOutPath</key>
<string>logs/launchd.out.log</string>
</dict>
</plist>

关于ios - 来自 TeamCity 构建代理的 "Unable to run app in Simulator",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26788718/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com