Search code examples
cordovauber-api

Uber app crash when opened via deeplink multiple times


Currently i am working on deeplinking to the Uber app from a cordova application. The deeplink is working as expected on newer phones but on android 6.0 Uber crashes when the deeplink is called twice.

The following deeplink url is used:

https://m.uber.com/ul/?action=setPickup&client_id=8AV0mBPupgZsue2ghtFfmd9sFV2wuNOg&pickup[formatted_address]=Rotterdam%20Centraal%20Station%2C%20Stationsplein%2C%20Rotterdam%2C%20Netherlands&pickup[latitude]=51.923674&pickup[longitude]=4.470496&dropoff[formatted_address]=Kinderhuissingel%2C%20Haarlem%2C%20Netherlands&dropoff[latitude]=52.386614&dropoff[longitude]=4.630431

The following steps to reproduce the error ( Android 6.0 ):

  1. Open deeplink from cordova app
  2. Wait for Uber to open
  3. Press back button 2 times to go back to cordova app
  4. Press deeplink agian from cordova app
  5. Uber crashes with following error:

    02-19 09:38:41.056 18250-18250/? E/AndroidRuntime: FATAL EXCEPTION: main
       Process: com.ubercab, PID: 18250
       io.reactivex.exceptions.CompositeException: 1 exceptions occurred. 
           at com.ubercab.rx2.java.CrashOnErrorConsumer.onError(SourceFile:136)
           at com.ubercab.rx2.java.CrashOnErrorConsumer.onNext(SourceFile:115)
           at com.uber.autodispose.HalfSerializer.a(SourceFile:129)
           at com.uber.autodispose.AutoDisposingObserverImpl.onNext(SourceFile:79)
           at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.e(SourceFile:200)
           at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(SourceFile:252)
           at io.reactivex.android.FastPathScheduler$ScheduledRunnable.run(SourceFile:180)
           at android.os.Handler.handleCallback(Handler.java:739)
           at android.os.Handler.dispatchMessage(Handler.java:95)
           at android.os.Looper.loop(Looper.java:135)
           at android.app.ActivityThread.main(ActivityThread.java:5343)
           at java.lang.reflect.Method.invoke(Native Method)
           at java.lang.reflect.Method.invoke(Method.java:372)
           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
         ComposedException 1 :
        io.reactivex.exceptions.OnErrorNotImplementedException: arom
           at com.ubercab.rx2.java.CrashOnErrorConsumer.onError(SourceFile:136)
           at com.ubercab.rx2.java.CrashOnErrorConsumer.onNext(SourceFile:115)
           at com.uber.autodispose.HalfSerializer.a(SourceFile:129)
           at com.uber.autodispose.AutoDisposingObserverImpl.onNext(SourceFile:79)
           at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.e(SourceFile:200)
           at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(SourceFile:252)
           at io.reactivex.android.FastPathScheduler$ScheduledRunnable.run(SourceFile:180)
           at android.os.Handler.handleCallback(Handler.java:739)
           at android.os.Handler.dispatchMessage(Handler.java:95)
           at android.os.Looper.loop(Looper.java:135)
           at android.app.ActivityThread.main(ActivityThread.java:5343)
           at java.lang.reflect.Method.invoke(Native Method)
           at java.lang.reflect.Method.invoke(Method.java:372)
           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
        Caused by: java.lang.IllegalStateException: Optional.get() cannot be called on an absent value
           at jom.c(SourceFile:26)
           at arpl.a(SourceFile:137)
           at aroj.c(SourceFile:422)
           at aroj.a(SourceFile:388)
           at arom.a(Unknown Source)
           at com.ubercab.rx2.java.CrashOnErrorConsumer$1.a(SourceFile:69)
           at com.ubercab.rx2.java.CrashOnErrorConsumer.onNext(SourceFile:112)
           at com.uber.autodispose.HalfSerializer.a(SourceFile:129)
           at com.uber.autodispose.AutoDisposingObserverImpl.onNext(SourceFile:79)
           at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.e(SourceFile:200)
           at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(SourceFile:252)
           at io.reactivex.android.FastPathScheduler$ScheduledRunnable.run(SourceFile:180)
           at android.os.Handler.handleCallback(Handler.java:739)
           at android.os.Handler.dispatchMessage(Handler.java:95)
           at android.os.Looper.loop(Looper.java:135)
           at android.app.ActivityThread.main(ActivityThread.java:5343)
           at java.lang.reflect.Method.invoke(Native Method)
           at java.lang.reflect.Method.invoke(Method.java:372)
           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)

Can anyone help to resolve this issue?


Solution

  • Problem is specific to using Universal Links on android 6.0 and lower. Resolved the problem by switching to deeplink (uber://).