question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Native SSO Issue when deeplink launching Uber crashes via deeplink uri

See original GitHub issue

Github issues are for bug reports. If this is a question around usage or understanding please use Stack Overflow. https://stackoverflow.com/questions/tagged/uber-api

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

Repro steps, stacktrace, screenshots:

We have implemented the Single Sign On for Android.

However, when we invoke the deeplink, it launches Uber app, then Uber app hangs/crashes and sends us back in ours.

https://youtu.be/nAMfsW8ByLk

Here’s the generated sso url from the sdk:

uber://connect?client_id=tpU1890vz3bf-QiY1H-Fs5AKBfZ5C62E&scope=all_trips history places profile request request_receipt&sdk=android&sdk_version=3.0.0

Any ideas?

Expected Behavior:

We expect the Single Sign On to auth the user then loop back and launch our app.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
saurabhdhilloncommented, May 10, 2018

I am also experiencing the same problem on Android with the difference that uber hangs to a white screen and returns to calling activity on back presses.

I have tried: Method 1:

SessionConfiguration config = new SessionConfiguration.Builder()
                 .setClientId(<client-d>)
                .setClientSecret(<client-secret>)
                .setServerToken(<server-token>)
                .build();

        Location location = Singleton.getInstance(context).getOneTimeLocation().getLocation();
        RideParameters rideParams = new RideParameters.Builder()
                .setPickupLocation(location.getLatitude(), location.getLongitude(), "Your", "Your")
                .setDropoffLocation(latitude, longitude, address, "")
                .build();

        RideRequestDeeplink deeplink = new RideRequestDeeplink.Builder(context)
                .setSessionConfiguration(config)
                .setFallback(Deeplink.Fallback.MOBILE_WEB)
                .setRideParameters(rideParams)
                .build();

       // deeplink.execute();
        
        try {
            Intent intent = new Intent(Intent.ACTION_VIEW);
            intent.setData(deeplink.getUri());
            ((BaseActivity) context).startActivity(intent, null, false);
        } catch (Exception e) {

        }

Method 2: String baseUrl = "https://m.uber.com/ul/?action=setPickup&"; StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(baseUrl); stringBuilder.append("client_id=").append("VLEPmJ4-yqMuwFGTFWCR_9rpzFFpFi1-").append("&"); stringBuilder.append("pickup[latitude]=").append(location.getLatitude()).append("&"); stringBuilder.append("pickup[longitude]=").append(location.getLongitude()).append("&"); stringBuilder.append("dropoff[latitude]=").append(latitude).append("&"); stringBuilder.append("dropoff[longitude]=").append(longitude).append("&"); stringBuilder.append("dropoff[formatted_address]=").append(address); //Opened this url in browser ending in same result

Both the methods had same result, Uber app hangs with white screen.

Note: In Method 2, it provides me with Open link with chrome or uber, if i choose Just Once it opens correctly but if it choose Always option it keeps redirecting me to hang Uber.

0reactions
theonetheycallneocommented, Sep 24, 2018

@here I’m closing this issue.

We got confused using our two environments dev and production. We needed to create 2 keys for each and copy them both to the uber dashboard.

For those of you struggling, our dev key uses the base Android Studio one:

cat ./android/keystores/debug.keystore.properties
key.store=debug.keystore
key.alias=androiddebugkey
key.store.password=android
key.alias.password=android

alias: androiddebugkey password: android

Then copy that into your dashboard to test on device locally.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uber app crash when opened via deeplink multiple times
Problem is specific to using Universal Links on android 6.0 and lower. Resolved the problem by switching to deeplink (uber://).
Read more >
Change Log - CocoaPods
Changes · LoginManager now uses SFAuthenticationSession , SFSafariViewController , or external Safari for web-based OAuth flows. · Deeplinking protocol simplified ...
Read more >
Ride Request Deep Links - Developers | Uber
Deep linking provides application interoperability between a native app or web view and the native Uber ... There are two available actions via...
Read more >
Authentication - Expo Documentation
Under "Valid OAuth Redirect URIs" add https://localhost:19006 and any other web URLs you may want to add. Press "Save Changes" in the footer....
Read more >
Broken deep link URL when using: LAUNCH.TRAINING ...
Specifically, they can be generated to use an SSO Base URL or a regular Cornerstone URL. If you are experiencing the issue outlined...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found