Skip to content

Could not start a new session. Possible causes are invalid address of the remote server #21

@anamanick

Description

@anamanick

Hi There,

I am trying to Run Test in Browserstack App Automate using Appium java Client 8; but getting following invalid address error; I am using Java 15;

`[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1.1:java (default) on project java-browserstack: An exception occured while executing the Java class. null: InvocationTargetException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. java.lang.reflect.InvocationTargetException
[ERROR] Build info: version: '4.2.2', revision: '683ccb65d6'
[ERROR] System info: host: 'IT1517544', ip: '192.168.5.114', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '15.0.2'
[ERROR] Driver info: driver.version: AndroidDriver: [BROWSERSTACK_INVALID_APP_URL] The app_url specified in the 'app' capability in your test is invalid. Please specify a valid app_url that was returned in the response to upload app API request and try again.
[ERROR] Build info: version: '4.2.2', revision: '683ccb65d6'
[ERROR] System info: host: 'IT1517544', ip: '192.168.5.114', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '15.0.2'
[ERROR] Driver info: driver.version: AndroidDriver
[ERROR] remote stacktrace`

I am using following capabilities with Wc3 protocol

 // Set other BrowserStack capabilities
    browserstackOptions.put("appiumVersion", "1.22.0");
    browserstackOptions.put("projectName", "First Java Project");
    browserstackOptions.put("buildName", "browserstack-build-1");
    browserstackOptions.put("sessionName", "first_test");

    // Passing browserstack capabilities inside bstack:options
    caps.setCapability("bstack:options", browserstackOptions);

    // Set URL of the application under test
    caps.setCapability("app", "bs://j3c874f21852ba57957a3fdc33f47514288c4ba4");

    // Specify deviceName and platformName for testing
    caps.setCapability("deviceName", "Google Pixel 3");
    caps.setCapability("platformName", "android");
    caps.setCapability("platformVersion", "9.0");

    // Initialise the remote Webdriver using BrowserStack remote URL
    // and desired capabilities defined above
    AndroidDriver driver = new AndroidDriver(
    //AppiumDriver driver = new AppiumDriver(
    new URL("http://hub.browserstack.com/wd/hub"),
      caps
    );

It would be greatly appreciated if you guys can take a look at it.

-Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions