uber / rides-android-sdk

Uber Rides Android SDK (beta)
https://developer.uber.com/docs
MIT License
292 stars 126 forks source link

Unable to connect error showing inside Uber app (SSO login, sdk 0.9.1, Android 6+) #123

Open luckcoolla opened 6 years ago

luckcoolla commented 6 years ago

Hello,

I'm using now SSO auth method and it works fine for android OS 5.x devices. But Uber application auth page showing error 'Unable to connect' for android 6+ devices.

Code that I use for login:

        com.uber.sdk.android.core.auth.LoginManager uberLoginManager;
        ...
        uberLoginManager.setAuthCodeFlowEnabled(false);
        uberLoginManager.login(Activity activity)

To set-up flow I've registered app like it was described in the manual: SSO setup manual

Previously I've worked with android sdk com.uber.sdk.android.core.auth.LoginManager#loginForAuthorizationCode method and saw similar issue on similar devices.

Library version: com.uber.sdk:rides-android:0.9.1

Repro steps, stacktrace, screenshots:

Expected Behavior:

Actual Result:

When user clicks 'OK' on the pop-up, I see error 'connectivity issue' inside my application:

04-12 19:13:40.834 6924-6924/ D/LoginActivity: onActivityResult requestCode:[1001] resultCode [0]
04-12 19:13:40.834 6924-6924/ E/UberUtil$LoginCallback: onLoginError, name = CONNECTIVITY_ISSUE

Devices, used for test:

luckcoolla commented 6 years ago

Seems like it's an issue inside Uber app(correct me, if I'm wrong), so just FYI I'm using the latest rider app version.

If it can help you somehow, I've just proxied http-methods during the page loading and error showing and I can share it with you.

tyvsmith commented 6 years ago

Do you have Adblock or Adguard enabled? I've seen that behavior with that before for a google analytics api call from that page.

luckcoolla commented 6 years ago

@tyvsmith I've just double-checked with SM S7. I'm using straight 3g/4g network connection on the device with android samsung stock rom, without any Adblock apps installed

tyvsmith commented 6 years ago

Sorry for the delayed responses.

We haven't been able to reproduce it yet, so I'm thinking it's something specific to your situation. What carrier are you on, have you tried other devices or different carriers? What version of Android? Is it consistent?

Feel free to attach the web logs if you've collected any. Thanks!

luckcoolla commented 6 years ago

Hello,

I've tried all carriers I have now(velcom/Life BY) and wifi with no proxies/adblock software installed. I've checked on all devices I have for the moment and here are results:

Repro steps uber demo app preparation:

device preparation:

launch steps:

Device matrix Doesn’t reproduces on Android 5 and less devices

Reproduces on 100% attempts:

Reproduces time to time (don’t know steps why issue stops reproducing and appears again):

Please, check out recorded videos for all listed devices by this link: https://drive.google.com/drive/folders/1qsgnEBfePqdR9SGFUtb-5iiARoirQ9PE?usp=sharing

Feel free to attach the web logs if you've collected any.

I've enabled wifi Network proxy and provided you screenshots on the SSO sign-in attempt. (two images inside shared google drive folder)

luckcoolla commented 6 years ago

Hey, do you see anything unusual, probable cause of the error?

judomu commented 6 years ago

I'm facing the same issue :/. It worked only one time on my Android 8.1.0 device.

luckcoolla commented 6 years ago

@tyvsmith any updates here?

MathebulaMahlatse commented 6 years ago

@luckcoolla I have struggled with similar issue for a week and eventually I managed to get it working. The issue was with app signature. Make sure that you use correct signature.

Try the following:

   keytool -exportcert -alias <your_key_alias> -keystore <your_keystore_path> | openssl sha1 -binary | openssl base64

I have used these values for placeholders

if it asks for keytore password, should enter 'android' without the quotes.

Reference: