Appium appium 连接真机录制 IOS 时,点 appium inspector 异常退出

xuxiujin · 2014年10月15日 · 最后由 恒温 回复于 2014年10月16日 · 1469 次阅读

我把完整的日志都贴出来,我的 appium 是 1.2.2,系统 是 Os.x 10.8.5 ,Xcode5.1
我的操作步骤是,连接 iphone5,appium 点 launch 提示我 Responding to client with success 然后我点 appium inspector 然后出现了以下的日志,到最后一步 appium inspector 的 record 界面出来了但是最后就异常退出了,最后一步没捕捉到日志我把截图给弄出来了,希望各位指教!

info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session b8ba0112-8a35-4a71-b49c-7c8b17b33976

info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version

info: [debug] Setting iOS SDK Version

info: [debug] iOS SDK Version set to 7.1

info: [debug] Detecting automation tracetemplate

info: [debug] Not auto-detecting udid, running on sim

info: [debug] Localizable.strings is not currently supported when using real devices.
info: [debug] Not setting locale because we're using a real device
info: [debug] Creating instruments

info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir:

info: [debug] Dynamic env:
info: [debug] Dynamic bootstrap code:

info: [debug] Dynamic bootstrap path:
info: [debug] Reusing dynamic bootstrap:
info: [debug] Not setting iOS and app preferences since we're on a real device
info: [debug] Starting iOS device log capture via deviceconsole

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

info: [debug] Creating iDevice object with udid 962f806a6657c8f031222b297fa4d700619d49af
info: [debug] Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller

info: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 962f806a6657c8f031222b297fa4d700619d49af --bundle com.hipalsports.hipal

info: [debug] App is installed.

info: [debug] fullReset not requested. No need to install.
info: [debug] Starting command proxy.

info: [debug] Instruments socket server started at /tmp/instruments_sock
info: [debug] Starting instruments

info: [debug] Instruments is at: /Applications/Xcode 5.1.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 962f806a6657c8f031222b297fa4d700619d49af
info: [debug] Spawning instruments with command: /Applications/Xcode 5.1.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode 5.1.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 962f806a6657c8f031222b297fa4d700619d49af com.hipalsports.hipal -e UIASCRIPT /Users/hipal/Library/Application Support/appium/bootstrap/bootstrap-3fd3829137e4c5d0.js -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:22 HP mobile_installation_proxy[201] <Error>: 0x100494000 handle_connection: Could not receive request from host.

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:24 HP DTMobileIS[967] <Warning>: Could not create service named com.apple.instruments.server.services.filebrowser

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:24 HP DTMobileIS[967] <Warning>: Could not create service named com.apple.instruments.server.services.launchdaemon

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:24 HP DTMobileIS[967] <Warning>: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:25 HP com.apple.launchd1 <Notice>: (UIKitApplication:com.hipalsports.hipal[0x62f]) Exited: Killed: 9

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:25 HP backboardd[31] <Warning>: Application 'UIKitApplication:com.hipalsports.hipal[0x62f]' exited abnormally with signal 9: Killed: 9

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP backboardd[31] <Notice>: ALS: SetDisplayFactor: factor=1.0000

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP wifid[40] <Notice>: WiFi:[434943986.338342]: ATJManager: setting ask-to-join interaction mode to Interactive

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP wifid[40] <Notice>: WiFi:[434943986.338814]: ATJManager: no entries to purge

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP wifid[40] <Notice>: WiFi:[434943986.338938]: Device is UNLOCKED
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP wifid[40] <Notice>: WiFi:[434943986.339145]: Ignoring lock state
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP wifid[40] <Notice>: WiFi:[434943986.339263]: problematic networks = and potentially problematic networks =
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP wifid[40] <Notice>: WiFi:[434943986.339402]: Unblacklisting
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP wifid[40] <Notice>: WiFi:[434943986.341434]: No change in Background Scan candidates. Skip re-programming Background Scan
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP wifid[40] <Notice>: WiFi:[434943986.341766]: Already connected to Hipal.
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP wirelessproxd[35] <Notice>: (Note ) Created WPTransfer Object for touchsetupd with daemon <DaemonBluetooth: 0x13d60b770>
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP backboardd[31] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=1
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP SpringBoard[16] <Warning>: [MPUSystemMediaControls] Enabling lock screen media controls updates for screen turning on.
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP SpringBoard[16] <Warning>: [MPUNowPlayingController] Already registered for now playing notifications.
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP wifid[40] <Notice>: WiFi:[434943986.349841]: Device display is ON
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP wifid[40] <Notice>: WiFi:[434943986.350151]: Already connected to Hipal.

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP backboardd[31] <Notice>: MultitouchHID: detection mode: 255->3 (deferring until bootloaded)

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP backboardd[31] <Notice>: MultitouchHID: device bootloaded

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP backboardd[31] <Notice>: MultitouchHID: detection mode: 3->3

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP kernel[0] <Debug>: AppleMobileADBE0::do_power_state_change(): fSoft: 1 fHard: 1 swapBusy: 0 pendingSwap: 0x0 fController: 0 -> 1 fDisplay: 0 -> 1

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP kernel[0] <Debug>: ALS: AppleARMBacklight::handleMessageGated - framebufferState -> 1
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:26 HP kernel[0] <Debug>: ALS: AppleARMBacklight::setBacklightEnableGated 1 (set level to 0x499)

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:27 HP wifid[40] <Notice>: WiFi:[434943987.795014]: BG Application: Not Present, BG Daemon: Present. Daemons: networkd apsd assistantd sharingd

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:27 HP wifid[40] <Notice>: WiFi:[434943987.795470]: Already connected to Hipal.

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:27 HP kernel[0] <Debug>: launchd[968] Container: /private/var/mobile/Applications/F904827C-E85F-41EE-AFD9-54CDEA6199B1 (sandbox)

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:27 HP backboardd[31] <Error>: HID: The 'Passive' connection 'HipalSports' access to protected services is denied.

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP DTMobileIS[967] <Error>: CoreLocation: could not chmod /var/mobile/Library/Preferences/com.apple.CoreMotion.plist errno 2 (No such file or directory)

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP DTMobileIS[967] <Error>: CoreLocation: could not chown /var/mobile/Library/Preferences/com.apple.CoreMotion.plist errno 2 (No such file or directory)

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP DTMobileIS[967] <Warning>: CLTilesManagerClient: initialize, sSharedTilesManagerClient

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP DTMobileIS[967] <Warning>: CLTilesManagerClient: init

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP DTMobileIS[967] <Warning>: CLTilesManagerClient: reconnecting, 0x14d50dc60

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP HipalSports[968] <Warning>: num: 0

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP HipalSports[968] <Warning>: ===请求参数 === {

info: [IOS_SYSLOG_ROW ] lat = 0;
info: [IOS_SYSLOG_ROW ] length = 0;
info: [IOS_SYSLOG_ROW ] lng = 0;
info: [IOS_SYSLOG_ROW ] offset = 0;
info: [IOS_SYSLOG_ROW ] type = "MY_GROUPS";
info: [IOS_SYSLOG_ROW ] userId = 48;
info: [IOS_SYSLOG_ROW ] },URL is http://test2.hipalsports.com/HiPalServices/groups/getGroups
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP HipalSports[968] <Warning>: Warning: Libinfo call to mDNSResponder on main thread

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP HipalSports[968] <Warning>: ===请求参数 === {

info: [IOS_SYSLOG_ROW ] isAll = 0;
info: [IOS_SYSLOG_ROW ] mesgTime = "2014-10-14 09:46:28";
info: [IOS_SYSLOG_ROW ] receiver = 48;
info: [IOS_SYSLOG_ROW ] },URL is http://test2.hipalsports.com/HiPalServices/messages/getReceiverMessage

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP ScriptAgent[970] <Warning>: CLTilesManagerClient: initialize, sSharedTilesManagerClient

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP ScriptAgent[970] <Warning>: CLTilesManagerClient: init

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP ScriptAgent[970] <Warning>: CLTilesManagerClient: reconnecting, 0x1456d5840

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP wifid[40] <Notice>: WiFi:[434943988.531878]: BG Application: Not Present, BG Daemon: Present. Daemons: networkd apsd assistantd sharingd

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP HipalSports[968] <Warning>: ===request.responseString === {"data":[],"errorCode":200,"errorMessage":"OK","success":true},URL is http://test2.hipalsports.com/HiPalServices/messages/getReceiverMessage

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:28 HP HipalSports[968] <Warning>: 连接成功

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:29 HP HipalSports[968] <Warning>: ===请求参数 === {

info: [IOS_SYSLOG_ROW ] "env_type" = testing;
info: [IOS_SYSLOG_ROW ] },URL is http://lb-conf.hipalsports.com/sysconfig/getSysConfig

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:29 HP HipalSports[968] <Warning>: ===request.responseString === {"data":[{"atomService":"uploadIcon","createTime":1403077090000,"env_type":"testing","id":24,"lastUpdateTime":1406014867000,"moduleName":"upload","mqttAddress":"test2.hipalsports.com","restfulUrl":"http://test2.hipalsports.com/HiPalServices/,"errorCode":200,"errorMessage":"OK","success":true},URL"}] is http://lb-conf.hipalsports.com/sysconfig/getSysConfig

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:29 HP HipalSports[968] <Warning>: ===请求参数 === {

info: [IOS_SYSLOG_ROW ] userId = 48;
info: [IOS_SYSLOG_ROW ] },URL is http://test2.hipalsports.com/HiPalServices/records/getUserRecord
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:29 HP HipalSports[968] <Warning>: ===请求参数 === {

info: [IOS_SYSLOG_ROW ] userId = 48;
info: [IOS_SYSLOG_ROW ] },URL is http://test2.hipalsports.com/HiPalServices/records/getExpiredRecords

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:29 HP geod[96] <Warning>: Can't get bundle identifier for process 60
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:29 HP geod[96] <Warning>: Can't get bundle identifier for process 60
info: [IOS_SYSLOG_ROW ] Oct 14 09:46:29 HP HipalSports[968] <Warning>: ===请求参数 === {
info: [IOS_SYSLOG_ROW ] latlngString = "22.53418273,113.94032321";
info: [IOS_SYSLOG_ROW ] },URL is http://test2.hipalsports.com/HiPalServices/aqi/queryAqi

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:29 HP locationd[60] <Notice>: Location icon should now be in state 'Active'

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:29 HP HipalSports[968] <Warning>: ===request.responseString === {"data":[],"errorCode":200,"errorMessage":"OK","success":true},URL is http://test2.hipalsports.com/HiPalServices/records/getExpiredRecords

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:29 HP HipalSports[968] <Warning>: ===request.responseString === {"data":[],"errorCode":200,"errorMessage":"OK","success":true},URL is http://test2.hipalsports.com/HiPalServices/records/getUserRecord

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:29 HP HipalSports[968] <Warning>: ===request.responseString === {"data":[{"aqi":117,"area":"深圳","id":0,"level":"三级","pm2_5":88,"pm2_5_24h":53,"primary_pollutant":"颗粒物(PM2.5)","quality":"轻度污染","time_point":"2014-10-14T08:00:00Z"}],"errorCode":200,"errorMessage":"OK","success":true},URL is http://test2.hipalsports.com/HiPalServices/aqi/queryAqi

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.2","revision":"cf6ff5939ddc6b4d45fcbabfbfe13c950e0058c4"}},"sessionId":"b8ba0112-8a35-4a71-b49c-7c8b17b33976"}

info: <-- GET /wd/hub/status 200 2.806 ms - 155 {"status":0,"value":{"build":{"version":"1.2.2","revision":"cf6ff5939ddc6b4d45fcbabfbfe13c950e0058c4"}},"sessionId":"b8ba0112-8a35-4a71-b49c-7c8b17b33976"}

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:29 HP HipalSports[968] <Warning>: ===请求参数 === {

info: [IOS_SYSLOG_ROW ] bindId = 3174381445;
info: [IOS_SYSLOG_ROW ] logoUrl = "http://tp2.sinaimg.cn/3174381445/50/40030404857/1";
info: [IOS_SYSLOG_ROW ] nickName = "Mr_JackL";
info: [IOS_SYSLOG_ROW ] },URL is http://test2.hipalsports.com/HiPalServices/users/bindAccount

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:30 HP HipalSports[968] <Warning>: (
info: [IOS_SYSLOG_ROW ] {
info: [IOS_SYSLOG_ROW ] birthday = 1990;
info: [IOS_SYSLOG_ROW ] bloodType = A;
info: [IOS_SYSLOG_ROW ] createTime = 1377574076000;

info: [IOS_SYSLOG_ROW ] currentPosition = "";
info: [IOS_SYSLOG_ROW ] email = "12345678@qq.com";
info: [IOS_SYSLOG_ROW ] gender = 0;
info: [IOS_SYSLOG_ROW ] height = 61;
info: [IOS_SYSLOG_ROW ] id = 15034;
info: [IOS_SYSLOG_ROW ] lastUpdateTime = 1412992750000;
info: [IOS_SYSLOG_ROW ] logoUrl = "http://icons-oss.hipalsports.com/usericon/48-71508eb4566b4689b779847d9d130642.png";
info: [IOS_SYSLOG_ROW ] metrology = 0;
info: [IOS_SYSLOG_ROW ] nickName = "\U7eb3\U6ce5";
info: [IOS_SYSLOG_ROW ] phone = 15811111111;
info: [IOS_SYSLOG_ROW ] signature = "\U4e0d\U8981\U95ee\U6211\U4ece\U54ea\U91cc\U6765\U54c8\U54c8";
info: [IOS_SYSLOG_ROW ] userId = 48;
info: [IOS_SYSLOG_ROW ] userName = "\U5c0f\U5c0f\U8239\U957f";
info: [IOS_SYSLOG_ROW ] weight = 63;
info: [IOS_SYSLOG_ROW ] }
info: [IOS_SYSLOG_ROW ] )

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:30 HP HipalSports[968] <Warning>: num: 0

info: [IOS_SYSLOG_ROW ] Oct 14 09:46:33 HP wifid[40] <Notice>: WiFi:[434943993.568452]: WiFiLocaleManagerCheckLocale: locale has been valid since 434940633.572962, for 3360.00 secs

info: Instruments is ready to receive commands

info: [debug] Instruments launched. Starting poll loop for new commands.
info: [debug] Setting bootstrap config keys/values
info: [debug] Pushing command to appium work queue: "target = $.target();\nau = $;\n$.isVerbose = true;\nautoAcceptAlerts = false;\n"

info: [debug] Sending command to instruments: target = $.target();
au = $;
$.isVerbose = true;
autoAcceptAlerts = false;

info: [debug] Socket data received (2 bytes)
info: [debug] Socket data being routed.
info: [debug] Sending command to instruments: target = $.target();
au = $;
$.isVerbose = true;
autoAcceptAlerts = false;

info: [debug] [INST] 2014-10-14 01:46:35 +0000 Debug: evaluation finished

info: [debug] [INST] 2014-10-14 01:46:35 +0000 Debug: responding with:

info: [debug] [INST] 2014-10-14 01:46:35 +0000 Debug: Running system command #1: /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":0,"value":false}...

info: [debug] Socket data received (28 bytes)

info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {"status":0,"value":false}

info: [debug] Setting initial orientation to PORTRAIT
info: [debug] Pushing command to appium work queue: "au.setScreenOrientation('PORTRAIT')"
info: [debug] Sending command to instruments: au.setScreenOrientation('PORTRAIT')
info: [debug] Sending command to instruments: au.setScreenOrientation('PORTRAIT')

info: [debug] [INST] 2014-10-14 01:46:36 +0000 Debug: Got new command 1 from instruments: au.setScreenOrientation('PORTRAIT')

info: [debug] [INST] 2014-10-14 01:46:36 +0000 Debug: evaluating au.setScreenOrientation('PORTRAIT')

info: [debug] [INST] 2014-10-14 01:46:36 +0000 Debug: target.setDeviceOrientation("1")


共收到 10 条回复 时间 点赞

以上是能捕获到了所有日志,这个问题已困扰我几天了,请指教!

#1 楼 @xuxiujin 请参考我的帖子,希望对你有所帮助 http://testerhome.com/topics/1267

@xiaomayi0323 看了帖子没看懂,我这个是直接与真机连接,想通过真机直接录制代码,我没有写测试代码的,请问这个行得通吗?

#3 楼 @xuxiujin 没看懂,不会吧,你那样是行不通的

那怎样才可以成功地录制到脚本呢?我现在真的是迷茫了,按照你说的三个步骤:三部分,第一,需要将手机和 Mac 连接起来,第二,将被测应用(需要 development 证书)安装到真机上 第三,在 Appium 上配置真机的 UDID 以及被测应用的 BundleID,这些我都做到了!

#5 楼 @xuxiujin 你还需要运行测试代码,也就是需要将 UIAutomation 运行起来

我用 1.2.0 的版本没有问题,1.2.2 的会报错,可能是我的 Java web 没有更新,由于对 MAC 系统不是很了解只有先用 1.2.0 的,现在问题基本上都 已经解决了,那么在 appium inspecor 生成的脚本如何保存?

#7 楼 @xuxiujin http://testerhome.com/topics/1377 看这个帖子。 你都不看出错信息啊

有些时候是看懂了,问题没解决以为没看懂!只有问问了!

#9 楼 @xuxiujin Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller 看这个信息,然后看我给你的帖子。

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