PlatformException after opening maps on IOS
When using MapsLauncher.launchQuery() the Maps app opens correctly with the position but in background a PlatformException is triggered.
The throwing method is _failedSafariViewControllerLoadException() of url_launcher_ios package.
Versions: maps_launcher: 2.2.1 url_launcher: 6.2.6 url_launcher_ios: 6.2.5
I have the same error
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Error, Error while launching https://maps.apple.com/?ll=49.566772%2C5.531372&q=AP6+Outdoor+Batiment+CPAS, null, null) #0 UrlLauncherIOS._failedSafariViewControllerLoadException (package:url_launcher_ios/url_launcher_ios.dart:168:5) #1 UrlLauncherIOS._mapInAppLoadResult (package:url_launcher_ios/url_launcher_ios.dart:142:15) #2 UrlLauncherIOS.launchUrl (package:url_launcher_ios/url_launcher_ios.dart:93:14) <asynchronous suspension> #3 MapModalsWidget.wifiContent.<anonymous closure> (package:wifi4eu_mobile/widget/map/map_modal_widget.dart:60:17) <asynchronous suspension>
environment: sdk: '>=3.4.0 <4.0.0' url_launcher: ^6.2.6 maps_launcher: ^2.2.1
same:
flutter: ---> errors: PlatformException(Error, Error while launching https://maps.apple.com/?ll=40.3337437%2C49.8392355&q=Arena++%28Su+%C4%B0dman+Saray%C4%B1n%C4%B1n+yax%C4%B1nl%C4%B1%C4%9F%C4%B1nda%29, null, null) => stack: #0 UrlLauncherIOS._failedSafariViewControllerLoadException (package:url_launcher_ios/url_launcher_ios.dart:168:5)
flutter: #1 UrlLauncherIOS._mapInAppLoadResult (package:url_launcher_ios/url_launcher_ios.dart:142:15)
flutter: #2 UrlLauncherIOS.launchUrl (package:url_launcher_ios/url_launcher_ios.dart:93:14)
flutter: <asynchronous suspension>
flutter: #3 MapsService.open (package:iticket/application/services/maps_service.dart:10:7)
flutter: <asynchronous suspension>
Same issue here:
Non-fatal Exception: FlutterError
0 ??? 0x0 UrlLauncherIOS._failedSafariViewControllerLoadException + 168 (url_launcher_ios.dart:168)
1 ??? 0x0 UrlLauncherIOS._mapInAppLoadResult + 142 (url_launcher_ios.dart:142)
2 ??? 0x0 UrlLauncherIOS.launchUrl + 93 (url_launcher_ios.dart:93)
I created #43 to try to fix the problem... would appreciate if others could please test it.
any workaround?
@edwin-alvarez yes, try my fix above, and comment on it if it works
Hey, this issue should hopefully be fixed in version 3.0.0. Could you try it and see if it works? Sorry for the wait.