appium / appium/java-client

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

Open
#1,244 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.3k
Forks
752
Avg merge
6d 21h
Merged PRs (30d)
8

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at IOSDriver.getSettings(), following the response value into ImmutableMap.builder().putAll, and reproduce the three-step setSetting/getSettings sequence against Appium 1.15.0 on iOS 13.1. Done means getSettings no longer throws when reduceMotion is null, with regression coverage for the reported sequence.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.