Shopify / ui-extensions

MIT License
248 stars 35 forks source link

Map component error: Google Maps JavaScript API could not load #2141

Open mkupiniak opened 3 days ago

mkupiniak commented 3 days ago

Please list the package(s) involved in the issue, and include the version you are using

  "dependencies": {
    "@shopify/ui-extensions": "2024.4.2",
    "@shopify/ui-extensions-react": "2024.4.2",
    "react": "18.3.1"
  },

Describe the bug

I'm using the Map Component to display some pickup points on the Thank You and Order status pages. On my development store it works fine, but for some merchants (at least 2 different) the map doesn't load because of the following error: Unhandled Promise rejection error: The Google Maps JavaScript API could not load, because it does not appear in the script-src directive of the Content Security Policy..

Steps to reproduce the behavior:

Unfortunately I'm not able to reproduce this bug on my development stores.

Expected behavior

Map should load without any issues.

Screenshots

image (5) error 1

Additional context

Does specifying a wildcard domains on the Google Maps API key has anything to do with it?