Skip to content

Unable to create a new Session after upgrading to java-client 5.0.0-BETA5 #605

@poorvikamahesh

Description

@poorvikamahesh

Hello,

I just upgraded the java-client to 5.0.0-BETA5. Now I am unable to launch the app and get the below error -

[Appium] Welcome to Appium v1.6.4-beta
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/Desktop/xxx.ipa","newCommandTimeout":300,"platformVersion":"10.2.1","xcodeOrgId":"QWERTY","automationName":"XCUITest","bundleId":"com.xxx.xxx","platformName":"iOS","udid":"XXXXXXXXXXX","deviceName":"iPad","fullReset":true,"xcodeSigningId":"XXXX"},"requiredCapabilities":{},"capabilities":{"desiredCapabilities":{"app":"/Users/Desktop/xxx.ipa","newCommandTimeout":300,"platformVersion":"10.2.1","xcodeOrgId":"QWERTY","automationName":"XCUITest","bundleId":"com.xxx.xxx","platformName":"iOS","udid":"XXXXXXXXXXX","deviceName":"iPad","fullReset":true,"xcodeSigningId":"XXXX"},"requiredCapabilities":{}},"alwaysMatch":{"app":"/Users/poorvikamahesh/Desktop/Vinodh/DreamMapper_automation_March_3rd.ipa","newCommandTimeout":300,"
[MJSONWP] Bad parameters: BadParametersError: Parameters were incorrect. We wanted {"required":["desiredCapabilities"],"optional":["requiredCapabilities","capabilities","sessionId","id"]} and you sent ["desiredCapabilities","requiredCapabilities","capabilities","alwaysMatch","firstMatch"]
[HTTP] <-- POST /wd/hub/session 400 9 ms - 243 


My desired capabilities is as below


DesiredCapabilities capabilities = new DesiredCapabilities();

			capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");
			capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 300 );
			capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "abc");
			capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
			capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "10.2.1");
			capabilities.setCapability(MobileCapabilityType.APP, "/path/to/app");
			capabilities.setCapability("bundleId", "com.xxx.xxx");
			capabilities.setCapability(MobileCapabilityType.UDID, "xxxxxxxx");
			capabilities.setCapability(MobileCapabilityType.FULL_RESET, true);
			capabilities.setCapability("xcodeOrgId", "xxxxx");
			capabilities.setCapability("xcodeSigningId", "xxxxx");
sAppiumDriver = new IOSDriver(new URL("http://localhost:4723/wd/hub"), capabilities);

Kindly help.

Thanks and Regards,
Poorvika

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions