Appium Permission to debug [AppName] was denied

Ladyvox · 2014年03月06日 · 最后由 起飞的猪猪 回复于 2019年09月17日 · 2584 次阅读

请问大家,我尝试连接实体 iPhone,并启动 app 脚本后,log 出现下面的错误讯息

[INST STDERR] 2014-02-27 12:02:49.206 instruments[1233:707] Permission to debug [App_Name] was denied. The app must be signed with a development identity (e.g. iOS Developer).

然后就出现这个讯息
error: Instruments crashed on startup

实体 iPhone 有进入应用程序但瞬间就跳出了

我已经有在 appium 启动时,输入的 UDID 和 App bundle id.

请问还需要有其它动作吗?

或是需要从哪里登入 development account 呢?

请大家帮帮忙。

共收到 13 条回复 时间 点赞

你需要开发者证书。

嗯...我的 app 已经有开发者证书,打包签署成 ipa 档案,并且安装在 iphone 上了.ip​​hone 可成功运行并操作,但从 mac 要透过 appium 却有阻挡讯息,请问我是少了哪个动作呢??mac 要在哪里设定呢?除了签署 ipa 还要在哪签署呢?

我的也是一样,哎 郁闷~~

#1 楼 @lihuazhang 我也遇到这个问题 我是用开发者帐号登录的 mac 上面也有开发者证书,请问知道是什么原因吗?

#3 楼 @2023484665 这个问题 你解决了吗?我也遇到了 不知道怎么办了。
#2 楼 @ladyvox 这个问题 你解决了吗?我也遇到了 不知道怎么办了。

@sundaxian

使用的是开发者帐号编译的,开发者证书电脑上面也有
运行的时候 app 可以打开,但是闪退了,而且连续好几次闪退。
求救。

下面是 log

info: iOS SDK Version set to 7.0

info: Detecting automation tracetemplate

info: Not auto-detecting udid, running on sim
info: Parsed app Localizable.strings
info: Not setting locale because we're using a real device
info: Not setting iOS and app preferences since we're on a real device
info: Starting iOS device log capture via idevicesyslog

info: Not setting device type since we're connected to a device

info: Creating iDevice object with udid 843bb46631ac5c1408af67ae25a48d3b2e2c4888
info: Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
info: Installing app using cmd: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap install --id 843bb46631ac5c1408af67ae25a48d3b2e2c4888 --bundle /var/folders/89/vz7ytzl53p368skgwxh9tkmw0000gn/T/114231-2055-1v0c7r1/Payload/EcoRobot.app

debug: Creating instruments

info: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments

info: [INSTSERVER] Instruments socket server started at /tmp/instruments_sock
info: Attempting to run app on real device with UDID 843bb46631ac5c1408af67ae25a48d3b2e2c4888
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w 843bb46631ac5c1408af67ae25a48d3b2e2c4888 /var/folders/89/vz7ytzl53p368skgwxh9tkmw0000gn/T/114231-2055-1v0c7r1/Payload/EcoRobot.app -e UIASCRIPT /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {}
info: And launch timeout: 90000ms

info: [INST STDERR] 2014-03-31 17:00:06.277 instruments[2112:507] Permission to debug com.www.ecovacs.com.EcoRobot was denied.  The app must be signed with a development identity (e.g. iOS Developer).


info: [INST STDERR] 2014-03-31 17:00:06.279 instruments[2112:507] Recording cancelled : At least one target failed to launch; aborting run

info: [INST STDERR] Instruments Trace Error : Error Domain=com.apple.instruments Code=1 "Error Starting Recording" UserInfo=0x7fe197257950 {NSLocalizedDescription=Error Starting Recording, NSLocalizedRecoverySuggestion=At least one target failed to launch; aborting run}
Instruments Trace Error : Failed to start trace.

遇到这样的问题,可以尝试直接使用 Instruments 中的 Automation 来启动,按报错信息看,就是没有使用开发者证书签名

Hi 我也有遇到同樣的問題,後來研究了老半天,發現是我 resign 的時候發生了問題
主要參考這篇就解決了,app 已經可以在 real device 上面跑了
http://www.4byte.cn/question/322848/resign-ios-app-from-a-distribution-identity-to-a-developer-identity.html

簡單的說就是在 resign 的過程中,會用到 Entitlements.plist file,這個 file 裡面包含了一個 attribute:get-task-allow,這個屬性的值在當你是用 distribution signed 的時候預設為 false,如果你要用 development signed 的時候,要把值改成 true。由於我們的 build 拿到是從 distribution signed 的,所以這個值預設當然為 false,因此我們要手動改成 false,這樣 resign 的完的 build,跑在 real device 上面就不會有問題了

同样遇到这个问题,使用 Profile 的 debug 打包方式解决此问题,用 Archive 的 Debug 打包也同样失败

让开发提供 debug 版,不要用 release 版就可以了

已经是 debug 版本了,可是还是不行,要怎么解决??急求~~~

@ 张晓艳 请问下如何修改

@JJ 请问下具体是在哪里修改呢

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册