Safari cannot open the page because the address is invalid for Google Maps on iPad

51,591

In case anyone else arrived here but wasn't getting this error because of a Google Maps link, Look at any JS you have listening to the click event of the link.

In my case, I had discovered a previous developer added a

e.preventDefault();

to the click event.

Share:
51,591
Kevin
Author by

Kevin

Updated on August 25, 2020

Comments

  • Kevin
    Kevin over 3 years

    We have a link that goes to Google Maps for directions using just the normal format for the Google Maps URL: https://www.google.com/maps/dir/Current+Location/38.8992,-77.0482.

    This works fine on google chrome and other browsers don't seem to have this issue either, but somehow on the iPad with OS 8.1.3 using the Safari browser, an alert comes up with the message "Safari cannot open the page because the address is invalid"

    Is anyone else experiencing this issue?

    The page still does seem to load, but the alert pops up and needs to be dismissed and detracts from the user experience. Since the link follows the Google Maps API standard and seems to work otherwise, what is the reason this is happening and what can be done to stop this from happening?

    Also, something strange happened when after the link works a few times, the message no longer comes up when the user is directed to the page. However, after clearing history and data for the Safari browser on iPad, the problem resurfaces again.