Skip to content

[πŸ› Bug]: No proper error message misleading the user to analyzeΒ #16388

@GaneshGunaki

Description

@GaneshGunaki

Description

Error : Session is not created : Possible cause invalid address of the remote server or browser start up failed
Please refer the appium java client issue and inturn it uses selenium client
https://github.com/appium/java-client/issues/2349

[ The problem is here.
when we are using Desired capabilities as option on Appium 3.0 server, it throws generic error session not created
as we know - Desired capabilities option is depreacted on 3.0
Expected : Its should throw Deprecated or unsupported desired capabilities or compile time error ]

JAVA Version - 11/17/23

Appium server - 3.0.2
Appium client - 10.0.0
Selenium-java - 4.35.0
IOS - XCUI test driver - 10.1.2
Testng- 7.5.1
Server URL : http://127.0.0.1:4723/
Even cross check with compatible matrix appium client & Selenium , Didnt helped me

Reproducible Code

// This sample code supports Appium Java client >=9
import org.testng.annotations.Test;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.ios.options.XCUITestOptions;

import java.net.MalformedURLException;
import java.net.URL;

import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
public class NewTest2 {

	IOSDriver driver; 

	@BeforeClass
	public void setUp() {
		DesiredCapabilities capabilities = new DesiredCapabilities();
		capabilities.setCapability("platformName", "iOS");
		capabilities.setCapability("acceptAlerts", true);
		capabilities.setCapability("trust", true);
		capabilities.setCapability("launchTimeout", 600000);
		capabilities.setCapability("newCommandTimeout", 600);
		capabilities.setCapability("automationName", "XCUITest");
	    capabilities.setCapability("app", "/Users/ga20055252/Downloads/uat-Runner.app");
		capabilities.setCapability("udid", "CB53FD24-EE7B-4EA8-BE4A-C3D88FA1AC1A");
		capabilities.setCapability("noReset", true);
		capabilities.setCapability("bundleId", "com.mgmresorts.enterprise.uat");
		capabilities.setCapability("wdaLaunchTimeout", 60000);
		capabilities.setCapability("autoDismissAlerts", true);
		capabilities.setCapability("fullReset", false);

		try {
			URL appiumServerUrl = new URL("http://127.0.0.1:4723/wd/hub");
			driver = new IOSDriver(appiumServerUrl, capabilities);
		} catch (MalformedURLException e) {	e.printStackTrace();}}

	@Test
	public void sampleTest() {
		try {Thread.sleep(3000);} catch (InterruptedException e) {e.printStackTrace();}
	}

	@AfterClass
	public void tearDown() {
		driver.quit();
	}
}

Debugging Logs

Session is not created | No logs at all

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!I-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions