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
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 752
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 8
Description
Description
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]
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the AppiumServer class, especially AppiumServiceBuilder and server.start(), then inspect the exception's Node.js executable and arguments. Reproduce the local service startup with the reported Appium 1.21.0 and Node v12.19.0 environment; done means the service starts successfully and no AppiumServerHasNotBeenStartedLocallyException is raised.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, node.js
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100