Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/103.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Appium如何在物理设备上运行_Java_Ios_Appium - Fatal编程技术网

Java Appium如何在物理设备上运行

Java Appium如何在物理设备上运行,java,ios,appium,Java,Ios,Appium,所以我试着在一个真正的物理设备上运行我的测试,但它总是说仪器在启动时会崩溃。这是错误代码 info: [debug] Attempting to run app on real device with UDID 70cb6f4fd5e313b16742c083ccbc1897d82b094d info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/ins

所以我试着在一个真正的物理设备上运行我的测试,但它总是说仪器在启动时会崩溃。这是错误代码

info: [debug] Attempting to run app on real device with UDID 70cb6f4fd5e313b16742c083ccbc1897d82b094d
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 70cb6f4fd5e313b16742c083ccbc1897d82b094d com.weather.corp.TWC -e UIASCRIPT "/Users/michael.kovalsky/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}

info: [debug] [INSTSERVER] Instruments exited with code 253

info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch
info: [debug] Stopping iOS log capture
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons

error: Failed to start an Appium session, err was: Error: Instruments crashed on startup

info: [debug] On a real device; cannot clean device state
info: [debug] Cleaning up appium session
info: [debug] Error: Instruments crashed on startup
    at Instruments.onInstrumentsExit (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:389:31)
    at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:308:12)
    at ChildProcess.emit (events.js:110:17)
    at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
info: <-- POST /wd/hub/session 500 19219.862 ms - 182 

And this is how my setUp method looks like:

    public void setUp() throws FileNotFoundException, IOException, IllegalMonitorStateException
    {

        //Users/user/Library/Developer/Xcode/DerivedData/iPhone-aowtfpozolcnpigbxzxxxxkyiubq/Build/Products/Debug-iphonesimulator/TheWeather.app
        File app = new File("/Users/michael.kovalsky/Library/Developer/Xcode/DerivedData/iPhone-aowtfpozolcnpigbxzxxxxkyiubq/Build/Products/Debug-iphonesimulator/TheWeather.app");


        DesiredCapabilities capabilities = new DesiredCapabilities();

        capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "iOS");

        capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "8.3");

        capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 6 Plus");

        capabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
        capabilities.setCapability("bundleID", "com.weather.corp.TWC");
        capabilities.setCapability("udid", "70cb6f4fd5e313b16742c083ccbc1897d82b094d");


        driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);

        logger.info("Environment: iOS 8.3 and iPhone 6 plus Simulator");

    }
info:[debug]试图使用UDID 70cb6f4fd5e313b16742c083ccbc1897d82b094d在真实设备上运行应用程序
信息:[调试]使用命令生成仪器:/Applications/Xcode.app/Contents/Developer/usr/bin/instruments-t/Applications/Xcode.app/Contents/Applications/instruments.app/Contents/Automation.xrplugin/Contents/Resources/Automation.tracetemplate-D/tmp/appium instruments/inscli0.trace-w 70cb6f4fd5e313b16742c083ccbc1897d82b094dcom.weather.corp.TWC-e UIASCRIPT“/Users/michael.kovalsky/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js”-e UIARESULTSPATH/tmp/appium instruments
信息:[调试]和额外无延迟环境:{}
信息:[调试]和启动超时(毫秒):{“全局”:90000}
信息:[调试][INSTSERVER]仪器已退出,代码为253
信息:[调试]关闭所有仪器
信息:[调试]仪器在启动时崩溃
信息:[调试]我们超过了允许仪器成功启动的重试次数;发射失败
信息:[调试]正在停止iOS日志捕获
信息:[调试]正在运行ios sim重置流
信息:[调试]正在终止模拟器进程
信息:[调试]Killall iOS模拟器
信息:[调试]正在杀死任何其他模拟器守护进程
错误:无法启动Appium会话,错误为:错误:仪器在启动时崩溃
信息:[调试]在真实设备上;无法清除设备状态
信息:[调试]正在清理应用程序会话
信息:[调试]错误:仪器在启动时崩溃
在Instruments.onInstrumentsExit(/Applications/Appium.app/Contents/Resources/node_modules/Appium/node_modules/Appium Instruments/lib/Instruments.js:389:31)
在空。(/Applications/Appium.app/Contents/Resources/node_modules/Appium/node_modules/Appium instruments/lib/instruments.js:308:12)
在ChildProcess.emit(events.js:110:17)
在Process.ChildProcess.\u handle.onexit(child\u Process.js:1067:12)
信息:[调试]响应客户端时出现错误:{“状态”:33,“值”:{“消息”:“无法创建新会话。(原始错误:启动时仪表崩溃)”,“origValue”:“启动时仪表崩溃”},“会话ID”:null}

信息:您可能缺少ios webkit代理。 请参阅本手册,其中包括从安装到运行的完整文档


在运行test start proxy之前。

Ty对于答案,我将更新我的问题,使其成为已回答的问题,因为问题显然只是让手机由开发人员签名。