多次通过deeplink打开优步应用程序崩溃

时间:2018-02-19 09:04:15

标签: cordova uber-api

目前我正在使用cordova应用程序深入链接到Uber应用程序。 深度链接在新手机上运行正常,但在深度链接被调用两次时,Android 6.0优步崩溃。

使用以下deeplink网址:

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

重现错误的以下步骤(Android 6.0):

  1. 从cordova app打开深层链接
  2. 等待Uber打开
  3. 按两次后退按钮返回cordova app
  4. 从cordova app
  5. 按下deeplink agian
  6. 优步因以下错误崩溃:
  7. 
        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)
    
    

    任何人都可以帮忙解决此问题吗?

1 个答案:

答案 0 :(得分:1)

问题是特定于在Android 6.0及更低版本上使用Universal Links。 通过切换到deeplink(uber://)来解决问题。