# discourseEmbed, does not match recipient window origin

**URL:** <https://meta.discourse.org/t/discourseembed-does-not-match-recipient-window-origin/57737>\
**Category:** Product Support\
**Created:** [21.Февраль.2017 20:08:31 UTC](https://meta.discourse.org/t/discourseembed-does-not-match-recipient-window-origin/57737 "2017-02-21T20:08:31Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![trudat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trudat/32/104354_2.png) [@trudat](https://meta.discourse.org/u/trudat)\
**Post date:** [21.Февраль.2017 20:08:31 UTC](https://meta.discourse.org/t/discourseembed-does-not-match-recipient-window-origin/57737/1 "2017-02-21T20:08:31Z")

</div>

I am trying to embed Discourse comments into an external site, and getting a CORS-like error in the console of the external site. It is a CKAN site using a 3rd party plugin for Discourse integration ([plugin link](https://github.com/ontodia/ckanext-discourse)). Both sites are served over HTTPS.

The Discourse iFrame loads on the external site, there’s a message “Loading Discussion…” that tries to load comments. It reloads the iFrame about every 10 seconds, in a loop.

The error in CKAN console:

```
Failed to execute 'postMessage' on 'DOMWindow': The target 
origin provided ('https://discourse-site') does not match the  
recipient window's origin ('https://ckan-site').

```

In the Discourse error log:

`Job exception: SSL_connect returned=1 errno=0 state=error: certificate verify failed`

By opening the `env` tab, i get the following details.

```
hostname	forum-app
process_id	[97, 101, 3295, 7109, 174, 98, 104]
application_version	[ae671355da1db07dedd4a1c927282ce7ce8ecc33, 476ae57af300b6a052318f66a1c84d3e791c0d26, ce7c3bfc14c873b952bb4242d2d2b9ac5ae466d6]
current_db	default
current_hostname	discourse-site.com
job	Jobs::RetrieveTopic
problem_db	default
opts	null
user_id	3
embed_url	[https://ckan-site/dataset/test-003, https://ckan-site/dataset/test-06]
referer	[https://ckan-site/dataset/test-003, https://ckan-site/dataset/test-06, https://discourse-site/embed/comments?embed_url=https%3A%2F%2Fckan-site%2Fdataset%2Ftest-003, https://discourse-site/embed/comments?embed_url=https%3A%2F%2Fckan-site%2Fdataset%2Ftest-06]
current_site_id	default

```

###Related posts

> [@\[solved\] Error Embedding](https://meta.discourse.org/t/solved-error-embedding/57276):
>
> Hi, similar to [this post](https://meta.discourse.org/t/403-error-embedding-comments/42923), I’m getting errors embedding comments in a static site: [https://bigsmall.io/articles/action-brands-are-important-urgent-credible/](https://bigsmall.io/articles/action-brands-are-important-urgent-credible/) In the browser console, I it says “Loading Discussion”, then “Error Embedding” with this in the JavaScript console: Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://community.bigsmall.io') does not match the recipient window's origin ('https://bigsmall.io'). The topics are created in Discourse - I see t…

> [@How can I troubleshoot Discourse comments embedding feature?](https://meta.discourse.org/t/how-can-i-troubleshoot-discourse-comments-embedding-feature/30323/4):
>
> @purldator here are my embed settings (sorry, I can’t embed images or link to them): embeddable hosts: [ddhstaging.satapps.org](http://ddhstaging.satapps.org) feed polling enabled: {unchecked} feed polling url: {blank} embed by username: ddhdatasets embed username key from feed: {blank} embed category: Data Discovery Hub Datasets embed post limit: 100 embed truncate: {unchecked} embed whitelist selector: {blank} embed blacklist selector: {blank} My site is a data catalog based on CKAN , pages are generated from templates. He…

[https://meta.discourse.org/t/403-error-embedding-comments/42923](https://meta.discourse.org/t/403-error-embedding-comments/42923)

> [@Embed Discourse comments on another website via Javascript](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963):
>
> Discourse has the ability to embed the comments from a topic in a remote site using a Javascript API that creates an IFRAME. For an example of this in action, check out [Coding Horror’s blog](http://blog.codinghorror.com/welcome-to-the-internet-of-compromised-things/#discourse-comments). The blog is run via [Ghost](https://ghost.org/) but the comments are embedded from his [Discourse forum](http://discourse.codinghorror.com/t/welcome-to-the-internet-of-compromised-things/3550). One important thing to note with this setup is that users have to navigate to your forum to post replies. This is intentional, as we feel that the posting interface on a Discourse forum is currently much richer than what we …

---

_[View the full topic](https://meta.discourse.org/t/discourseembed-does-not-match-recipient-window-origin/57737)._
