flutterlocation icon indicating copy to clipboard operation
flutterlocation copied to clipboard

App freezes or crashes when selecting "Only this time" on Android

Open kennethj opened this issue 3 years ago • 0 comments

Description On Android 12, when the user selects the permission "Only this time" and then leaves the app for 60 seconds (allowing the permissions to expire) when returning to the app, it either crashes or is stuck on the app splash screen.

Expected behavior A clear and concise description of what you expected to happen.

Steps To Reproduce

Example project: https://github.com/kennethj/flutter_location_bug

  1. Request location permission
  2. Select "Only this time" on the permission dialog
  3. Put the app in the background
  4. Wait 60 seconds to allow the permission to expire
  5. Return to the app

Tested on:

  • Android 12, API Level 31 or simulator, and Pixel 5 physical device. Users also reported the same bug on other android devices.

Additional logs

Debugger disconnects after 60 seconds :(

Related notes

I also tried to isolate the issue in a blank Android project, but following the same steps causes the app to restart rather than freeze.

  • Android project: https://github.com/kennethj/android-location-bug
  • Android issue: https://issuetracker.google.com/issues/250945811

kennethj avatar Oct 06 '22 16:10 kennethj