Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jenniferhuang opened this issue Sep 29, 2019 · 5 comments
Open

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

jenniferhuang opened this issue Sep 29, 2019 · 5 comments

Comments

@jenniferhuang
Copy link

jenniferhuang commented Sep 29, 2019

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

@mykola-mokhnach
Copy link
Contributor

This has been fixed in master, but not published

@jenniferhuang
Copy link
Author

Thanks.
isn't it a server bug? I am wondering why the appium server responses with reduceMotion=false when I setSetting() but responses with reduceMotion=null when I getSettings();

@mykola-mokhnach
Copy link
Contributor

As far as I can remember this has been done deliberately to show that this setting has its default value and has not been changed explicitly yet

@mykola-mokhnach
Copy link
Contributor

@imurchie Could probably confirm

@jenniferhuang
Copy link
Author

Hello, @imurchie any clarification? @mykola-mokhnach when do these changes be merged and published in maven https://mvnrepository.com/repos/central. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants