Forum Discussion

Hyung-Mok-LEE's avatar
Hyung-Mok-LEE
Occasional Contributor
3 years ago
Solved

An Appium server error occurred: Failed to create a new session

Hello. I'm making the first attempt for a mobile test. So I'm studying Smartbear's Academy course - TestComplete Mobile Automation Engineer. I try to run the sample file while watching the video, ...
  • vinniew's avatar
    3 years ago

    Hi Hyung-Mok-LEE 

     

    The error is a little cryptic. 


    I would start looking at the device you are trying to connect to and the device you have specified in the capabilities aswell as your ADB setup. 

     

    run 'adb devices' in command line client, if your phone has been connected adb, it will show up here but more importantly it will display the correct device name you need to reference in your capabilities.

     

    From here I would compare and see if they match, if they dont use what is found for the device name in your capabilities. 

    note: if you have not configured the 'adb' environment path, cd to android-sdk/platform-tools/, then run it.

     

    KR

    Vinnie

  • vinniew's avatar
    vinniew
    3 years ago

    Additionally Hyung-Mok-LEE 

     

    If you do not wish to set up local Appium or if find it too tricky. 

     

    Why not use BitBar Appium in TestComplete, its very easy to set up, no local appium server is needed, and to connect to a device is also very easy and straightforward. 

     

    Check out the video here in the documentation (you will need a BitBar Trial) 

     

    https://support.smartbear.com/testcomplete/docs/app-testing/mobile/device-cloud/index.html

     

    KR

    Vinnie 

  • Hyung-Mok-LEE's avatar
    Hyung-Mok-LEE
    3 years ago

    It's going really well as you said. Thank you.
    One thing I missed was that I didn't install JDK. After installing JDK, I added JAVA_HOME to the environmental variable, and it works properly.

     

     

  • Hyung-Mok-LEE's avatar
    Hyung-Mok-LEE
    3 years ago

    Finally, the environment should be set up as follows.

    1. setup JDK and add Environmental variable "JAVA_HOME" 

    2. Appium server setup

    3. Android Studio setup

    4. download and setup the mobile sample from smartbear website

    5. connect the mobile phone to my computer.

    6. Execute testComplete 15.30

    7. Create project suite and project

    8. Check the current project properties - Mobile devices > General > Mobile device cloud (BitBar and local Appium)

    9. Click "Show Mobile Screen"  

    10. Input Server URL, Application path, and Parameters (JSON)

    11. Finally, I clicked the OK button.

     

    Set up Appium on Windows for Testing Android Devices | TestComplete Documentation (smartbear.com)