You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
io.appium.java_client.service.local.AppiumServerHasNotBeenStartedLocallyException: The local appium server has not been started. The given Node.js executable: /usr/local/bin/node Arguments: [/usr/local/lib/node_modules/appium/build/lib/main.js #1504
HI, Im facing this issue of starting appium server programatically. I have gone through many other github threads about this same issue but to no luck.
Environment
Appium version: 1.21.0 (latest)
Node: v12.19.0
Details
I am calling the service on rest template. I tried many ways of starting an appium server programmatically but non worked. Please help
Code To Reproduce Issue
public class AppiumServer {
private static AppiumDriverLocalService server;
private int port;
public AppiumServer() {
server = buildAppiumServer();
}
private AppiumDriverLocalService buildAppiumServer() {
return new AppiumServiceBuilder().usingAnyFreePort()
.withIPAddress( "127.0.0.1" )
.withArgument( GeneralServerFlag.LOG_LEVEL, "error" )
.withArgument( GeneralServerFlag.SESSION_OVERRIDE )
.build();
}
public void start(){
this.server.start();
}
public void stop() {
this.server.stop();
}
public AppiumDriverLocalService get(){
return this.server;
}
}
Exception Stacktraces
Caused by: io.appium.java_client.service.local.AppiumServerHasNotBeenStartedLocallyException: The local appium server has not been started. The given Node.js executable: /usr/local/bin/node Arguments: [/usr/local/lib/node_modules/appium/build/lib/main.js, --port, 3784, --address, 127.0.0.1, --log-level, error, --session-override]