question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bad Parameters Error using 5.0.0-BETA6 and Appium 1.6.3/1.6.4-beta

See original GitHub issue

The problem

I am getting the following error when I use the 5.0.0-BETA6 java client:

[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/steven.zaluk/test/Digital Banking.app","appiumVersion":"1.6.4-beta","platformVersion":"10.2","automationName":"XCUITest","takesScreenshot":true,"autoWebview":true,"platformName":"iOS","deviceName":"iPhone 6"},"requiredCapabilities":{},"capabilities":{"desiredCapabilities":{"app":"/Users/steven.zaluk/test/Digital Banking.app","appiumVersion":"1.6.4-beta","platformVersion":"10.2","automationName":"XCUITest","takesScreenshot":true,"autoWebview":true,"platformName":"iOS","deviceName":"iPhone 6"},"requiredCapabilities":{}},"alwaysMatch":{"app":"/Users/steven.zaluk/test/Digital Banking.app","appiumVersion":"1.6.4-beta","platformVersion":"10.2","automationName":"XCUITest","takesScreenshot":true,"autoWebview":true,"platformName":"iOS","deviceName":"iPhone 6"},"firstMatch":[]}
[debug] [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

Environment

  • Appium version (or git revision) that exhibits the issue: Appium version 1.6.3 and 1.6.4-beta and 5.0.0-BETA6 of the Java client
  • Last Appium version that did not exhibit the issue (if applicable): Works using the 4.1.2 version of the Java Client
  • Desktop OS/version used to run Appium: Max OS X El Capitan (10.11.6)
  • Node.js version (unless using Appium.app|exe): Node v7.7.4
  • Mobile platform/version under test: iOS 10.2
  • Real device or emulator/simulator: iOS Simulator
  • Appium CLI or Appium.app|exe: appium

Details

I am getting a BadParametersError when using the 5.0.0-BETA6 version of the Java client but am not getting this error using the 4.1.2 version.

Link to Appium logs

https://gist.github.com/szaluk/eabe36aa5103978078c37fcf7968d7bc

Code To Reproduce Issue [ Good To Have ]

This is how I am creating my XCUITest WebDriver instance:

    private WebDriver createiOSWebDriver() throws Exception {
        DesiredCapabilities desiredCapabilities = new DesiredCapabilities();

        desiredCapabilities.setCapability(MobileCapabilityType.APPIUM_VERSION, "1.6.4-beta");
        desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
        desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "10.2");
        desiredCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 6");
        desiredCapabilities.setCapability(MobileCapabilityType.APP, "/path/to/app");
        desiredCapabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");
        desiredCapabilities.setCapability(MobileCapabilityType.AUTO_WEBVIEW, true);
        desiredCapabilities.setCapability(CapabilityType.TAKES_SCREENSHOT, true);

        RemoteWebDriver remoteWebDriver = new RemoteWebDriver(new URL("http://url-to-appium-server"), desiredCapabilities);

        return remoteWebDriver;
    }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
szalukcommented, Mar 28, 2017

Ok. I moved to using IOSDriver and it’s working now. You can close this issue.

Thanks for the help!

0reactions
lock[bot]commented, Apr 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found