Crash: LyftButton#displayCost referring to CostEstimate#estimated_cost_cents_min which is null starting Aug 25, 2021
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
Research direction
Start at LyftButton.java:191, where displayCost crashes while processing the CostEstimate response, and inspect the response handling around LyftButtonCallManager.java:184. Reproduce or trace the null estimated_cost_cents_min case and review how other possibly omitted fields are handled. Done means a response with null or omitted cost fields no longer crashes the button.
Written by the indexing model from the issue text.
Description
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)
- Dominant language
- Java
- Stars
- 72
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lyft/lyft-android-sdk
-
Android 11 - It is not redirecting on browser and Lyft appMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
lyft/lyft-android-sdk#25 · 8 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
lyft/lyft-android-sdk#24 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
lyft/lyft-android-sdk#23 ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
lyft/lyft-android-sdk#11 ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
lyft/lyft-android-sdk#10 · 1 reaction ·
All issues in lyft/lyft-android-sdk
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
objectionary/lints#1640 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
openhab/openhab-addons#22168 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
wildfly/wildfly-channel#446 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day