sagar pcn
sagar pcn

Reputation: 1

Appium | ios | getting org.openqa.selenium.NoSuchSessionException with bdd framework for appium

/* i am trying to launch bdd scenario with appium using java , everything was running smooth but since last 4 days we are getting " org.openqa.selenium.NoSuchSessionException: A session is either terminated or not started, " issue, and app is not picking up the steps, please help java v: 11 appium : 2.12.1 xcuitest: @7.31.0

capabilities:

. public static WebDriver driver = null;

private static ThreadLocal<RemoteWebDriver> driverThreadLocal = new ThreadLocal<>();

  desiredCapabilities.setCapability("deviceName", deviceName);
        desiredCapabilities.setCapability("platformVersion", osVersion);
        desiredCapabilities.setCapability("automationName", "XCUITest");
        desiredCapabilities.setCapability("platformType", iOSPlatformType);
        desiredCapabilities.setCapability("udid", iOSDeviceID);
        desiredCapabilities.setCapability("app", "--------hidden");
        desiredCapabilities.setCapability("xcodeOrgId", "------");
        desiredCapabilities.setCapability("autoAcceptAlerts", true);
        desiredCapabilities.setCapability("noReset", true);
        desiredCapabilities.setCapability("useNewWDA", false);
        desiredCapabilities.setCapability("fullReset", false);
        desiredCapabilities.setCapability("showIOSLog",false);
        desiredCapabilities.setCapability("wdaLocalPort",WdaPort);
        desiredCapabilities.setCapability("newCommandTimeout", 600);

        driverThreadLocal.set(new IOSDriver(remoteUrl, desiredCapabilities));``

error:

Given User launches the app for login as "registered" # MobileStepDefinition.Login.userLaunchesTheAppForLoginAs(java.lang.String) org.openqa.selenium.NoSuchSessionException: A session is either terminated or not started Build info: version: '4.26.0', revision: '8ccf0219d7' System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '14.7.1', java.version: '21.0.2' Driver info: io.appium.java_client.ios.IOSDriver Command: [03a26773-1e28-4e39-ad94-bd89674dc729, executeScript {args=[{appId=com.msmpl.sonyliviphone, bundleId=com.msmpl.sonyliviphone}], script=mobile: activateApp}] Capabilities {appium:app: xx---hidden--, appium:autoAcceptAlerts: true, appium:automationName: XCUITest, appium:databaseEnabled: false, appium:deviceName: iPhone, appium:fullReset: false, appium:javascriptEnabled: true, appium:locationContextEnabled: false, appium:networkConnectionEnabled: false, appium:noReset: true, appium:platformType: ios, appium:platformVersion: 17.5, appium:showIOSLog: false, appium:takesScreenshot: true, appium:udid: 00008110-001471C6229B801E, appium:useNewWDA: false, appium:wdaLocalPort: 8102, appium:webStorageEnabled: false, appium:xcodeOrgId: -----, platformName: IOS} Session ID: 03a26773-1e28-4e39-ad94-bd89674dc729 at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) at org.openqa.selenium.remote.ErrorCodec.decode(ErrorCodec.java:167) at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:138) at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:50) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:190) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:237) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:618) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:302) at io.appium.java_client.CommandExecutionHelper.execute(CommandExecutionHelper.java:36) at io.appium.java_client.CommandExecutionHelper.executeScript(CommandExecutionHelper.java:67) at io.appium.java_client.InteractsWithApps.activateApp(InteractsWithApps.java:196) at io.appium.java_client.InteractsWithApps.activateApp(InteractsWithApps.java:178) at MobileStepDefinition.Login.userLaunchesTheAppForLoginAs(Login.java:843) at ✽.User launches the app for login as "registered"(file:///Users/sagarnayak/Documents/bdd15oct/app_automation/src/main/java/MobileFeatures/AppLogin.feature:188)

we tried newCommandTimeout, and many ways. it was working fine but all of sudden started throwing this issue. In case if it works suddenly in one system , it wont work in other system where it was working before */

Upvotes: 0

Views: 60

Answers (0)

Related Questions