{"action":"created","issue":{"url":"https://api.github.com/repos/appium/java-client/issues/499","repository_url":"https://api.github.com/repos/appium/java-client","labels_url":"https://api.github.com/repos/appium/java-client/issues/499/labels{/name}","comments_url":"https://api.github.com/repos/appium/java-client/issues/499/comments","events_url":"https://api.github.com/repos/appium/java-client/issues/499/events","html_url":"https://github.com/appium/java-client/issues/499","id":185901419,"number":499,"title":"Unable to start Appium server 1.6 programmatically using AppiumDriverLocalService","user":{"login":"shynkevich-alex","id":17390759,"avatar_url":"https://avatars.githubusercontent.com/u/17390759?v=3","gravatar_id":"","url":"https://api.github.com/users/shynkevich-alex","html_url":"https://github.com/shynkevich-alex","followers_url":"https://api.github.com/users/shynkevich-alex/followers","following_url":"https://api.github.com/users/shynkevich-alex/following{/other_user}","gists_url":"https://api.github.com/users/shynkevich-alex/gists{/gist_id}","starred_url":"https://api.github.com/users/shynkevich-alex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shynkevich-alex/subscriptions","organizations_url":"https://api.github.com/users/shynkevich-alex/orgs","repos_url":"https://api.github.com/users/shynkevich-alex/repos","events_url":"https://api.github.com/users/shynkevich-alex/events{/privacy}","received_events_url":"https://api.github.com/users/shynkevich-alex/received_events","type":"User","site_admin":false},"labels":[{"id":267794774,"url":"https://api.github.com/repos/appium/java-client/labels/Needs%20investigation","name":"Needs investigation","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-28T11:34:52Z","updated_at":"2016-10-28T12:32:14Z","closed_at":null,"body":"## Description\r\nI've installed node via brew then installed Appium 1.6 using NPM and tried running it with AppiumDriverLocalService.\r\nI wasn't able to run Appium server on one of PC.\r\n\r\n## Environment\r\nNode version 7.0.0\r\nAppium version 1.6.0\r\n\r\n\r\n## Details\r\nIt happens on one machine another works well.\r\nI checked paths of main.js/appium.js etc. and they are the same on both PCs.\r\n\r\n## Code To Reproduce Issue\r\n```\r\nprivate AppiumDriverLocalService service;\r\nprivate String serverAddress = \"0.0.0.0\";\r\n\r\nDesiredCapabilities serverCapabilities = new DesiredCapabilities();\r\nAppiumServiceBuilder builder = new AppiumServiceBuilder().withCapabilities(serverCapabilities);\r\nbuilder.usingAnyFreePort();\r\nbuilder.withIPAddress(serverAddress);\r\nbuilder.withArgument(GeneralServerFlag.SESSION_OVERRIDE);\r\nbuilder.withArgument(GeneralServerFlag.LOG_LEVEL, \"warn\");\r\n\r\nservice = builder.build();\r\nservice.start();\r\n```\r\n## Ecxeption stacktraces\r\n  \r\n\r\n> io.appium.java_client.service.local.InvalidServerInstanceException: 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)\r\n> Buildiat io.appium.java_client.service.local.AppiumServiceBuilder.findNodeInCurrentFileSystem(AppiumServiceBuilder.java:160)\r\n\tat io.appium.java_client.service.local.AppiumServiceBuilder.checkAppiumJS(AppiumServiceBuilder.java:305)\r\n\tat io.appium.java_client.service.local.AppiumServiceBuilder.createArgs(AppiumServiceBuilder.java:386)\r\n\tat org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:299)\r\n\tat com.***.appium.helper.DriverManager.createAppiumDriver(DriverManager.java:49)\r\n\tat com.autotest.runners.BaseRunner.setUp(BaseRunner.java:77)\r\n\tat com.autotest.runners.advert.AdvertRunner.setUp(AdvertRunner.java:22)\r\n\tat com.autotest.runners.advert.BannerRunner.setUp(BannerRunner.java:22)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:100)\r\n\tat org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:515)\r\n\tat org.testng.internal.Invoker.invokeConfigurations(Invoker.java:216)\r\n\tat org.testng.internal.Invoker.invokeConfigurations(Invoker.java:143)\r\n\tat org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:169)\r\n\tat org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)\r\n\tat org.testng.TestRunner.privateRun(TestRunner.java:753)\r\n\tat org.testng.TestRunner.run(TestRunner.java:607)\r\n\tat org.testng.SuiteRunner.runTest(SuiteRunner.java:368)\r\n\tat org.testng.SuiteRunner.runSequentially(SuiteRunner.java:363)\r\n\tat org.testng.SuiteRunner.privateRun(SuiteRunner.java:321)\r\n\tat org.testng.SuiteRunner.run(SuiteRunner.java:270)\r\n\tat org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)\r\n\tat org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)\r\n\tat org.testng.TestNG.runSuitesSequentially(TestNG.java:1284)\r\n\tat org.testng.TestNG.runSuitesLocally(TestNG.java:1209)\r\n\tat org.testng.TestNG.runSuites(TestNG.java:1124)\r\n\tat org.testng.TestNG.run(TestNG.java:1096)\r\n\tat com.autotest.Launcher.main(Launcher.java:72)\r\nCaused by: java.io.IOException: /usr/local/lib/node_modules\r\n/var/folders/wk/w9dbkg0x7gbdbcmr2c9pfwnw0000gn/T/get_path_to_default_node5052055597677988693.sh: line 4: shell_session_update: command not found\r\n\r\n\tat io.appium.java_client.service.local.AppiumServiceBuilder.findNodeInCurrentFileSystem(AppiumServiceBuilder.java:161)\r\n\t... 30 more"},"comment":{"url":"https://api.github.com/repos/appium/java-client/issues/comments/256908683","html_url":"https://github.com/appium/java-client/issues/499#issuecomment-256908683","issue_url":"https://api.github.com/repos/appium/java-client/issues/499","id":256908683,"user":{"login":"SrinivasanTarget","id":8896549,"avatar_url":"https://avatars.githubusercontent.com/u/8896549?v=3","gravatar_id":"","url":"https://api.github.com/users/SrinivasanTarget","html_url":"https://github.com/SrinivasanTarget","followers_url":"https://api.github.com/users/SrinivasanTarget/followers","following_url":"https://api.github.com/users/SrinivasanTarget/following{/other_user}","gists_url":"https://api.github.com/users/SrinivasanTarget/gists{/gist_id}","starred_url":"https://api.github.com/users/SrinivasanTarget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SrinivasanTarget/subscriptions","organizations_url":"https://api.github.com/users/SrinivasanTarget/orgs","repos_url":"https://api.github.com/users/SrinivasanTarget/repos","events_url":"https://api.github.com/users/SrinivasanTarget/events{/privacy}","received_events_url":"https://api.github.com/users/SrinivasanTarget/received_events","type":"User","site_admin":false},"created_at":"2016-10-28T12:32:14Z","updated_at":"2016-10-28T12:32:14Z","body":"@shynkevich-alex Please try setting up the main.js path as well and update us,\r\n\r\n```\r\nAppiumServiceBuilder builder = new AppiumServiceBuilder()\r\n                .withAppiumJS(new File(\"/usr/local/lib/node_modules/appium/build/lib/main.js\"))\r\n                .withArgument(GeneralServerFlag.APP,  path of your app );\r\n        appiumDriverLocalService = builder.build();\r\n        appiumDriverLocalService.start();\r\n```\r\n\r\nAlso were you able to run the server manually?"}}
{"actor":{"display_login":"SrinivasanTarget"}}