# Unable to load Google Autocomplete script

**URL:** <https://community.developer.atlassian.com/t/unable-to-load-google-autocomplete-script/78132>\
**Category:** Forge\
**Tags:** content-security-policy, jira-cloud\
**Created:** [March 8, 2024, 8:23pm UTC](https://community.developer.atlassian.com/t/unable-to-load-google-autocomplete-script/78132 "2024-03-08T20:23:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GyorgyVARGA](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/gyorgyvarga/32/50127_2.png) [@GyorgyVARGA](https://community.developer.atlassian.com/u/GyorgyVARGA)\
**Post date:** [March 8, 2024, 8:23pm UTC](https://community.developer.atlassian.com/t/unable-to-load-google-autocomplete-script/78132/1 "2024-03-08T20:23:34Z")

</div>

Hi!

When I installed this package to my custom ui react app: [react-google-autocomplete - npm](https://www.npmjs.com/package/react-google-autocomplete)  
And reference the component like this in my react component:

```auto
        <Autocomplete
          apiKey='abcd'
          onPlaceSelected={(place) => {
            console.log(place);
          }}
        />

```

There is an error in the console and it is not working:  
`Refused to connect to 'https://maps.googleapis.com/maps/api/mapsjs/gen_204?csp_test=true' because it violates the following Content Security Policy directive: "connect-src 'self' https://api.atlassian.com/metal/ingest`

In my manifest.yml I put these:

```auto
permissions:
  scopes:
    - read:jira-work
    - read:jira-user
    - manage:jira-configuration
    - storage:app
  content:
    styles:
      - 'unsafe-inline'
    scripts:
      - 'unsafe-inline'
  external:
    scripts:
      - https://maps.googleapis.com
      - https://*.googleapis.com

```

What can be the problem here? Why is it refusing to load?  
Can you please help me?

Thank you very much!

---

<div class="post-metadata">

**Author:** ![AlvaroBezerra](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/alvarobezerra/32/41104_2.png) [@AlvaroBezerra](https://community.developer.atlassian.com/u/AlvaroBezerra)\
**Post date:** [March 10, 2024, 11:49pm UTC](https://community.developer.atlassian.com/t/unable-to-load-google-autocomplete-script/78132/2 "2024-03-10T23:49:10Z")

</div>

Hi @GyorgyVARGA,

The error message suggests that the fetch call being made to the Google Maps API is being blocked. Although you have already allowed scripts to be loaded from `https://maps.googleapis.com`, in this case, you also need to allow fetch calls to be made for that same domain, e.g:

```auto
permissions:
  external:
    fetch:
      client:
        - https://maps.googleapis.com

```

See [https://developer.atlassian.com/platform/forge/manifest-reference/permissions/#fetch](https://developer.atlassian.com/platform/forge/manifest-reference/permissions/#fetch) for more details

Hope that helps!

---

<div class="post-metadata">

**Author:** ![GyorgyVARGA](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/gyorgyvarga/32/50127_2.png) [@GyorgyVARGA](https://community.developer.atlassian.com/u/GyorgyVARGA)\
**Post date:** [March 11, 2024, 8:14am UTC](https://community.developer.atlassian.com/t/unable-to-load-google-autocomplete-script/78132/3 "2024-03-11T08:14:52Z")

</div>

@AlvaroBezerra thank you very much, it solved my issue! 🙂
