Baseflow / Baseflow/flutter-geolocator

[Bug]: App crashes when location sharing is enabled iPadOS 14.6

Open
#1,729 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
1.3k
Forks
803
Avg merge
8h 16m
Merged PRs (30d)
1

Description

### Please check the following before submitting a new issue.

- [x] I have searched the [existing issues](https://github.com/baseflow/flutter-geolocator/issues).
- [x] I have carefully [read the documentation](https://github.com/Baseflow/flutter-geolocator/blob/main/geolocator/README.md) and verified I have added the required platform specific configuration.

### Please select affected platform(s)

- [ ] Android
- [x] iOS
- [ ] Linux
- [ ] macOS
- [ ] Web
- [ ] Windows

### Steps to reproduce

1. Install and open the app on an iPad (6th generation) running iPadOS 14.6.
2. Grant location permission when prompted.
3. Observe crash immediately or during startup.
4. Denying location permission results in a successful app launch.

### Expected results

The app should start normally and handle location permission gracefully without crashing, regardless of whether location sharing is enabled or denied.

### Actual results

- The app **crashes** when location permission is granted.
- The app **works fine** when location permission is denied.

+[LocationMapper toDictionary:]
NSInvalidArgumentException - -[CLLocation sourceInformation]: unrecognized selector sent to instance



Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x11b298 __exceptionPreprocess
1 libobjc.A.dylib 0x26480 objc_exception_throw
2 CoreFoundation 0x2a2a8 -[NSOrderedSet initWithSet:copyItems:]
3 CoreFoundation 0x11d8f4 ___forwarding___
4 CoreFoundation 0x11f89c _CF_forwarding_prep_0
5 geolocator_apple 0x5df8 +[LocationMapper toDictionary:] + 68 (LocationMapper.m:68)
6 geolocator_apple 0x54e4 __61-[GeolocatorPlugin onGetCurrentPositionWithArguments:result:]_block_invoke + 162 (GeolocatorPlugin.m:162)
7 geolocator_apple 0x4554 -[GeolocationHandler locationManager:didUpdateLocations:] + 154 (GeolocationHandler.m:154)
8 CoreLocation 0x1daf8 CLClientStopVehicleHeadingUpdates
9 CoreLocation 0x1cebc CLClientStopVehicleHeadingUpdates
10 CoreLocation 0x36d4 CLClientCreateWithBundleIdentifierAndPathOnSilo
11 CoreFoundation 0x9a650 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__
12 CoreFoundation 0x998e4 __CFRunLoopDoBlocks
13 CoreFoundation 0x94424 __CFRunLoopRun
14 CoreFoundation 0x93818 CFRunLoopRunSpecific
15 GraphicsServices 0x3570 GSEventRunModal
16 UIKitCore 0xb300e8 -[UIApplication _run]
17 UIKitCore 0xb35664 UIApplicationMain
18 AssetCues 0x4850 main + 20 (AppDelegate.swift:20)
19 libdyld.dylib 0x1140 start

### Version

14.0.1

Contributor guide

Open the contributing guide

Research direction

Inspect geolocator_apple/Classes/LocationMapper.m at line 68, then trace the call from GeolocatorPlugin.m line 162 and GeolocationHandler.m line 154. Reproduce on an iPad running iPadOS 14.6 with location permission granted and denied. Done means startup and location handling no longer crash in either permission state.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, ios, objective-c
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.