mapbox / mapbox/MapboxGeocoder.swift
Crash in MapboxGeocoder: nil qualifiedName - Line 485
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 133
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
Xcode Version : 15.3
iPhone OS: iOS 17.2.1
IPhone Model: iPhone XS Max
MapboxGeocoder Version: ~0.15
MapboxSearch: >= 2.0.0-rc.3, < 2.0
MapboxMaps: ~> 11.3.0
When attempting to reverse geocode using a CLLocationCoordinate2D, it is crashing when force unwrapping "qulifiedName"
let options = ReverseGeocodeOptions(coordinate: point)
let geoCoder = Geocoder(accessToken: <access token>)
geoCoder.geocode(options) { placemarks, attribution, error in
guard let placemark = placemarks?.first else { return }
dump(placemark)
}
MapboxGeocoder/MBPlacemark.swift:485: Fatal error: Unexpectedly found nil while unwrapping an Optional value
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with MapboxGeocoder/MBPlacemark.swift at line 485 and reproduce the reverse-geocoding example using the listed iOS, MapboxGeocoder, MapboxSearch, and MapboxMaps versions. Trace why qualifiedName is nil for the returned placemark and check the existing geocoder tests, if present. Done means the supplied reverse-geocoding flow no longer crashes when qualifiedName is absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100