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

Map won't load intermittently, 'Uncaught (in promise)' error in console #294

Closed
jrrdnx opened this issue Feb 8, 2021 · 0 comments · Fixed by #371
Closed

Map won't load intermittently, 'Uncaught (in promise)' error in console #294

jrrdnx opened this issue Feb 8, 2021 · 0 comments · Fixed by #371

Comments

@jrrdnx
Copy link

jrrdnx commented Feb 8, 2021

Description

On random page loads, the map will fail in loading. On each of these instances the following error can be found in the console (I've replaced my Google Maps API key, but it's there and is valid):

Uncaught (in promise) 
ge {message: "init_mapc7a2366f519a9e676c4bfcc294026f4f is not a function", name: "InvalidValueError", stack: "Error↵    at new ge (https://maps.googleapis.com/m…=init_mapc7a2366f519a9e676c4bfcc294026f4f:146:118"}
message: "init_mapc7a2366f519a9e676c4bfcc294026f4f is not a function"
name: "InvalidValueError"
stack: "Error↵    at new ge (https://maps.googleapis.com/maps/api/js?key=[[MY_API_KEY_HERE]]&callback=init_mapc7a2366f519a9e676c4bfcc294026f4f:70:72)↵    at Object._.he (https://maps.googleapis.com/maps/api/js?key=[[MY_API_KEY_HERE]]&callback=init_mapc7a2366f519a9e676c4bfcc294026f4f:70:182)↵    at Nj (https://maps.googleapis.com/maps/api/js?key=[[MY_API_KEY_HERE]]&callback=init_mapc7a2366f519a9e676c4bfcc294026f4f:146:233)↵    at https://maps.googleapis.com/maps/api/js?key=[[MY_API_KEY_HERE]]&callback=init_mapc7a2366f519a9e676c4bfcc294026f4f:146:118"
__proto__: Error

Steps to reproduce

  1. Template created with Maps tag:
{% set mapCenter = 'Maidstone, UK' %}
{% set mapOptions = {
	center: mapCenter,
	markers: [{
		location: mapCenter,
	}],
} %}
{{ craft.maps.embed(mapOptions) }}
  1. Refresh the page. Most of the time the map will load fine, but occasionally it will be absent and the console shows the above error.

Additional info

  • Craft version: 3.6.4.1
  • Maps version: 3.9.0.2
  • PHP version: 7.4.11
  • Database driver & version: MySQL 5.7.32
  • Other Plugins:
    • Amazon S3: 1.2.11
    • Cookies: 1.1.12
    • CP Field Inspect: 1.2.4
    • Embedded Assets: 2.4.5
    • Feed Me: 4.3.5.1
    • Freeform: 3.10.6
    • Mix: 1.5.2
    • Neo: 2.8.18
    • Redactor: 2.8.5
    • Redirect Manager: 1.1.1
    • SEO: 3.3.30
    • Super Table: 2.6.7
    • Typed link field: 1.0.24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant