-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android release build crashing. #1383
Comments
If you have a crash, the first thing to do is fetch your stacktrace from adb logcat. You likely have a mis-configuration. |
@christocracy here is the stacktrace from the exception when the app crashes. No indication there is an issue with the configuration. And I haven't changed the configuration in at least a year.
|
This is a very common issue with Android developers all over the world. Your application code is blocking the the main thread, preventing the plugin from calling See the Wiki about this |
The example app published at the play store does not receive these ANR errors (application not responding). |
This issue is stale because it has been open for 30 days with no activity. |
Your Environment
Plugin version: 4.16.4
Platform: Android
OS version: 12
Device manufacturer / model: Samsung Galaxy A13
Flutter info (
flutter doctor
):[✓] Flutter (Channel stable, 3.19.5, on macOS 14.2.1 23C71 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc4)
[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.1)
[✓] VS Code (version 1.95.1)
[✓] Connected device (6 available)
[✓] Network resources
Plugin config:
Expected Behavior
The user should be able to "Cancel" or "Allow" location always without the app crashing.
Actual Behavior
When the user is prompted to allow for location to "always" be in use, if the user clicks "Allow" or "Cancel". The app crashes.
Steps to Reproduce
Context
This only happens in Android release builds and not debug builds so it makes it a little harder to understand where this error is happening. But I assume that this is happening when we call
final location = await bg.BackgroundGeolocation.getCurrentPosition();
as this is the entry point to start tracking a users position. The only reason I am able to see the error is via Sentry logs.Debug logs
Logs
The text was updated successfully, but these errors were encountered: