我在 jenkins 中设置了一个项目,应该在运行期间打开 IOS 模拟器,但 jenkins 无法打开模拟器。
Jenkins 在 jenkins 用户中运行。
以下是项目使用的内容: - 基于 Java maven 的项目 - 运行 appium 服务器 - appium 启动 IOS 模拟器 -- 这一步失败并出现以下错误
[XCUITest] Error: Command 'osascript -e 'tell application "System Events" to count processes whose bundle identifier is "com.apple.iphonesimulator"'' exited with code 1
at ChildProcess.<anonymous> (../../lib/teen_process.js:92:19)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:897:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
{ Error: Command 'osascript -e 'tell application "System Events" to count processes whose bundle identifier is "com.apple.iphonesimulator"'' exited with code 1
at ChildProcess.<anonymous> (../../lib/teen_process.js:92:19)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:897:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
stdout: '',
stderr: '36:106: execution error: An error of type -610 has occurred. (-610)\n',
code: 1 }
我尝试将 jenkins 用户添加到开发者组并启用 DevToolsSecurity,但没有成功。
如果您将 Jenkins 作为守护程序运行,它将无法运行 GUI 应用程序。您必须将其配置为启动代理或使用本地从站。
在这里您可以找到 complete tutorial .
By default Jenkins runs as a daemon. A daemon is a non interactive background process which runs as part of the overall system and is not tied to a specific user. A daemon can’t interact with GUI.
A big part of CI is running simulators and other GUI applications, so we’ll need another option. To fix this, you can change Jenkins to run as a Launch Agent. A launch agent runs in the background on behalf of a user.
关于ios - Jenkins无法打开IOS模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46569413/
欢迎光临 OGeek|极客世界-中国程序员成长平台 (https://ogeek.cn/) | Powered by Discuz! X3.4 |