Skip to content

Unable to start Appium server 1.6 programmatically using AppiumDriverLocalService #499

@shynkevich-alex

Description

@shynkevich-alex

Description

I've installed node via brew then installed Appium 1.6 using NPM and tried running it with AppiumDriverLocalService.
I wasn't able to run Appium server on one of PC.

Environment

Node version 7.0.0
Appium version 1.6.0

Details

It happens on one machine another works well.
I checked paths of main.js/appium.js etc. and they are the same on both PCs.

Code To Reproduce Issue

private AppiumDriverLocalService service;
private String serverAddress = "0.0.0.0";

DesiredCapabilities serverCapabilities = new DesiredCapabilities();
AppiumServiceBuilder builder = new AppiumServiceBuilder().withCapabilities(serverCapabilities);
builder.usingAnyFreePort();
builder.withIPAddress(serverAddress);
builder.withArgument(GeneralServerFlag.SESSION_OVERRIDE);
builder.withArgument(GeneralServerFlag.LOG_LEVEL, "warn");

service = builder.build();
service.start();

Ecxeption stacktraces

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)
Buildiat io.appium.java_client.service.local.AppiumServiceBuilder.findNodeInCurrentFileSystem(AppiumServiceBuilder.java:160)
at io.appium.java_client.service.local.AppiumServiceBuilder.checkAppiumJS(AppiumServiceBuilder.java:305)
at io.appium.java_client.service.local.AppiumServiceBuilder.createArgs(AppiumServiceBuilder.java:386)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:299)
at com.***.appium.helper.DriverManager.createAppiumDriver(DriverManager.java:49)
at com.autotest.runners.BaseRunner.setUp(BaseRunner.java:77)
at com.autotest.runners.advert.AdvertRunner.setUp(AdvertRunner.java:22)
at com.autotest.runners.advert.BannerRunner.setUp(BannerRunner.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:100)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:515)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:216)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:143)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:169)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:753)
at org.testng.TestRunner.run(TestRunner.java:607)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:368)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:363)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:321)
at org.testng.SuiteRunner.run(SuiteRunner.java:270)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1284)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1209)
at org.testng.TestNG.runSuites(TestNG.java:1124)
at org.testng.TestNG.run(TestNG.java:1096)
at com.autotest.Launcher.main(Launcher.java:72)
Caused by: java.io.IOException: /usr/local/lib/node_modules
/var/folders/wk/w9dbkg0x7gbdbcmr2c9pfwnw0000gn/T/get_path_to_default_node5052055597677988693.sh: line 4: shell_session_update: command not found

at io.appium.java_client.service.local.AppiumServiceBuilder.findNodeInCurrentFileSystem(AppiumServiceBuilder.java:161)
... 30 more

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions