2016-04-26 40 views
0

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

在模拟器上运行calabash-ios工作正常。

它与问题相关:calabash-ios physical device test, app starts but crashes但该解决方案没有为我工作。

该应用程序与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我的列表中

我:

  • iPhone 6 - 9.3.1
  • 的Xcode 7.3
  • calabash-黄瓜(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.0 P648
  • OS X - 10.11.4

Xcode的识别和连接的设备没有任何问题。

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

我运行命令'killall -9 instruments',然后运行'cucumber',但得到相同的结果。

我在这里错过了什么?

回答

0

“容器:/私有的/ var /移动/容器/数据/应用/ 81B447CB-DEE4-452A-8371-FA6652D6AC18(沙箱)”具有模拟器的UDID。

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

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

  1. 包ID不正确。
  2. 应用程序未安装在物理设备上。
  3. The。在设备上安装的ipa未使用Developer cert签名。
  4. 设备上的调试符号尚未被复制到Xcode。
  5. 该设备没有资格进行仪器调试。

以下信息摘自这些文件。

包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,请确保您正在使用Debug配置而不是Release配置。检查您的项目设置,确保您使用开发人员证书签署应用程序。

设备未准备好

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

该设备可能启用开发,但不能为仪器做好准备。您可以通过在Instruments.app中使用自动化模板来定位设备来进行检查 - 这在上面链接的文档中进行了描述。

相关问题