请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

appium 1.7.1 Xcode9.4.1 模拟器运行后 应用闪退,不断重启

问题描述:
用pycharm写了个简单的启动应用的代码。运行时模拟上webdriveragent已经装上了,但是在启动应用的时候,打开首页——>闪退 这个情况出现了大概4次,然后就不再启动。
模拟器一直停留在 刚安装完webdriveragent 和.app的 界面上不动了,但是此时点击模拟器的home键可以继续操作,应该不是模拟器卡死了。
请问老师 ,这个一直闪退无法打开是什么导致的呢?

以下是appium 日志:
[Appium] Welcome to Appium v1.7.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {“capabilities”:{“firstMatch”:[{“appium:automationName”:“XCUITest”,“platformName”:“iOS”,“appium:platformVersion”:“11.4”,“appium:deviceName”:“iPhone Simulator”,“appium:app”:"/Users/zhongguojie/Desktop/mukewang.app"}]},“desiredCapabilities”:{“automationName”:“XCUITest”,“platformName”:“iOS”,“platformVersion”:“11.4”,“deviceName”:“iPhone Simulator”,“app”:"/Users/zhongguojie/Desktop/mukewang.app"}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“automationName”:“XCUITest”,“platformName”:“iOS”,“platformVersion”:“11.4”,“deviceName”:“iPhone Simulator”,“app”:"/Users/zhongguojie/Desktop/mukewang.app"},null,{“firstMatch”:[{“appium:automationName”:“XCUITest”,“platformName”:“iOS”,“appium:platformVersion”:“11.4”,“appium:deviceName”:“iPhone Simulator”,“appium:app”:"/Users/zhongguojie/Desktop/mukewang.app"}]}]
[BaseDriver] Event ‘newSessionRequested’ logged at 1556196371013 (20:46:11 GMT+0800 (CST))
[Appium] Creating new XCUITestDriver (v2.51.1) session
[Appium] Capabilities:
[Appium] automationName: ‘XCUITest’
[Appium] platformName: ‘iOS’
[Appium] platformVersion: ‘11.4’
[Appium] deviceName: ‘iPhone Simulator’
[Appium] app: ‘/Users/zhongguojie/Desktop/mukewang.app’
[BaseDriver] Session created with session id: cb0302a4-ada7-4e7a-8131-040e60fc9b4a
[XCUITest] Xcode version set to ‘9.4.1’
[XCUITest] iOS SDK Version set to ‘11.4’
[BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1556196371217 (20:46:11 GMT+0800 (CST))
[XCUITest] Changing deviceName from ‘iPhone Simulator’ to ‘iPhone 6’
[iOSSim] Constructing iOS simulator for Xcode version 9.4.1 with udid ‘6AC9A619-35E5-4E89-9A2E-A3F6B5BAAC8B’
[XCUITest] Determining device to run tests on: udid: ‘6AC9A619-35E5-4E89-9A2E-A3F6B5BAAC8B’, real device: false
[BaseDriver] Using local app ‘/Users/zhongguojie/Desktop/mukewang.app’
[BaseDriver] Event ‘appConfigured’ logged at 1556196371465 (20:46:11 GMT+0800 (CST))
[XCUITest] Checking whether app ‘/Users/zhongguojie/Desktop/mukewang.app’ is actually present on file system
[XCUITest] App is present
[iOS] Getting bundle ID from app ‘/Users/zhongguojie/Desktop/mukewang.app’: ‘com.mukewang.mukewang’
[BaseDriver] Event ‘resetStarted’ logged at 1556196371485 (20:46:11 GMT+0800 (CST))
[XCUITest] Not scrubbing third party app in anticipation of uninstall
[BaseDriver] Event ‘resetComplete’ logged at 1556196371595 (20:46:11 GMT+0800 (CST))
[iOSLog] Starting iOS 11.4 simulator log capture
[iOSLog] System log path: /Users/zhongguojie/Library/Logs/CoreSimulator/6AC9A619-35E5-4E89-9A2E-A3F6B5BAAC8B/system.log
[BaseDriver] Event ‘logCaptureStarted’ logged at 1556196371799 (20:46:11 GMT+0800 (CST))
[XCUITest] Setting up simulator
[iOS] No reason to set locale
[iOS] No iOS / app preferences to set
[iOSSim] Setting common Simulator preferences to {“ConnectHardwareKeyboard”:false}
[iOSSim] Updated shared Simulator preferences at ‘/Users/zhongguojie/Library/Preferences/com.apple.iphonesimulator.plist’ with {“ConnectHardwareKeyboard”:false}
[iOSSim] The count of running Simulator UI client instances is 0
[iOSSim] Booting Simulator with UDID 6AC9A619-35E5-4E89-9A2E-A3F6B5BAAC8B…
[iOSSim] Starting Simulator UI with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID 6AC9A619-35E5-4E89-9A2E-A3F6B5BAAC8B -ConnectHardwareKeyboard 0
[iOSSim] The count of running Simulator UI client instances is 1
[iOSSim] Simulator with UDID 6AC9A619-35E5-4E89-9A2E-A3F6B5BAAC8B booted in 14 seconds
[BaseDriver] Event ‘simStarted’ logged at 1556196386179 (20:46:26 GMT+0800 (CST))
[XCUITest] Installing ‘/Users/zhongguojie/Desktop/mukewang.app’ on Simulator with UUID ‘6AC9A619-35E5-4E89-9A2E-A3F6B5BAAC8B’…
[XCUITest] The app has been installed successfully.
[BaseDriver] Event ‘appInstalled’ logged at 1556196391894 (20:46:31 GMT+0800 (CST))
[XCUITest] Using WDA path: ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Capability ‘useNewWDA’ set to false, so trying to reuse currently running WDA instance at ‘http://localhost:8100/
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[XCUITest] WDA is not listening at ‘http://localhost:8100/’. Rebuilding…
[BaseDriver] Event ‘wdaStartAttempted’ logged at 1556196391971 (20:46:31 GMT+0800 (CST))
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[XCUITest] Killing running processes ‘xcodebuild.*6AC9A619-35E5-4E89-9A2E-A3F6B5BAAC8B, iproxy 8100, 6AC9A619-35E5-4E89-9A2E-A3F6B5BAAC8B.*XCTRunner’ for the device 6AC9A619-35E5-4E89-9A2E-A3F6B5BAAC8B…
[XCUITest] ‘pgrep -nif xcodebuild.*6AC9A619-35E5-4E89-9A2E-A3F6B5BAAC8B’ didn’t detect any matching processes. Return code: 1
[XCUITest] ‘pgrep -nif iproxy 8100’ didn’t detect any matching processes. Return code: 1
[XCUITest] ‘pgrep -nif 6AC9A619-35E5-4E89-9A2E-A3F6B5BAAC8B.*XCTRunner’ didn’t detect any matching processes. Return code: 1
[XCUITest] Using Xcode 9.4.1, so fixing WDA codebase
[XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=6AC9A619-35E5-4E89-9A2E-A3F6B5BAAC8B IPHONEOS_DEPLOYMENT_TARGET=11.4’ in directory ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Output from xcodebuild will not be logged. To see xcode logging, use ‘showXcodeLog’ desired capability
[XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[XCUITest] Log file for xcodebuild test: /var/folders/lm/myxk5wfs26bdrc9bmncf1d6h0000gp/T/com.apple.dt.XCTest/IDETestRunSession-DFB1A54E-D937-4988-B4F6-415EB7BA2D00/WebDriverAgentRunner-4BACFB8F-3A9D-42C6-A28D-11C35DAE1283/Session-WebDriverAgentRunner-2019-04-25_204636-o3bvsb.log
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Got response with status 200: “{\n “value” : {\n “state” : “success”,\n “os” : {\n “name” : “iOS”,\n “version” : “11.4”\n },\n “ios” : {\n “simulatorVersion” : “11.4”,\n “ip” : “10.169.44.18”\n },\n “build” : {\n “time” : “Apr 24 2019 23:12:33”\n }\n },\n “sessionId” : “14DC6D4C-3160-4306-B4F6-B0FDF25728EB”,\n “status” : 0\n}”
[XCUITest] WebDriverAgent running on ip ‘10.169.44.18’
[XCUITest] WebDriverAgent successfully started after 10662ms
[BaseDriver] Event ‘wdaSessionAttempted’ logged at 1556196402862 (20:46:42 GMT+0800 (CST))
[XCUITest] Sending createSession command to WDA
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.mukewang.mukewang”,“arguments”:[],“environment”:{},“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[JSONWP Proxy] Got response with status 200: {“value”:“Failed to launch com.mukewang.mukewang application”,“sessionId”:“14DC6D4C-3160-4306-B4F6-B0FDF25728EB”,“status”:13}
[XCUITest] Failed to create WDA session. Retrying…
[BaseDriver] Event ‘wdaSessionAttempted’ logged at 1556196589389 (20:49:49 GMT+0800 (CST))
[XCUITest] Sending createSession command to WDA
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.mukewang.mukewang”,“arguments”:[],“environment”:{},“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}
[JSONWP Proxy] Got response with status 200: {“value”:“Failed to launch com.mukewang.mukewang application”,“sessionId”:“14DC6D4C-3160-4306-B4F6-B0FDF25728EB”,“status”:13}
[XCUITest] Failed to create WDA session. Retrying…
[BaseDriver] Event ‘wdaSessionAttempted’ logged at 1556196776101 (20:52:56 GMT+0800 (CST))
[XCUITest] Sending createSession command to WDA
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.mukewang.mukewang”,“arguments”:[],“environment”:{},“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,“shouldUseSingletonTestManager”:true}}

这个是我写的Python代码:
from appium import webdriver

capability = {
“automationName”: “XCUITest”,
“platformName”: “iOS”,
“platformVersion”: “11.4”, # 我的mac系统提示只支持11.4及以上的版本
"deviceName": “iPhone Simulator”,
“app”: “/Users/zhongguojie/Desktop/mukewang.app”
}
driver = webdriver.Remote(‘http://127.0.0.1:4723/wd/hub’, capability)

正在回答 回答被采纳积分+3

1回答

Mushishi 2019-04-26 13:10:15

你使用你们app进行操作,慕课的app后面是不允许模拟器安装的。你现在需要确定一下,你是不是手动安装后进行手动启动的时候页是不是启动不了。

0 回复 有任何疑惑可以回复我~
  • 提问者 慕神1222616 #1
    用我们自己的App 有相同的问题。不是慕课App 一个应用这样。现在还是 启动不了。
    无论是 写代码自动启动,还是闪退后 用模拟器手动启动,都会闪退
    回复 有任何疑惑可以回复我~ 2019-04-26 13:35:09
  • 提问者 慕神1222616 #2
    在真机上,用没经过解压的IPA包,是能正常启动的。就是在模拟器上启动时闪退。
    回复 有任何疑惑可以回复我~ 2019-04-26 13:36:56
  • 提问者 慕神1222616 #3
    老师是否能 远程操控电脑帮我看下?
    回复 有任何疑惑可以回复我~ 2019-04-26 14:40:05
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信