-
-
Notifications
You must be signed in to change notification settings - Fork 626
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when accessing location twice #131
Comments
Happens to me as well. For me the application was in the background while I was turning on the location service. When came back to the application, it crash. Throwing the exact same error. |
same here, how soon can this be fixed |
Just as a workaround in the meantime, does it stop your app crashing if you put it in a try/catch clause ? |
@ibrierley Do you mean add a try/catch clause in the Java code or the Dart code? The crash is coming from the Java code which is part of the plugin |
I meant putting it in a on PlatformException catch...eg I have something like this in my code...
However, I'm not sure if that would catch that specific error at that level or not, as that looks like a low level. It's just odd, as I have seen that error in my code, but I don't think it's crashed it (but I may be wrong and not been completely aware of what happened). |
Actually I think the above doesn't handle it still digging further, so can probably ignore that. |
Just to add to this - I have noticed the same crash in a production version of the app. To give some context in terms of rarity - it happened to 5 users out of over 5000. Not sure if this is maybe a Flutter issue, rather than specific to this plugin? |
Looking through my Android crashes, this one is affecting me the most, although still with low rarity as mentioned before. I have all of the necessary try catches in my Dart code, but this crashes on the Java side I suspect. I don't know much about plugins, but it would be nice if this either didn't happen or was handled. Here is a crash trace (it's from production): Pretty much seen on most Android versions I am targeting: 4.4, 5.0, 5.1, 6.0, 7.0, 7.1, 8.0, 8.1, 9. Seen on a large variety of devices. Seen 56 times and affected 43 users, in most cases, it doesn't affect the same user. |
Is there anything that can be done to resolve this crash - it is negatively impacting my Play Store ranking due to the crash rate. |
馃悰 Bug Report
I have a screen that calls getCurrentPosition(desiredAccuracy: LocationAccuracy.high)
Upon navigating to the screen for the first time the location is returned correctly. However, when I navigate out of the screen and then go back to the screen the app crashes and the following stack trace is thrown
Expected behavior
App shouldn't crash and location is returned correctly
Reproduction steps
Configuration
Version: 2.1.0
Platform:
The text was updated successfully, but these errors were encountered: