Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlatformException after opening maps on IOS #42

Open
mirco-dlab opened this issue May 22, 2024 · 5 comments · May be fixed by #43
Open

PlatformException after opening maps on IOS #42

mirco-dlab opened this issue May 22, 2024 · 5 comments · May be fixed by #43

Comments

@mirco-dlab
Copy link

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
Copy link

maquejp commented Jun 11, 2024

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

@sohrabonline
Copy link

sohrabonline commented Jul 1, 2024

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 lukehutch linked a pull request Aug 1, 2024 that will close this issue
@lukehutch
Copy link

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.

@edwin-alvarez
Copy link

any workaround?

@lukehutch
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants