ios - Jenkins无法打开IOS模拟器
<p><p>我在 jenkins 中设置了一个项目,应该在运行期间打开 IOS 模拟器,但 jenkins 无法打开模拟器。</p>
<p>Jenkins 在 jenkins 用户中运行。</p>
<p>以下是项目使用的内容:
- 基于 Java maven 的项目
- 运行 appium 服务器
- appium 启动 IOS 模拟器 -- 这一步失败并出现以下错误</p>
<pre><code> 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 }
</code></pre>
<p>我尝试将 jenkins 用户添加到开发者组并启用 DevToolsSecurity,但没有成功。</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>如果您将 Jenkins 作为守护程序运行,它将无法运行 GUI 应用程序。您必须将其配置为启动代理或使用本地从站。</p>
<p>在这里您可以找到 <a href="https://medium.com/@ved.pandey/setting-up-jenkins-on-mac-osx-50d8fe16df9f" rel="noreferrer noopener nofollow">complete tutorial</a> .</p>
<blockquote>
<p>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.</p>
<p>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.</p>
</blockquote></p>
<p style="font-size: 20px;">关于ios - Jenkins无法打开IOS模拟器,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/46569413/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/46569413/
</a>
</p>
页:
[1]