appium / appium/java-client

Not able to create a new session getting error org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Host info: host: 'DESKTOP-0OFTRJ2', ip: '172.15.15.9'

Open
#1,855 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is there an existing issue for this?
  • I have searched the existing issues
Current Behavior

In my system the appium is working fine on only one project but if I create a new project it is not working as the capabilities are same that i am passing but it always gives the error as

### org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: 'DESKTOP-0OFTRJ2', ip: '172.15.15.9'

Facing the same issue with all laptops in my company

Expected Behavior

it should work on any new project that i am creating in my system.

Minimal Reproducible Example
package AnCrypto;

import io.appium.java_client.AppiumDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.Test;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;

public class BaseClass {
    public static AppiumDriver driver;
    public static DesiredCapabilities cap;

//    @Test
    public void openApp() throws MalformedURLException, InterruptedException {
        BaseClass bc = new BaseClass();
        cap = new DesiredCapabilities();
        cap.setCapability("automationName", "Appium");
//        cap.setCapability("automationName", "Appium");
        cap.setCapability("VERSION", "12.0");
        cap.setCapability("deviceName", "realme RMX3381");//moto e(7) plus  Android SDK built for x86 N7I7UCAUOZ5T499P
        cap.setCapability("platformName", "Android");
        cap.setCapability("adbExecTimeout", "80000");
        cap.setCapability("appPackage", "com.ancryptoWallet");
        cap.setCapability("appActivity", "com.ancrypto.MainActivity");
//        cap.setCapability("appPackage","com.evoeurope");
//        cap.setCapability("appActivity","com.coincult.MainActivity");
        cap.setCapability("autoGrantPermissions", "true");
        cap.setCapability("autoAcceptAlerts", "true");

        driver = new AppiumDriver(new URL("http://localhost:4723/wd/hub"), cap);
        driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
        Thread.sleep(2000);
        System.out.println("application started");
        // END OF CODE
    }
}
Environment

Device name Shiva-ATR632
Processor 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz 2.42 GHz
Installed RAM 16.0 GB (15.8 GB usable)
Device ID DD96A306-2616-4F79-853C-12772B5CF389
Product ID 00356-24525-50323-AAOEM
System type 64-bit operating system, x64-based processor
Pen and touch Pen support

Link to Appium Logs

No response

Futher 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 with the Java reproduction in the issue, especially the AppiumDriver URL and supplied capabilities, and compare it with the project setup where the session works. Reproduce the failure while collecting Appium logs, then identify a specific client or capability change and verify that a new project can create the Android session successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile, testing-qa
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.