-
Notifications
You must be signed in to change notification settings - Fork 171
Description
After updating to version 6.10.0, we noticed unusual behaviour with Google Maps. Occasionally, the map fails to display. Upon debugging the library, I identified the likely cause. In GoogleMapsInitializer.initialize(), the coroutine sometimes gets cancelled when the code is suspended at the withContext block, and in the catch block, the state is set to InitializationState.FAILURE.
Additionally, at the start of the initialize function, there's a state check that prevents reinitialization if the state is FAILURE, causing the map to remain hidden until the app is killed and restarted.
In my view, if the coroutine is cancelled during initialisation, the state should be set to InitializationState.UNINITIALIZED rather than InitializationState.FAILURE. Additionally, it should be possible to reinitialise the map after a failure without needing to call the reset function.
Environment details
OS type and version:
I reproduced the issue on the Pixel 9 Pro and Pixel Fold with Android 16, but we have also received reports from other devices and versions.
Library version and other environment information:
android-compose-map: 6.10.0
compose-bom: 2025.07.00