糟糕的应用程序:../ grid / app-bin / null。应用程序路径必须是绝对的,或者相对于appium server install目录,或者是压缩文件的URL

时间:2017-02-24 17:12:36

标签: java selenium-webdriver appium appium-ios

问题

com。***。pimobile.automation.driver.appium.ios.IOSAppiumDriver - 初始化IOS驱动程序时出错。错误:处理命令时发生未知的服务器端错误。原始错误:错误的应用程序:../ grid / app-bin / null。应用程序路径必须是绝对的,或相对于appium服务器安装目录,或压缩文件的URL或特殊应用程序名称。 (警告:服务器未提供任何堆栈跟踪信息)

环境

Appium version (or git revision) that exhibits the issue: 1.6.3
Last Appium version that did not exhibit the issue (if applicable): 1.5.3
Desktop OS/version used to run Appium: MAC EI Capitan
Node.js version (unless using Appium.app|exe): 6.9.5
Mobile platform/version under test: IOS
Real device or emulator/simulator: Simulator
Appium CLI or Appium.app|exe: Appium CLI
Selenium Grid

详细

Tests are failing intermittently with the error mentioned above.


This is happening when we are running tests in parallel using Grid only and not when the tests are run individually. The same tests were running absolutely fine when they were run without using Grid with the new version.


Fyi, our framework is designed so that the simulators are killed after every test is executed. But what is really happening is during one of the test execution, the simulator is not closing and when the next test gets triggered, the old simulator will still be showing up and then the above error is displayed. Also, if we check the app directory, the app is copied in that directory.

Below are the solutions we have already tried but has never worked:
  1. 要通过在tearDown()中添加以下代码来终止模拟器,但这也无效。 String kill [] = {“killall”,“iOS模拟器”}; 调用Runtime.getRuntime()EXEC(杀死);

    即使使用此代码: String kill [] = {“killall”,“com.apple.CoreSimulator.CoreSimulatorService”};在拆除方法中。

    1. 尝试过Absolute&相对路径。在这两个实例中,测试都因上述错误而失败。
  2. Appium日志

    `[XCUITest] Error: Bad app: ../grid/app-bin/null. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.
    at XCUITestDriver.configureApp$ (../../lib/driver.js:397:13)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    Error: Bad app: ../grid/app-bin/null. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.
    at XCUITestDriver.configureApp$ (../../lib/driver.js:397:13)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    `at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    [debug] [XCUITest] Running iOS simulator reset flow
    [debug] [XCUITest] Shutting down simulator
    [debug] [iOSSim] Killing all iOS Simulators
    [debug] [XCUITest] Full reset is on. Cleaning simulator
    [debug] [iOSSim] Killing any simulator daemons for 27B739F4-CB2F-48CF-91D3-2DBBB77299C9
    [iOSSim] Cleaning simulator 27B739F4-CB2F-48CF-91D3-2DBBB77299C9
    [debug] [XCUITest] Resetting simulator
    [MJSONWP] Encountered internal error running command: Error: Bad app: ../grid/app-bin/null. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.
    at XCUITestDriver.configureApp$ (../../lib/driver.js:397:13)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    [HTTP] <-- POST /wd/hub/session 500 1206 ms - 296
    [HTTP] --> GET /wd/hub/status {}
    [debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
    [debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.3","revision":null}}
    [HTTP] <-- GET /wd/hub/status 200 8 ms - 83
    [HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"../grid/app-bin/null","newCommandTimeout":360000,"platformVersion":"9.3","automationName":"XCUITest","platformName":"iOS","deviceName":"iPhone 6s","fullReset":true,"platform":"MAC"}}
    [debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"../grid/app-bin/null","newCommandTimeout":360000,"platformVersion":"9.3","automationName":"XCUITest","platformName":"iOS","deviceName":"iPhone 6s","fullReset":true,"platform":"MAC"},null,null,null,null,null,null]
    [Appium] Creating new XCUITestDriver session
    [Appium] Capabilities:
    [Appium] app: '../grid/app-bin/null'
    [Appium] newCommandTimeout: 360000
    [Appium] platformVersion: '9.3'
    [Appium] automationName: 'XCUITest'
    [Appium] platformName: 'iOS'
    [Appium] deviceName: 'iPhone 6s'
    [Appium] fullReset: true
    [Appium] platform: 'MAC'
    [debug] [XCUITest] XCUITestDriver version: 2.4.2
    [BaseDriver] The following capabilities were provided, but are not recognized by appium: platform.
    [BaseDriver] Session created with session id: 1b43ac72-037a-4c38-b7bd-d43a9f5bd0ee
    [debug] [XCUITest] Xcode version set to '8.2.1'
    [debug] [XCUITest] iOS SDK Version set to '10.2'
    [iOSSim] Constructing iOS simulator for Xcode version 8.2.1 with udid '27B739F4-CB2F-48CF-91D3-2DBBB77299C9'
    [debug] [XCUITest] Full reset requested. Cleaning and stopping simulator
    [debug] [iOSSim] Killing any simulator daemons for 27B739F4-CB2F-48CF-91D3-2DBBB77299C9
    [iOSSim] Cleaning simulator 27B739F4-CB2F-48CF-91D3-2DBBB77299C9
    [debug] [iOSSim] Killing all iOS Simulators
    [XCUITest] Determining device to run tests on: udid: '27B739F4-CB2F-48CF-91D3-2DBBB77299C9', real device: false
    [BaseDriver] Using local app '../grid/app-bin/null'
    [XCUITest] Error: New app path ../grid/app-bin/null did not have extension .app
    at Object.configureApp$ (../../../lib/basedriver/helpers.js:53:11)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
    at invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at enqueueResult (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
    at Promise.F (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.export.js:30:36)
    at AsyncIterator.enqueue (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
    at Object.runtime.async (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
    at Object.configureApp (../../../lib/basedriver/helpers.js:32:22)
    at XCUITestDriver.configureApp$ (../../lib/driver.js:394:42)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
    at invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at enqueueResult (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
    at Promise.F (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.export.js:30:36)
    at AsyncIterator.enqueue (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
    at Object.runtime.async (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
    at XCUITestDriver.configureApp (../../lib/driver.js:364:34)
    at XCUITestDriver.start$ (../../lib/driver.js:208:18)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    Error: New app path ../grid/app-bin/null did not have extension .app
    at Object.configureApp$ (../../../lib/basedriver/helpers.js:53:11)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
    at invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at enqueueResult (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
    at Promise.F (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.export.js:30:36)
    at AsyncIterator.enqueue (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
    at Object.runtime.async (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
    at Object.configureApp (../../../lib/basedriver/helpers.js:32:22)
    at XCUITestDriver.configureApp$ (../../lib/driver.js:394:42)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
    at invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at enqueueResult (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
    at Promise.F (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.export.js:30:36)
    at AsyncIterator.enqueue (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js21)
    at Object.runtime.async (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
    at XCUITestDriver.configureApp (../../lib/driver.js:364:34)
    at XCUITestDriver.start$ (../../lib/driver.js:208:18)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] 
    (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js 21)at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)  ``[XCUITest]Error: Bad app: ../grid/app-bin/null.' App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.`
    

    Appium Logs from all the nodes

0 个答案:

没有答案