Assigned
Status Update
Comments
ca...@google.com <ca...@google.com> #2
I'm seeing this as well, and it's happening after navigating to a screen that does not even use compose dependencies. Our flow is:
Non Compose fragment -> Compose fragment -> Non compose fragment -> This crash immediately
Currently troubleshooting, but coming up empty and cannot reproduce on my device, but seeing crashes on client devices.
Non Compose fragment -> Compose fragment -> Non compose fragment -> This crash immediately
Currently troubleshooting, but coming up empty and cannot reproduce on my device, but seeing crashes on client devices.
ma...@codewave.com <ma...@codewave.com> #3
What devices and API levels are you seeing this issue?
ma...@codewave.com <ma...@codewave.com> #4
Compose version: 1.2.1
Devices: Various devices, seen across Samsung/Pixels/Moto/etc.
Device API levels: Seen on Android 8-13
Devices: Various devices, seen across Samsung/Pixels/Moto/etc.
Device API levels: Seen on Android 8-13
ca...@google.com <ca...@google.com> #5
In my scenario in which I can reproduce this crash it seems to be related to Dialogs: I have a UI where I send off a network request and show a ProgressDialog while the request is being processed. Once the response is there, I dismiss the ProgressDialog and navigate back/remove the Composable that contains the ProgressDialog from the composition.
When the request takes some time to complete, it works perfectly fine. However, if the request is completed really quickly (i.e. when the device is in airplane mode) it crashes quite reliably. So my uneducated guess is that there's a race condition between the Dialog being 'fully initialized' and the Composable which houses the Dialog being removed from the composition.
Tested on:
Compose 1.3.1
Pixel 4 Emulator with API 29
When the request takes some time to complete, it works perfectly fine. However, if the request is completed really quickly (i.e. when the device is in airplane mode) it crashes quite reliably. So my uneducated guess is that there's a race condition between the Dialog being 'fully initialized' and the Composable which houses the Dialog being removed from the composition.
Tested on:
Compose 1.3.1
Pixel 4 Emulator with API 29
ma...@codewave.com <ma...@codewave.com> #6
Can you try to produce a project that reproduces this bug?
ma...@codewave.com <ma...@codewave.com> #7
It's a bit more complicated than I thought, but I managed to make a small project that reproduces the exact scenario from my app. What I left out before: The UI where the ProgressDialog is shown is a BottomSheetDialogFragment hosting a ComposeView. When the network request is done, I navigate back using the Navigation library.
See the attached project and most of the time it will crash when triggering the async work in the bottom sheet.
See the attached project and most of the time it will crash when triggering the async work in the bottom sheet.
Description
I hope you're doing well.
While fetching restaurant details from Google Maps, I noticed that the "Cost for two" pricing is displayed on Maps. However, when using the Places Text Search or Place Details API, the "Cost for two" key is missing in the results compared to the Maps data.
Could you please explain why this discrepancy occurs? Additionally, how can I reliably fetch the "Cost for two" pricing using the Places API?
Thank you for your assistance.