'org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: null

I am trying to run my automation test using serenity BDD and I am using the 3.2.0 version but while running the test getting the below issue if I ran my test using the below group.

implementation group: 'net.serenity-bdd', name: 'serenity-core', version: '3.2.0'

But if I change it to testRuntimeOnly then it's working fine

 testRuntimeOnly("net.serenity-bdd:serenity-core:3.2.0")

I want to run my test using the implementation group only so that transitive dependencies are available in both compile and run time. Is there any way to resolve this issue?

Error:

Build info: version: '4.0.0', revision: '3a21814679'
System info: host: 'UKC-DSEV023991', ip: '110.4.197.09', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_281'
Driver info: io.appium.java_client.ios.IOSDriver
Command: [null, newSession {capabilities=[{appium:accessKey=546456gfgdfgk, appium:app=cloud:com.experitest.ExperiBank, appium:bundleId=com.experitest.ExperiBank, appium:deviceName= IPad (5th Generation) SPEC-0002, appium:deviceQuery=@os='ios' and @category='TABLET', platformName=iOS, appium:platformVersion=8.1, appium:testName=Quick Start iOS Native Demo}], desiredCapabilities=Capabilities {accessKey: eyJ4cC51IjoxMywieHAucCI6MSw..., app: cloud:com.experitest.Experi..., bundleId: com.experitest.ExperiBank, deviceName:  IPad (5th Generation) SPEC..., deviceQuery: @os='ios' and @category='TA..., platformName: iOS, platformVersion: 8.1, testName: Quick Start iOS Native Demo}}]
Capabilities {}

Code:

protected IOSDriver driver = null;
DesiredCapabilities dc = new DesiredCapabilities();

@BeforeEach
public void setUp()  {

    dc.setCapability("testName", "Quick Start iOS Native Demo");
    dc.setCapability("accessKey", accessKey);
    dc.setCapability("deviceQuery", "@os='ios' and @category='TABLET'");

    dc.setCapability(MobileCapabilityType.APP, "cloud:com.experitest.ExperiBank");
    dc.setCapability(IOSMobileCapabilityType.BUNDLE_ID, "com.experitest.ExperiBank");



    try {
        driver = new IOSDriver(new URL("https://specsavers.experitest.com/wd/hub"), dc);
   
    } catch (MalformedURLException e) {
        e.printStackTrace();
    }
}

@Test
public void quickStartiOSNativeDemo() {
    driver.rotate(ScreenOrientation.PORTRAIT);
    driver.findElement(By.xpath("//*[@id='usernameTextField']")).sendKeys("company");
    driver.hideKeyboard();
    driver.findElement(By.xpath("//*[@id='passwordTextField']")).sendKeys("company");
    driver.findElement(By.xpath("//*[@id='loginButton']")).click();
    driver.findElement(By.xpath("//*[@id='makePaymentButton']")).click();
    driver.findElement(By.xpath("//*[@id='phoneTextField']")).sendKeys("0541234567");
    driver.findElement(By.xpath("//*[@id='nameTextField']")).sendKeys("Jon Snow");
    driver.findElement(By.xpath("//*[@id='amountTextField']")).sendKeys("50");
    driver.findElement(By.xpath("//*[@id='countryButton']")).click();
    driver.findElement(By.xpath("//*[@id='Switzerland']")).click();
    driver.findElement(By.xpath("//*[@id='sendPaymentButton']")).click();
    driver.findElement(By.xpath("//*[@id='Yes']")).click();
}

@AfterEach
public void tearDown() {
    System.out.println("Report URL: "+ driver.getCapabilities().getCapability("reportUrl"));
    driver.quit();
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source