Appium: Exception: Invalid server instance exception has occured: There is no installed nodes












4















I tried to start the appium server programmatically but encounter error. How to resolve this issues? I have nodejs installed and appium installed and environemnt variable set properly. I"m using maven appium java client 6.1.0 and selenium 3.14.0. Please help. A billion thanks for your help.



Code:



try {
File appDir = new File(System.getProperty("user.dir"));
File app = new File(appDir, "..\apk\Flipkart.apk");

// apk Capabilities
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("deviceName", "Sony Xperia Z2");
caps.setCapability("BROWSER_NAME", "Android");
caps.setCapability("platformVersion", "6.0");
caps.setCapability(MobileCapabilityType.PLATFORM_NAME, Platform.ANDROID);
//caps.setCapability("udid", "WUJ01N4RQ3"); // DeviceId from "adb devices" command
caps.setCapability("platformName", "Android");
caps.setCapability("app", app.getAbsolutePath());
caps.setCapability("appPackage", "com.flipkart.android");
caps.setCapability("appActivity","com.flipkart.android.SplashActivity");

// Appium Capabilities
caps.setCapability("skipUnlock","true");
caps.setCapability("noReset","false");

appiumBuilder = new AppiumServiceBuilder();
appiumBuilder.withIPAddress("127.0.0.1");
appiumBuilder.usingPort(47233);
appiumBuilder.withCapabilities(caps);
appiumBuilder.withStartUpTimeOut(3, TimeUnit.MINUTES);
appiumBuilder.withLogFile(new File(System.getProperty("user.dir") + "\log\appium.log"));
appiumBuilder.withArgument(GeneralServerFlag.SESSION_OVERRIDE);
appiumBuilder.withArgument(GeneralServerFlag.LOG_LEVEL, "DEBUG");
appiumBuilder.withArgument(GeneralServerFlag.ASYNC_TRACE, "true");

appiumServer = AppiumDriverLocalService.buildService(appiumBuilder);
appiumServer.start();
//new URL("http://127.0.0.1:47233/wd/hub")
driver = new AndroidDriver<MobileElement>(appiumServer, caps);
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);

} catch (Exception ex) {
LogManager.logger.log(Level.INFO, "Exception: " + ex.getMessage());
}


Error Log:




INFO: Exception: Invalid server instance exception has occured: There
is no installed nodes! Please install node via NPM
(https://www.npmjs.com/package/appium#using-node-js) or download and
install Appium app (http://appium.io/downloads.html) Jan 03, 2019
3:52:12 PM com.peterwkc.testManager.AndroidManager tearDown INFO:
Exception: null




EDIT:
I believe appium source code cannot detect my installation of nodejs and appium.










share|improve this question

























  • Have you installed appium server in your system? you must install appium server manually.

    – Suban Dhyako
    Jan 3 at 8:00











  • Installed already lol

    – nicholas
    Jan 3 at 8:03











  • can you post your error log?

    – Suban Dhyako
    Jan 3 at 8:04











  • Did you installed node.js in your system? Do npm -v shows npm version? If it is not showing the version then you must add the nodejs path in the system variable

    – Suban Dhyako
    Jan 4 at 4:33













  • Shows 6.4.1 version.

    – nicholas
    Jan 4 at 8:01
















4















I tried to start the appium server programmatically but encounter error. How to resolve this issues? I have nodejs installed and appium installed and environemnt variable set properly. I"m using maven appium java client 6.1.0 and selenium 3.14.0. Please help. A billion thanks for your help.



Code:



try {
File appDir = new File(System.getProperty("user.dir"));
File app = new File(appDir, "..\apk\Flipkart.apk");

// apk Capabilities
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("deviceName", "Sony Xperia Z2");
caps.setCapability("BROWSER_NAME", "Android");
caps.setCapability("platformVersion", "6.0");
caps.setCapability(MobileCapabilityType.PLATFORM_NAME, Platform.ANDROID);
//caps.setCapability("udid", "WUJ01N4RQ3"); // DeviceId from "adb devices" command
caps.setCapability("platformName", "Android");
caps.setCapability("app", app.getAbsolutePath());
caps.setCapability("appPackage", "com.flipkart.android");
caps.setCapability("appActivity","com.flipkart.android.SplashActivity");

// Appium Capabilities
caps.setCapability("skipUnlock","true");
caps.setCapability("noReset","false");

appiumBuilder = new AppiumServiceBuilder();
appiumBuilder.withIPAddress("127.0.0.1");
appiumBuilder.usingPort(47233);
appiumBuilder.withCapabilities(caps);
appiumBuilder.withStartUpTimeOut(3, TimeUnit.MINUTES);
appiumBuilder.withLogFile(new File(System.getProperty("user.dir") + "\log\appium.log"));
appiumBuilder.withArgument(GeneralServerFlag.SESSION_OVERRIDE);
appiumBuilder.withArgument(GeneralServerFlag.LOG_LEVEL, "DEBUG");
appiumBuilder.withArgument(GeneralServerFlag.ASYNC_TRACE, "true");

appiumServer = AppiumDriverLocalService.buildService(appiumBuilder);
appiumServer.start();
//new URL("http://127.0.0.1:47233/wd/hub")
driver = new AndroidDriver<MobileElement>(appiumServer, caps);
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);

} catch (Exception ex) {
LogManager.logger.log(Level.INFO, "Exception: " + ex.getMessage());
}


Error Log:




INFO: Exception: Invalid server instance exception has occured: There
is no installed nodes! Please install node via NPM
(https://www.npmjs.com/package/appium#using-node-js) or download and
install Appium app (http://appium.io/downloads.html) Jan 03, 2019
3:52:12 PM com.peterwkc.testManager.AndroidManager tearDown INFO:
Exception: null




EDIT:
I believe appium source code cannot detect my installation of nodejs and appium.










share|improve this question

























  • Have you installed appium server in your system? you must install appium server manually.

    – Suban Dhyako
    Jan 3 at 8:00











  • Installed already lol

    – nicholas
    Jan 3 at 8:03











  • can you post your error log?

    – Suban Dhyako
    Jan 3 at 8:04











  • Did you installed node.js in your system? Do npm -v shows npm version? If it is not showing the version then you must add the nodejs path in the system variable

    – Suban Dhyako
    Jan 4 at 4:33













  • Shows 6.4.1 version.

    – nicholas
    Jan 4 at 8:01














4












4








4


1






I tried to start the appium server programmatically but encounter error. How to resolve this issues? I have nodejs installed and appium installed and environemnt variable set properly. I"m using maven appium java client 6.1.0 and selenium 3.14.0. Please help. A billion thanks for your help.



Code:



try {
File appDir = new File(System.getProperty("user.dir"));
File app = new File(appDir, "..\apk\Flipkart.apk");

// apk Capabilities
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("deviceName", "Sony Xperia Z2");
caps.setCapability("BROWSER_NAME", "Android");
caps.setCapability("platformVersion", "6.0");
caps.setCapability(MobileCapabilityType.PLATFORM_NAME, Platform.ANDROID);
//caps.setCapability("udid", "WUJ01N4RQ3"); // DeviceId from "adb devices" command
caps.setCapability("platformName", "Android");
caps.setCapability("app", app.getAbsolutePath());
caps.setCapability("appPackage", "com.flipkart.android");
caps.setCapability("appActivity","com.flipkart.android.SplashActivity");

// Appium Capabilities
caps.setCapability("skipUnlock","true");
caps.setCapability("noReset","false");

appiumBuilder = new AppiumServiceBuilder();
appiumBuilder.withIPAddress("127.0.0.1");
appiumBuilder.usingPort(47233);
appiumBuilder.withCapabilities(caps);
appiumBuilder.withStartUpTimeOut(3, TimeUnit.MINUTES);
appiumBuilder.withLogFile(new File(System.getProperty("user.dir") + "\log\appium.log"));
appiumBuilder.withArgument(GeneralServerFlag.SESSION_OVERRIDE);
appiumBuilder.withArgument(GeneralServerFlag.LOG_LEVEL, "DEBUG");
appiumBuilder.withArgument(GeneralServerFlag.ASYNC_TRACE, "true");

appiumServer = AppiumDriverLocalService.buildService(appiumBuilder);
appiumServer.start();
//new URL("http://127.0.0.1:47233/wd/hub")
driver = new AndroidDriver<MobileElement>(appiumServer, caps);
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);

} catch (Exception ex) {
LogManager.logger.log(Level.INFO, "Exception: " + ex.getMessage());
}


Error Log:




INFO: Exception: Invalid server instance exception has occured: There
is no installed nodes! Please install node via NPM
(https://www.npmjs.com/package/appium#using-node-js) or download and
install Appium app (http://appium.io/downloads.html) Jan 03, 2019
3:52:12 PM com.peterwkc.testManager.AndroidManager tearDown INFO:
Exception: null




EDIT:
I believe appium source code cannot detect my installation of nodejs and appium.










share|improve this question
















I tried to start the appium server programmatically but encounter error. How to resolve this issues? I have nodejs installed and appium installed and environemnt variable set properly. I"m using maven appium java client 6.1.0 and selenium 3.14.0. Please help. A billion thanks for your help.



Code:



try {
File appDir = new File(System.getProperty("user.dir"));
File app = new File(appDir, "..\apk\Flipkart.apk");

// apk Capabilities
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("deviceName", "Sony Xperia Z2");
caps.setCapability("BROWSER_NAME", "Android");
caps.setCapability("platformVersion", "6.0");
caps.setCapability(MobileCapabilityType.PLATFORM_NAME, Platform.ANDROID);
//caps.setCapability("udid", "WUJ01N4RQ3"); // DeviceId from "adb devices" command
caps.setCapability("platformName", "Android");
caps.setCapability("app", app.getAbsolutePath());
caps.setCapability("appPackage", "com.flipkart.android");
caps.setCapability("appActivity","com.flipkart.android.SplashActivity");

// Appium Capabilities
caps.setCapability("skipUnlock","true");
caps.setCapability("noReset","false");

appiumBuilder = new AppiumServiceBuilder();
appiumBuilder.withIPAddress("127.0.0.1");
appiumBuilder.usingPort(47233);
appiumBuilder.withCapabilities(caps);
appiumBuilder.withStartUpTimeOut(3, TimeUnit.MINUTES);
appiumBuilder.withLogFile(new File(System.getProperty("user.dir") + "\log\appium.log"));
appiumBuilder.withArgument(GeneralServerFlag.SESSION_OVERRIDE);
appiumBuilder.withArgument(GeneralServerFlag.LOG_LEVEL, "DEBUG");
appiumBuilder.withArgument(GeneralServerFlag.ASYNC_TRACE, "true");

appiumServer = AppiumDriverLocalService.buildService(appiumBuilder);
appiumServer.start();
//new URL("http://127.0.0.1:47233/wd/hub")
driver = new AndroidDriver<MobileElement>(appiumServer, caps);
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);

} catch (Exception ex) {
LogManager.logger.log(Level.INFO, "Exception: " + ex.getMessage());
}


Error Log:




INFO: Exception: Invalid server instance exception has occured: There
is no installed nodes! Please install node via NPM
(https://www.npmjs.com/package/appium#using-node-js) or download and
install Appium app (http://appium.io/downloads.html) Jan 03, 2019
3:52:12 PM com.peterwkc.testManager.AndroidManager tearDown INFO:
Exception: null




EDIT:
I believe appium source code cannot detect my installation of nodejs and appium.







java appium






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 4 at 3:48









Krishnan Mahadevan

8,97831644




8,97831644










asked Jan 3 at 7:03









nicholasnicholas

45574177




45574177













  • Have you installed appium server in your system? you must install appium server manually.

    – Suban Dhyako
    Jan 3 at 8:00











  • Installed already lol

    – nicholas
    Jan 3 at 8:03











  • can you post your error log?

    – Suban Dhyako
    Jan 3 at 8:04











  • Did you installed node.js in your system? Do npm -v shows npm version? If it is not showing the version then you must add the nodejs path in the system variable

    – Suban Dhyako
    Jan 4 at 4:33













  • Shows 6.4.1 version.

    – nicholas
    Jan 4 at 8:01



















  • Have you installed appium server in your system? you must install appium server manually.

    – Suban Dhyako
    Jan 3 at 8:00











  • Installed already lol

    – nicholas
    Jan 3 at 8:03











  • can you post your error log?

    – Suban Dhyako
    Jan 3 at 8:04











  • Did you installed node.js in your system? Do npm -v shows npm version? If it is not showing the version then you must add the nodejs path in the system variable

    – Suban Dhyako
    Jan 4 at 4:33













  • Shows 6.4.1 version.

    – nicholas
    Jan 4 at 8:01

















Have you installed appium server in your system? you must install appium server manually.

– Suban Dhyako
Jan 3 at 8:00





Have you installed appium server in your system? you must install appium server manually.

– Suban Dhyako
Jan 3 at 8:00













Installed already lol

– nicholas
Jan 3 at 8:03





Installed already lol

– nicholas
Jan 3 at 8:03













can you post your error log?

– Suban Dhyako
Jan 3 at 8:04





can you post your error log?

– Suban Dhyako
Jan 3 at 8:04













Did you installed node.js in your system? Do npm -v shows npm version? If it is not showing the version then you must add the nodejs path in the system variable

– Suban Dhyako
Jan 4 at 4:33







Did you installed node.js in your system? Do npm -v shows npm version? If it is not showing the version then you must add the nodejs path in the system variable

– Suban Dhyako
Jan 4 at 4:33















Shows 6.4.1 version.

– nicholas
Jan 4 at 8:01





Shows 6.4.1 version.

– nicholas
Jan 4 at 8:01












2 Answers
2






active

oldest

votes


















0














I faced the same issue at my end




  1. Try to run the node server instance from command line, just type "node" and enter -- server should get started

  2. Open another terminal window and just check if all details are been going good for the process running by doing "ps eww"

  3. The node process running should be displayed here

  4. Just kill the "node server", by typing "Killall node" on the same command window you did "ps eww"

  5. The "node"window will show the process terminated.


Time for the truth, run your script and all should get going smoothly



I did this with
appium - 1.9.0
node - 11.9.0
npm version - 6.5.0
testscript - Java
tool - Eclipse
platform - iOS (10.14)






share|improve this answer































    0














    Try installing Appium globally. This resolved the issue for me.



    npm install -g appium






    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54017732%2fappium-exception-invalid-server-instance-exception-has-occured-there-is-no-in%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      I faced the same issue at my end




      1. Try to run the node server instance from command line, just type "node" and enter -- server should get started

      2. Open another terminal window and just check if all details are been going good for the process running by doing "ps eww"

      3. The node process running should be displayed here

      4. Just kill the "node server", by typing "Killall node" on the same command window you did "ps eww"

      5. The "node"window will show the process terminated.


      Time for the truth, run your script and all should get going smoothly



      I did this with
      appium - 1.9.0
      node - 11.9.0
      npm version - 6.5.0
      testscript - Java
      tool - Eclipse
      platform - iOS (10.14)






      share|improve this answer




























        0














        I faced the same issue at my end




        1. Try to run the node server instance from command line, just type "node" and enter -- server should get started

        2. Open another terminal window and just check if all details are been going good for the process running by doing "ps eww"

        3. The node process running should be displayed here

        4. Just kill the "node server", by typing "Killall node" on the same command window you did "ps eww"

        5. The "node"window will show the process terminated.


        Time for the truth, run your script and all should get going smoothly



        I did this with
        appium - 1.9.0
        node - 11.9.0
        npm version - 6.5.0
        testscript - Java
        tool - Eclipse
        platform - iOS (10.14)






        share|improve this answer


























          0












          0








          0







          I faced the same issue at my end




          1. Try to run the node server instance from command line, just type "node" and enter -- server should get started

          2. Open another terminal window and just check if all details are been going good for the process running by doing "ps eww"

          3. The node process running should be displayed here

          4. Just kill the "node server", by typing "Killall node" on the same command window you did "ps eww"

          5. The "node"window will show the process terminated.


          Time for the truth, run your script and all should get going smoothly



          I did this with
          appium - 1.9.0
          node - 11.9.0
          npm version - 6.5.0
          testscript - Java
          tool - Eclipse
          platform - iOS (10.14)






          share|improve this answer













          I faced the same issue at my end




          1. Try to run the node server instance from command line, just type "node" and enter -- server should get started

          2. Open another terminal window and just check if all details are been going good for the process running by doing "ps eww"

          3. The node process running should be displayed here

          4. Just kill the "node server", by typing "Killall node" on the same command window you did "ps eww"

          5. The "node"window will show the process terminated.


          Time for the truth, run your script and all should get going smoothly



          I did this with
          appium - 1.9.0
          node - 11.9.0
          npm version - 6.5.0
          testscript - Java
          tool - Eclipse
          platform - iOS (10.14)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 2 at 21:52









          Vinod Singh BistVinod Singh Bist

          816




          816

























              0














              Try installing Appium globally. This resolved the issue for me.



              npm install -g appium






              share|improve this answer




























                0














                Try installing Appium globally. This resolved the issue for me.



                npm install -g appium






                share|improve this answer


























                  0












                  0








                  0







                  Try installing Appium globally. This resolved the issue for me.



                  npm install -g appium






                  share|improve this answer













                  Try installing Appium globally. This resolved the issue for me.



                  npm install -g appium







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 18 at 12:17









                  Appu MistriAppu Mistri

                  115113




                  115113






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54017732%2fappium-exception-invalid-server-instance-exception-has-occured-there-is-no-in%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Angular Downloading a file using contenturl with Basic Authentication

                      Olmecas

                      Can't read property showImagePicker of undefined in react native iOS