pikaju / flutter-maps-launcher

Simple Flutter package to open the maps application (or browser) on all platforms.
https://pub.dev/packages/maps_launcher
MIT License
57 stars 41 forks source link

PlatformException after opening maps on IOS #42

Open mirco-dlab opened 3 months ago

mirco-dlab commented 3 months ago

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

maquejp commented 2 months ago

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)

#3 MapModalsWidget.wifiContent. (package:wifi4eu_mobile/widget/map/map_modal_widget.dart:60:17) ` environment: sdk: '>=3.4.0 <4.0.0' url_launcher: ^6.2.6 maps_launcher: ^2.2.1
sohrabonline commented 2 months ago

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>
lukehutch commented 1 month ago

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.