# I can't start a new session in Appium

**URL:** <https://discuss.appium.io/t/i-cant-start-a-new-session-in-appium/42118>\
**Category:** Issues/Bugs\
**Created:** [March 29, 2024, 10:53pm UTC](https://discuss.appium.io/t/i-cant-start-a-new-session-in-appium/42118 "2024-03-29T22:53:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike14G](https://discuss.appium.io/user_avatar/discuss.appium.io/mike14g/32/12813_2.png) [@Mike14G](https://discuss.appium.io/u/Mike14G)\
**Post date:** [March 29, 2024, 10:53pm UTC](https://discuss.appium.io/t/i-cant-start-a-new-session-in-appium/42118/1 "2024-03-29T22:53:58Z")

</div>

Hello.

I’m doing an automation with appium and java, however out of nowhere, when running from eclipse, it sends me a message that it cannot connect to Appium (Could not start a new session. The possible causes are the invalid address of the control remote Failed to start server or browser.  
Host information: host:‘hostname’, ip:‘127.0.0.1’). I have tried other projects I had, but none of them can get the server up and log in.

However, when performing an emulation with Appium inspector it connects without problem and the server starts up.

Have you had anything similar and if so, how have you managed to solve it?

This is my code:

public void ConfigApp() throws MalformedURLException, URISyntaxException {

//para abir Appium al ejecutar el script  
service = new AppiumServiceBuilder()  
.withAppiumJS(new File(“\AppData\Roaming\npm\node\_modules\appium\build\lib\main.js”))  
.withIPAddress(“[127.0.0.1](https://127.0.0.1/)”)  
.usingPort(4723)  
.build();

//Iniciar server appium  
service.start();

UiAutomator2Options options = new UiAutomator2Options();

options.setDeviceName(“Pixel6Pro”);  
options.setApp(“\Android\src\test\java\resources\app-10.apk”);

//establecer la conexión con server appium  
driver = new AndroidDriver(new URI(“[http://127.0.0.1:4723](http://127.0.0.1:4723/)”).toURL(), options);

driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(50));  
}

Thank you very much in advance

---

<div class="post-metadata">

**Author:** ![wreed](https://discuss.appium.io/letter_avatar_proxy/v4/letter/w/919ad9/32.png) [@wreed](https://discuss.appium.io/u/wreed)\
**Post date:** [March 30, 2024, 6:52pm UTC](https://discuss.appium.io/t/i-cant-start-a-new-session-in-appium/42118/2 "2024-03-30T18:52:40Z")

</div>

What version of Appium Java client are you using?

---

<div class="post-metadata">

**Author:** ![Jordi](https://discuss.appium.io/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@Jordi](https://discuss.appium.io/u/Jordi)\
**Post date:** [April 3, 2024, 5:08pm UTC](https://discuss.appium.io/t/i-cant-start-a-new-session-in-appium/42118/3 "2024-04-03T17:08:27Z")

</div>

Upgrade appium java-client. updating to 9.2.2 worked for me

> [@org.openqa.selenium.WebDriverException: java.lang.NoSuchMethodException: org.openqa.selenium.remote.ProtocolHandshake.createSession(org.openqa.selenium.remote.http.HttpHandler,java.util.function.Supplier,long)](https://discuss.appium.io/t/org-openqa-selenium-webdriverexception-java-lang-nosuchmethodexception-org-openqa-selenium-remote-protocolhandshake-createsession-org-openqa-selenium-remote-http-httphandler-java-util-function-supplier-long/42099/6):
>
> Update to v. 9.2.2 Always check [the compatibility matrix](https://github.com/appium/java-client?tab=readme-ov-file#compatibility-matrix) to see if the current java client version is compatible to the selenium one

---

<div class="post-metadata">

**Author:** ![Mike14G](https://discuss.appium.io/user_avatar/discuss.appium.io/mike14g/32/12813_2.png) [@Mike14G](https://discuss.appium.io/u/Mike14G)\
**Post date:** [April 9, 2024, 10:23pm UTC](https://discuss.appium.io/t/i-cant-start-a-new-session-in-appium/42118/4 "2024-04-09T22:23:41Z")

</div>

Thank you. Yes, it was exactly the solution and it works without problem again. 💯
