lyft / lyft-android-sdk

Public Lyft SDK for Android
https://www.lyft.com/developers
Apache License 2.0
72 stars 22 forks source link

Crash: LyftButton#displayCost referring to CostEstimate#estimated_cost_cents_min which is null starting Aug 25, 2021 #26

Open dallasgutauckis opened 3 years ago

dallasgutauckis commented 3 years ago

We're getting a crash in the SeatGeek app due to the LyftButton failing to set the cost on the button as a result its API request for cost estimates, with this field (and presumably others it can't reach) being null or omitted from the response.

Stack trace:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
       at com.lyft.lyftbutton.LyftButton.displayCost(LyftButton.java:191)
       at com.lyft.lyftbutton.LyftButton.access$300(LyftButton.java:21)
       at com.lyft.lyftbutton.LyftButton$2.onSuccess(LyftButton.java:160)
       at com.lyft.lyftbutton.LyftButtonCallManager$4.onResponse(LyftButtonCallManager.java:184)
       at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0(DefaultCallAdapterFactory.java:89)
       at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0$DefaultCallAdapterFactory$ExecutorCallbackCall$1(DefaultCallAdapterFactory.java:3)
       at retrofit2.-$$Lambda$DefaultCallAdapterFactory$ExecutorCallbackCall$1$hVGjmafRi6VitDIrPNdoFizVAdk.run(-.java:3)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:246)
       at android.app.ActivityThread.main(ActivityThread.java:8595)
dallasgutauckis commented 3 years ago

Is this the right place to talk about issues related to LyftButton? or is there another place to file issues?