flutter-maps-launcher icon indicating copy to clipboard operation
flutter-maps-launcher copied to clipboard

PlatformException after opening maps on IOS

Open mirco-dlab opened this issue 1 year ago • 5 comments

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

mirco-dlab avatar May 22 '24 13:05 mirco-dlab

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

maquejp avatar Jun 11 '24 07:06 maquejp

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>

sohrabonline avatar Jul 01 '24 08:07 sohrabonline

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.

lukehutch avatar Aug 01 '24 12:08 lukehutch

any workaround?

edwin-alvarez avatar Sep 09 '24 05:09 edwin-alvarez

@edwin-alvarez yes, try my fix above, and comment on it if it works

lukehutch avatar Sep 09 '24 09:09 lukehutch

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.

pikaju avatar Dec 27 '24 16:12 pikaju