设备上运行calabash-ios,应用程序立即启动并崩溃。
在模拟器上运行葫芦-ios工作正常。
它与问题有关:calabash-ios物理设备测试,应用程序启动但崩溃,但那里的解决方案对我不起作用。
使用 Xamarin 开发的应用。
该应用程序已安装在设备上。
我运行命令:
export BUNDLE_ID=com.appName.name
export DEVICE_ENDPOINT=http://192.168.1.14:37265
export DEVICE_TARGET=e2a5c640b9bc6fe30209612eefbf1194…
DEBUG=1 cucumber
并获取以下内容:
INFO: Using uia strategy: 'host'
DEBUG: Searching for run-loop results with glob: /Users/nirortal/.run-loop/results/*
DEBUG: Found 6 previous run-loop results
DEBUG: Will delete 1 previous run-loop results
DEBUG: Deleted 1 previous results in 0.00405 seconds
DEBUG: Searching for instruments caches with glob: /Library/Caches/com.apple.dt.instruments/xrtmp__*
DEBUG: Found 6 instruments caches
DEBUG: Will delete 1 instruments caches
DEBUG: Deleted 1 instruments caches in 0.001272 seconds
2016-04-26 15:11:32 +0300 [RunLoop:debug]:
{
:app => " com.appName.name ",
:args => [],
:bundle_dir_or_bundle_id => " com.appName.name ",
:bundle_id => " com.appName.name ",
:device_target => "e2a5c640b9bc6fe30209612eefbf1194…",
:instruments => #<Instruments 7.3>,
:launch_method => :instruments,
:launch_retries => 5,
:log_file => "/Users/nirortal/.run-loop/results/2016-04-26_15-11-32/run_loop.out",
:no_launch => false,
:no_stop => false,
:relaunch_simulator => true,
:reset => false,
:results_dir => "/Users/nirortal/.run-loop/results/2016-04-26_15-11-32",
:results_dir_trace => "/Users/nirortal/.run-loop/results/2016-04-26_15-11-32/trace",
:script => "/Users/nirortal/.run-loop/results/2016-04-26_15-11-32/_run_loop.js",
:sdk_version => nil,
:udid => "e2a5c640b9bc6fe30209612eefbf1194…",
:uia_strategy => :host,
:xcode => "7.3",
:xcode_path => "/Applications/Xcode.app/Contents/Developer"
} EXEC: xcrun instruments -s templates
### Starting on e2a5c640b9bc6fe30209612eefbf1194bee30933 App: com.gettradio.tradio ###
2016-04-26 15:11:32 +0300 [RunLoop:debug]: xcrun instruments -w e2a5c640b9bc6fe30209612eefbf1194… -D /Users/nirortal/.run-loop/results/2016-04-26_15-11-32/trace -t Automation com.appName.name -e UIARESULTSPATH /Users/nirortal/.run-loop/results/2016-04-26_15-11-32 -e UIASCRIPT /Users/nirortal/.run-loop/results/2016-04-26_15-11-32/_run_loop.js >& /Users/nirortal/.run-loop/results/2016-04-26_15-11-32/run_loop.out
2016-04-26 15:11:32 +0300 [RunLoop:debug]: Preparation took 0.853639 seconds
2016-04-26 15:12:03 +0300 [RunLoop:debug]: Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError
2016-04-26 15:12:03 +0300 [RunLoop:debug]: Failed to launch. Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError: Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError
设备的日志:
Apr 26 15:13:28 iPhone-6-931 SpringBoard[58] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Apr 26 15:13:28 iPhone-6-931 SpringBoard[58] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Apr 26 15:13:28 iPhone-6-931 kernel[0] <Notice>: xpcproxy[293] Container: /private/var/mobile/Containers/Data/Application/81B447CB-DEE4-452A-8371-FA6652D6AC18 (sandbox)
Apr 26 15:13:28 iPhone-6-931 DTServiceHub[220] <Warning>: Unable to acquire task port after launch of pid 293 (com.appName.name)
Apr 26 15:13:28 iPhone-6-931 com.apple.xpc.launchd[1] (UIKitApplication:com.gettradio.tradio[0xd8eb][293]) <Notice>: Service exited due to signal: Killed: 9
Apr 26 15:13:29 iPhone-6-931 DTServiceHub[220] <Warning>: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn
Apr 26 15:13:29 iPhone-6-931 notification_proxy[212] <Error>: 0x16e12f000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error!
Apr 26 15:13:29 iPhone-6-931 notification_proxy[212] <Error>: 0x16e1bb000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error!
Apr 26 15:13:29 iPhone-6-931 SpringBoard[58] <Warning>: Application 'UIKitApplication:com.gettradio.tradio[0xd8eb]' exited abnormally via signal.
我注意到在日志中,‘Container: /private/var/mobile/Containers/Data/Application/81B447CB-DEE4-452A-8371-FA6652D6AC18 (sandbox)’
有一个模拟器的 UDID。
当我运行命令 xcrun 仪器 -s 设备时在我的列表中找不到此 UDID,当我运行命令 xcrun 仪器 -s 设备
我有:
- 苹果手机 6 – 9.3.1
- Xcode 7.3
- 葫芦-黄瓜(0.18.2, 0.17.0, 0.16.4, 0.14.0, 0.13.0, 0.12.3)
- 黄瓜 (1.3.19, 1.3.18, 1.3.17)
- 红宝石 2.0.0p648
- OS X - 10.11.4
Xcode识别并连接到设备没有任何问题。
设备上的 UI 自动化已启用。
我在运行"黄瓜"之前运行了命令"killall -9 仪器",但得到了相同的结果。
我在这里错过了什么?
"容器:/private/var/mobile/Containers/Data/Application/81B447CB-DEE4-452A-8371-FA6652D6AC18(sandbox)"有一个模拟器的UDID。
这是物理设备上的应用程序数据容器。
这是一个非常难以诊断的问题,通常归结为这些问题之一。
- 捆绑包 ID 不正确。
- 物理设备上未安装该应用程序。
- 设备上安装的 .ipa 未使用开发人员证书进行签名。
- 设备上的调试符号尚未复制到 Xcode。
- 设备不符合仪器调试条件。
信息是从这些文档中提取的。
- 热门话题: 错误::EINTR: 中断的系统调用又名运行循环::FIFO::NoReaderConfigurationError
- 在物理设备上进行测试
捆绑包 ID 不正确
# Find your .ipa bundle identifier
$ bundle exec calabash-ios console
> ipa = RunLoop::Ipa.new("path/to/my.ipa")
> ipa.bundle_identifier
未安装应用程序
# 1. Check with ideviceinstaller
# 2. Use a visual check in Xcode's Device window
.ipa 未使用开发人员证书进行签名
$ bundle exec calabash-ios console
> ipa = RunLoop::Ipa.new("path/to/my.ipa")
> ipa.codesign_info.split($-0)
您需要在此处查看开发人员证书:
"Authority=iPhone Developer: Joshua Moody (Y<snip>9)"
如果从 Xcode 或 Xamarin Studio 在物理设备上生成并安装,请确保使用调试配置而不是发布配置进行生成。 检查项目设置,确保使用开发人员证书对应用程序进行签名。
设备未就绪
设备必须出现在 Xcode 的"设备"窗口中,且没有错误。 设备需要重新启动并重新连接到 Xcode 才能清除这些错误。 更新 iOS 版本后,您可能需要多次重新启动/重新连接。 如果所有其他方法都失败,请将设备插入安装了 Xcode 的另一台计算机;这有时会导致复制调试符号。
该设备可能已启用开发,但尚未准备好用于仪器。 您可以通过在 Instruments.app 中使用自动化模板定位设备来检查 - 上面链接的文档中对此进行了描述。