грешка: Неуспешно улавяне на Logcat: хвърляне на ENOENT

Starting Node Server 
info: Welcome to Appium v1.2.0 (REV e53f49c706a25242e66d36685c268b599cc18da5)
debug: Non-default server args: {"address":"127.0.0.1","logNoColors":true,"platformName":"Android","platformVersion":"19","automationName":"Appium"}
info: Appium REST http interface listener started on 127.0.0.1:4723
info: LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"automationName":"Appium","platform":"Android","platformVersion":"19","app":"C:\\Users\\qadeer\\Documents\\NetBeansProjects\\convoTest\\app\\Convo.apk","platformName":"Android","deviceName":"01899dd5c94c237a","browserName":"","app-package":"com.convo.android","app-activity":".ConvoMain","version":"4.4.2"}}
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"automationName":"Appium","platform":"Android","platformVersion":"19","app":"C:\\Users\\qadeer\\Documents\\NetBeansProjects\\convoTest\\app\\Convo.apk","platformName":"Android","deviceName":"01899dd5c94c237a","browserName":"","app-package":"com.convo.android","app-activity":".ConvoMain","version":"4.4.2"}}
info: Starting android appium
debug: The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : platform, app-package, app-activity, version
debug: No appActivity desired capability or server param. Parsing from apk.
debug: No appPackage desired capability or server param. Parsing from apk.
debug: Using local app from desired caps: C:\Users\qadeer\Documents\NetBeansProjects\convoTest\app\Convo.apk
debug: Creating new appium session baf82af5-dfab-4837-8fa0-a56da25fa1ec
debug: Using fast reset? true
debug: Preparing device for session
debug: Checking whether app is actually present
debug: Checking whether adb is present
debug: Using adb from D:\Soft backup\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe

info: Retrieving device
debug: Trying to find a connected android device
debug: Getting connected devices...
debug: executing: "D:\Soft backup\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe" devices
debug: 1 device(s) connected
info: Found device 01899dd5c94c237a
debug: Setting device id to 01899dd5c94c237a
debug: Waiting for device to be ready and to respond to shell commands (timeout = 5)
debug: executing: "D:\Soft backup\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe" -s 01899dd5c94c237a wait-for-device
debug: executing: "D:\Soft backup\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe" -s 01899dd5c94c237a shell "echo 'ready'"
debug: Starting logcat capture
error: Logcat capture failed: spawn ENOENT
debug: Stopping logcat capture

това е регистрационният файл на сървъра на приложението appium, получавам тази грешка

error: Logcat capture failed: spawn ENOENT
debug

: Спиране на улавянето на logcat

и моето приложение се увисва тук са моите възможности

    File app = new File( "app/Sat.apk");

            if(app.exists())
                System.out.println("exsist");

            DesiredCapabilities capabilities = new DesiredCapabilities();
            capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
            capabilities.setCapability(CapabilityType.PLATFORM, "Android");
            capabilities.setCapability(CapabilityType.VERSION, "4.4.2");
            capabilities.setCapability("automationName","Appium");
            capabilities.setCapability("platformName","Android");
            capabilities.setCapability("platformVersion", "19");
            //capabilities.setCapability("deviceName", "emulator-5554");
            capabilities.setCapability("deviceName", "01899dd5c94c237a");
            //capabilities.setCapability("device-orientation", "portrait"); 
            capabilities.setCapability("app", app.getAbsolutePath());
            capabilities.setCapability("app-package", "com.sat.android");
            capabilities.setCapability("app-activity", ".SatMain");


      try {
        driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
    } catch (MalformedURLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
      driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);  
              driver.quit();

досега не мога да разбера какъв е проблемът защо logcat не показва отговор

любезно помогнете, ще бъде оценено благодаря :)


person A Qadeer Qureshi    schedule 23.09.2014    source източник


Отговори (4)


Имах подобен проблем и го реших, като премахнах интервалите в пътя към моята папка sdk. Във вашия случай опитайте да преименувате пътя си на

"D:\Softbackup\adt-bundle-windows-x86_64-20131030\sdk\" вместо

"D:\Soft backup\adt-bundle-windows-x86_64-20131030\sdk\"

person The Prince    schedule 07.10.2014

В Mac, при актуализиране до нов SDK за Android, свързан с IntelliJ Android Studio, пътят на sdk се промени на нещо като /Applications/Android Studio.app/sdk. Празното пространство също прави сесията ми на appium неуспешна. Изненадващо appium-doctor проверките не дадоха никакви съвети.

Реших го така

ln -s /Applications/Android\ Studio.app/sdk /Users/sergio/Software/android_sdk
export ANDROID_HOME=/Users/sergio/Software/android_sdk
person sgimeno    schedule 20.10.2014

Вие поставяте нивото на API във възможността platformVersion и Appium не знае каква е възможността version (която сте задали на 4.4.2), така че я игнорира.

debug: The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : platform, app-package, app-activity, version

Трябва да премахнете CapabilityType.VERSION, "4.4.2" и да използвате platformVersion вместо това.

Опитайте:

 DesiredCapabilities capabilities = new DesiredCapabilities();
 capabilities.setCapability(CapabilityType.PLATFORM, "Android");
 capabilities.setCapability("automationName","Appium");
 capabilities.setCapability("platformName","Android");
 capabilities.setCapability("platformVersion", "4.4.2");
 //capabilities.setCapability("deviceName", "emulator-5554");
 capabilities.setCapability("deviceName", "01899dd5c94c237a");
 //capabilities.setCapability("device-orientation", "portrait"); 
 capabilities.setCapability("app", app.getAbsolutePath());
person Jess    schedule 23.09.2014
comment
все още има същия проблем @sheeptest - person A Qadeer Qureshi; 24.09.2014

Проблемът с вашите възможности е, че в DeviceName трябва да споменавате "Android"

Трябва да използвате способности като тези:

       capabilities.SetCapability("appium-version", "1.2.0");
        capabilities.SetCapability("platformName", "Android");
        capabilities.SetCapability("platformVersion", "4.3");
        capabilities.SetCapability("deviceName", "Android");
        capabilities.SetCapability("app","--" );
        capabilities.SetCapability("app-package","--" );

        capabilities.SetCapability("app-activity", "--");
person jain28    schedule 07.10.2014