Skip to content

appium IOSDriver getSettings() throw NPE on appium server 15. #1244

@jenniferhuang

Description

@jenniferhuang

appium IOSDriver getSettings() throw NPE on appium server 15.

  1. start appium, IOSDriver iosDriver = new IOSDriver(xx,xxx);
  2. iosDriver.setSetting(Setting.IMAGE_MATCH_THRESHOLD, 0.8);
  3. iosDriver.getSettings();
    then it throws NPE

Environment

Appium java client: io.appium:io.appium:7.1.0 / io.appium:io.appium:7.2.0
Appium version: 1.15.0
Node.js version: v11.2.0
Npm version: 6.4.1
Mobile platform/version under test: ios13.1
Real device or emulator/simulator: real device

Details

it's because that the setting "reduceMotion" is null in new appium server(1.15.0).
and then
ImmutableMap.builder().putAll((Map)Map.class.cast(response.getValue())) will throw NPE

appium-reduceMotion-null-appium-log
appium-reduceMotion-null-client-log

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