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

NullPointerException when login via SSO without setting product flow priority #153

Closed
AlexBonel opened this Issue Feb 1, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@AlexBonel
Copy link

AlexBonel commented Feb 1, 2019

Library version: 0.10.0

Repro steps, stacktrace, screenshots:

  1. Assign any application's certificate footprint in uber developer's settings to enable SSO.
  2. Integrate the sdk in your project
  3. call LoginManager.login()

Expected Behavior: launching of Uber app with login activity

Real result: NPE crash

java.lang.NullPointerException: collection == null
        at java.util.ArrayList.<init>(ArrayList.java:94)
        at com.uber.sdk.android.core.auth.LoginManager.login(LoginManager.java:180)

The cause is the default value of productFlowPriority collection which is null and therefore while constructing ArrayList it crashes the app.

I would like to know if it's ok to pass to setProductFlowPriority() Collections.emptyList() to bypass the crash ?

@thepoofy thepoofy self-assigned this Feb 7, 2019

@thepoofy thepoofy added this to the 0.10.1 milestone Feb 7, 2019

@thepoofy

This comment has been minimized.

Copy link
Contributor

thepoofy commented Feb 7, 2019

Yes, passing Collections.emptyList() should be fine. This will default you to using only the Uber app.

Thanks for the detailed issue report.

thepoofy added a commit to thepoofy/rides-android-sdk that referenced this issue Feb 7, 2019

@thepoofy thepoofy closed this in #155 Feb 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment