Crashlytics - 不允许编码用户交互

时间:2014-04-24 21:52:11

标签: ios jenkins codesign crashlytics

我已经在我们的Jenkins服务器上构建了一个iOS应用程序,没有任何问题,直到我将Crashlytics框架添加到该项目中。

现在它在运行此命令时失败:

/usr/bin/codesign --force --sign 97B4681D342EA8BD5AE8D283B6A924BF6AF3CF95 --resource-rules=/Users/jenkins/dev/workspace/megared-ios/build/Megared\ Stage.app/ResourceRules.plist --entitlements /Users/jenkins/Library/Developer/Xcode/DerivedData/Megared-hitcnfjdmnrzijfoehutangiwnos/Build/Intermediates/Megared.build/Stage-iphoneos/Megared.build/Megared\ Stage.xcent /Users/jenkins/dev/workspace/megared-ios/build/Megared\ Stage.app

错误如下:

/Users/jenkins/dev/workspace/megared-ios/build/Megared Stage.app: User interaction is not allowed.
Command /usr/bin/codesign failed with exit code 1

我有一个shell脚本,它在构建项目的开头运行,创建一个新的钥匙串,导入证书以进行分发,将mobileprovision复制到正确的Library文件夹并解锁新创建的钥匙串。

如果我从构建阶段中删除Crashlytis脚本,它将恢复正常构建。

当"运行"看起来有些事情发生了。正在调用Crashlytics的命令,就像钥匙串再次被锁定或者只是搞砸了一样。我很难找到解决方案。

更新

看起来Crashlytics的失败命令就是这个,它与GUI没有任何关系:

2014-04-28 09:40:45.004 run[54378:507] Crashlytics.framework/run 1.3.6
2014-04-28 09:40:45.033 run[54378:507] 

Crashlytics: Src root /Users/jenkins/dev/workspace/megared-ios/Megared
2014-04-28 09:40:45.033 run[54378:507] 

Crashlytics: Current directory path /Users/jenkins/dev/workspace/megared-ios/Megared
2014-04-28 09:40:45.035 run[54378:507] 

Crashlytics: Run script build phase called from Xcode Bots 0
2014-04-28 09:40:45.036 run[54378:507] 

Crashlytics: Run script build phase called from Xcode.app 0
2014-04-28 09:40:46.612 run[54378:507] 

Crashlytics: Could not be onboarded statusCode 404
2014-04-28 09:40:49.805 run[54378:507] 

Crashlytics: Uploading dSYM at path /Users/jenkins/dev/workspace/megared-ios/build/Megared Stage.app.dSYM
2014-04-28 09:41:39.635 run[54378:507] 

Crashlytics: Uploading dSYM at path /Users/jenkins/dev/workspace/megared-ios/build/Megared Stage.app.dSYM
2014-04-28 09:42:02.295 run[54378:507] 

Crashlytics: Megared Stage.app.dSYM could not be uploaded statusCode 0 Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x10026a490 {NSUnderlyingError=0x1002add30 "The request timed out.", NSErrorFailingURLStringKey=https://api.crashlytics.com/api/v1/1fc7b0115d986225bd4df420f1a979cd6114256d/dsyms, NSErrorFailingURLKey=https://api.crashlytics.com/api/v1/1fc7b0115d986225bd4df420f1a979cd6114256d/dsyms, NSLocalizedDescription=The request timed out.}
Command /bin/sh failed with exit code 1

1 个答案:

答案 0 :(得分:0)

听起来你需要在GUI会话中运行Jenkins。您似乎已经安装了Jenkins作为后台守护程序运行,它无法访问GUI来绘制窗口或访问GUI应用程序所需的任何服务。我为此目的做了https://github.com/stisti/jenkins-app。或者你可以运行" java -jar jenkins.war"在终端窗口中。