# Getting ReferenceError AP is not defined

**URL:** <https://community.developer.atlassian.com/t/getting-referenceerror-ap-is-not-defined/19780>\
**Category:** Jira Cloud\
**Tags:** javascript, iframe, api, jira-cloud\
**Created:** [June 13, 2018, 7:53am UTC](https://community.developer.atlassian.com/t/getting-referenceerror-ap-is-not-defined/19780 "2018-06-13T07:53:32Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![marc](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/marc/32/39047_2.png) [@marc](https://community.developer.atlassian.com/u/marc)\
**Post date:** [February 14, 2020, 9:09am UTC](https://community.developer.atlassian.com/t/getting-referenceerror-ap-is-not-defined/19780/11 "2020-02-14T09:09:08Z")

</div>

@dmorrow  
We are seeing that some AP related javascript is not loaded. The browser console gives errors like:

```auto
> ReferenceError: "_AP is not defined"
> <anonymous> https://d2oo471t4e338f.cloudfront.net/XXXXXXX.atlassian.net/wiki/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-659307766/h/5295cb211c06107e38861d05bc31dea1/_/download/batch/com.atlassian.plugins.atlassian-connect-plugin:iframe-host-utils-v5/com.atlassian.plugins.atlassian-connect-plugin:iframe-host-utils-v5.js?externals= __local-default__ :5
> com.atlassian.plugins.atlassian-connect-plugin:iframe-host-utils-v5.js:1:96
> WRMCB https://d2oo471t4e338f.cloudfront.net/XXXXXX.atlassian.net/wiki/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-659307766/h/5295cb211c06107e38861d05bc31dea1/_/download/batch/com.atlassian.plugins.atlassian-connect-plugin:iframe-host-utils-v5/com.atlassian.plugins.atlassian-connect-plugin:iframe-host-utils-v5.js?externals= __local-default__ :1
> <anonymous> https://d2oo471t4e338f.cloudfront.net/XXXXX.atlassian.net/wiki/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-659307766/h/5295cb211c06107e38861d05bc31dea1/_/download/batch/com.atlassian.plugins.atlassian-connect-plugin:iframe-host-utils-v5/com.atlassian.plugins.atlassian-connect-plugin:iframe-host-utils-v5.js?externals= __local-default__ :6

```

And many more of these errors. That makes our addon not work properly. Somehow this error seems related to cloudfront failing to load resources.

Edit: this happens in Confluence Cloud

---

_[View the full topic](https://community.developer.atlassian.com/t/getting-referenceerror-ap-is-not-defined/19780)._
