Skip to content

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

@dallasgutauckis

Description

@dallasgutauckis

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions