appium / appium/java-client

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure

Open
#2,144 26 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.3k
Forks
752
Avg merge
6d 21h
Merged PRs (30d)
8

Description

Do I have the most recent component updates?
  • I use the most recent available driver/plugin and server versions
Is the component officially supported by the Appium team?
  • I have verified the component repository is present under the Appium organization in GitHub
Is there an existing issue for this?
  • I have searched the existing issues
Current Behavior

when i am trying to run my appium code
getting below error

FAILED CONFIGURATION: @BeforeClass UAApp.BaseComponent.AndroidBaseTest.configureAppium
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

Yesterday it is working fine.

Expected Behavior

it should start execution.

Minimal Reproducible Example

@Test
public void startTest(){
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("deviceName", "oneplus7");
caps.setCapability("platformVersion", "12");
caps.setCapability("ignoreHiddenApiPolicyError" , true);
caps.setCapability("app", System.getProperty("user.dir") + "/src/test/java/resources/UA_QA_APP.apk");
caps.setCapability("automationName", "UiAutomator2");
driver = new AndroidDriver(new URI("http://127.0.0.1:4723").toURL(), caps);
}

Environment
  • Operating system: Windows 11
  • Appium server version (output of appium --version):2.5.1
  • Appium driver(s) and their version(s):
  • Appium plugin(s) and their version(s):
  • Node.js version (output of node --version):
  • npm version (output of npm --version):
  • Last component(s) version which did not exhibit the problem:
  • Platform and version under test:
  • Real device or emulator/simulator:
Link to Appium Logs

No response

Further Information

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the @BeforeClass failure from the provided startTest example with Appium server 2.5.1 on Windows 11, then collect the missing Appium, driver, Node.js, npm, and device details. Check the Appium server logs and determine whether the session reaches the AndroidDriver; done means identifying a specific startup cause and a reproducible fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.