首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在物理设备上运行calabash-ios,应用程序立即启动并崩溃。

在物理设备上运行calabash-ios,应用程序立即启动并崩溃。
EN

Stack Overflow用户
提问于 2016-04-26 13:25:54
回答 1查看 768关注 0票数 0

在设备上运行calabash,应用程序立即启动和崩溃。

在模拟器上运行calabash-ios运行良好。

这与问题有关:卡巴什-ios物理设备测试,应用程序启动但崩溃。,但是解决方案对我没有用。

这个应用程序是用Xamarin开发的。

该应用程序已经安装在设备上。

我运行命令:

代码语言:javascript
复制
export BUNDLE_ID=com.appName.name
export DEVICE_ENDPOINT=http://192.168.1.14:37265
export DEVICE_TARGET=e2a5c640b9bc6fe30209612eefbf1194…
DEBUG=1 cucumber

得到以下信息:

代码语言:javascript
复制
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

设备的日志:

代码语言:javascript
复制
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 this -s设备时,无法在我的列表中找到此UDID

我有:

  • iPhone 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)
  • Ruby2.0.0p648
  • OS X-10.11.4

xcode识别并连接到设备,没有任何问题。

设备上的UI自动化已启用。

在运行‘黄瓜’之前,我运行了命令‘KILLALL-9 the’,但是得到了相同的结果。

我在这里错过了什么?

EN

回答 1

Stack Overflow用户

发布于 2016-04-29 19:43:10

容器: /private/var/mobile/Containers/Data/Application/81B447CB-DEE4-452A-8371-FA6652D6AC18 (沙箱)有一个UDID的模拟器。

这是物理设备上的应用程序数据容器。

这是一个很难诊断的问题,通常可以归结为这些问题之一。

  1. 捆绑标识不正确。
  2. 该应用程序没有安装在物理设备上。
  3. 安装在设备上的.ipa没有使用Developer签名。
  4. 设备上的调试符号尚未复制到Xcode。
  5. 该设备不符合调试仪器的条件。

从这些文件中提取了以下信息。

丛id是不正确的

代码语言:javascript
复制
# Find your .ipa bundle identifier
$ bundle exec calabash-ios console
> ipa = RunLoop::Ipa.new("path/to/my.ipa")
> ipa.bundle_identifier

应用程序未安装

代码语言:javascript
复制
# 1. Check with ideviceinstaller
# 2. Use a visual check in Xcode's Device window

.ipa没有使用开发人员证书进行签名。

代码语言:javascript
复制
$ bundle exec calabash-ios console
> ipa = RunLoop::Ipa.new("path/to/my.ipa")
> ipa.codesign_info.split($-0)

您需要在这里看到一个开发人员证书:

代码语言:javascript
复制
"Authority=iPhone Developer: Joshua Moody (Y<snip>9)"

如果您从Xcode或Xamarin构建并安装在物理设备上,请确保使用的是Debug配置,而不是发布配置。检查项目设置,以确保正在使用开发人员证书对应用程序进行签名。

设备尚未就绪

设备必须显示在Xcode的设备窗口中,没有错误。需要重新启动设备并重新连接到Xcode以清除这些错误。更新iOS版本后,可能需要重新启动/重新连接几次。如果其他所有操作都失败,请将设备插入安装了Xcode的另一台计算机;这有时会导致调试符号被复制。

该设备可用于开发,但尚未准备好用于仪器。您可以通过使用Instruments.app中的自动化模板来检查设备--这在上面链接的文档中有描述。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36866325

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档