rtchagas / pingplacepicker

An almost plug and play replacement for Google's Place Picker
Apache License 2.0
142 stars 55 forks source link

Show crash in Crashlytics #99

Closed dzungpv closed 1 year ago

dzungpv commented 1 year ago

App not crash but I see many error log in Google Play and Crashlytics. This occur with latest version but not with 2.x version. Seem it cause by RxJava lib. Logs:

The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/

And

Exception o.sj0:
  at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept (Functions.java)
  at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept (Functions.java)
  at io.reactivex.internal.observers.LambdaObserver.onError (LambdaObserver.java:77)
  at io.reactivex.internal.observers.LambdaObserver.onNext (LambdaObserver.java:67)
  at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal (ObservableObserveOn.java:201)
  at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run (ObservableObserveOn.java:255)
  at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run (HandlerScheduler.java:124)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:346)
  at android.os.Looper.loop (Looper.java:475)
  at android.app.ActivityThread.main (ActivityThread.java:7889)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1009)
Caused by java.lang.IllegalArgumentException:
  at retrofit2.Utils.methodError (Utils.java:54)
  at retrofit2.HttpServiceMethod.createCallAdapter (HttpServiceMethod.java:116)
  at retrofit2.HttpServiceMethod.parseAnnotations (HttpServiceMethod.java:67)
  at retrofit2.ServiceMethod.parseAnnotations (ServiceMethod.java:39)
  at retrofit2.Retrofit.loadServiceMethod (Retrofit.java:202)
  at retrofit2.Retrofit$1.invoke (Retrofit.java:160)
  at java.lang.reflect.Proxy.invoke (Proxy.java:1006)
  at $Proxy2.ˊ
  at com.rtchagas.pingplacepicker.repository.googlemaps.GoogleMapsAPI$DefaultImpls.findByLocation$default (GoogleMapsAPI.kt:19)
  at com.rtchagas.pingplacepicker.repository.googlemaps.GoogleMapsRepository.getPlaceByLocation (GoogleMapsRepository.kt:111)
  at com.rtchagas.pingplacepicker.viewmodel.PlacePickerViewModel.getPlaceByLocation (PlacePickerViewModel.kt:56)
  at com.rtchagas.pingplacepicker.ui.activity.PlacePickerActivity.selectThisPlace (PlacePickerActivity.kt:556)
  at com.rtchagas.pingplacepicker.ui.activity.PlacePickerActivity.access$handlePlaceByLocation (PlacePickerActivity.kt)
  at com.rtchagas.pingplacepicker.ui.activity.PlacePickerActivity.access$selectThisPlace (PlacePickerActivity.kt)
  at com.rtchagas.pingplacepicker.ui.activity.PlacePickerActivity$initializeUi$1$4.invoke (PlacePickerActivity.kt:411)
  at com.rtchagas.pingplacepicker.ui.activity.PlacePickerActivity$initializeUi$1$4.invoke (PlacePickerActivity.kt:411)
  at com.rtchagas.pingplacepicker.ui.UiExtensionsKt$onclick$1.invoke (UiExtensions.kt)
  at com.rtchagas.pingplacepicker.ui.UiExtensionsKt$onclick$1.invoke (UiExtensions.kt)
  at com.rtchagas.pingplacepicker.ui.UiExtensionsKt.onclick$lambda$0 (UiExtensions.kt:15)
  at io.reactivex.internal.observers.LambdaObserver.onNext (LambdaObserver.java:63)
Caused by java.lang.IllegalStateException: Single return type must be parameterized as Single<Foo> or Single<? extends Foo>
  at retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory.get (RxJava2CallAdapterFactory.java:118)
  at retrofit2.Retrofit.nextCallAdapter (Retrofit.java:253)
  at retrofit2.Retrofit.callAdapter (Retrofit.java)
  at retrofit2.HttpServiceMethod.createCallAdapter (HttpServiceMethod.java:114)
rtchagas commented 1 year ago

This is a R8 issue. Please check the release https://github.com/rtchagas/pingplacepicker/releases/tag/3.0.1 You can also add these rules to you project as well.

dzungpv commented 1 year ago

This is a R8 issue. Please check the release https://github.com/rtchagas/pingplacepicker/releases/tag/3.0.1 You can also add these rules to you project as well.

Thank you for the fix