Skip to content
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

iOS - Calling getPositionStream() method while location services are enabled and then disabling location services in Settings crashes the app #497

Closed
1 of 2 tasks
Andrew-Tolentino opened this issue Aug 31, 2020 · 3 comments
Labels
platform: ios Issue is related to the iOS platform type: bug Something isn't working

Comments

@Andrew-Tolentino
Copy link

🐛 Bug Report

Runner[3574:863495] LOCATION UPDATE FAILURE:Error reason: (null)Error description: The operation couldn’t be completed. (kCLErrorDomain error 1.)

Expected behavior

Reproduction steps

  1. Call getPositionStream() while location services enabled on application
  2. Go to Settings on the device and set: Allow Location Access - Never

The application then crashes.
When switching to previous versions before 6.0, the application does not crash.
When running the application on Xcode, I believe the error occurs on line 79 in he GeolocationHandler.m file.

Configuration

(base) Andrews-MacBook-Pro:Runner andrew$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.2, on Mac OS X 10.15.5 19F96, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Android Studio (version 3.5)
[!] IntelliJ IDEA Community Edition (version 2019.2.4)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.47.2)
[✓] Connected device (2 available)

Version: 1.x
6.0.0+1

Platform:

  • 📱 iOS
  • 🤖 Android
@utpal-barman
Copy link

utpal-barman commented Sep 1, 2020

similar issue, it was fine before v6

@mvanbeusekom mvanbeusekom added this to the geolocator 6.0.0+2 milestone Sep 3, 2020
@mvanbeusekom mvanbeusekom added platform: ios Issue is related to the iOS platform type: bug Something isn't working labels Sep 3, 2020
@mvanbeusekom
Copy link
Member

@Andrew-Tolentino thank you very much for the clear bug report. You were 100% correct with the error being on line 79 in the GeolocationHandler.m file.

I have fixed the bug in PR #509 and will release a fix today!

@mvanbeusekom
Copy link
Member

I have just release version 6.0.0+2 which fixes this problem. Thanks again for the report and the extensive information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: ios Issue is related to the iOS platform type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants