# \[SOLVED\] Embedded web chat can't receive any messages

**URL:** <https://discuss.dev.twitch.com/t/solved-embedded-web-chat-cant-receive-any-messages/3371>\
**Category:** Chat and IRC\
**Created:** [September 18, 2015, 3:22am UTC](https://discuss.dev.twitch.com/t/solved-embedded-web-chat-cant-receive-any-messages/3371 "2015-09-18T03:22:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pokemon\_Realtime](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@Pokemon\_Realtime](https://discuss.dev.twitch.com/u/Pokemon_Realtime)\
**Post date:** [September 18, 2015, 3:22am UTC](https://discuss.dev.twitch.com/t/solved-embedded-web-chat-cant-receive-any-messages/3371/1 "2015-09-18T03:22:10Z")

</div>

Hi, I’ve been trying to embed a Twitch chat window on my website, and I can successfully connect my Twitch account and send messages, but I don’t receive any messages at all. I’ve confirmed this by having the same channel chat open on the main [Twitch.tv](http://Twitch.tv) website and I can see my own messages being sent to the channel.

I see the following errors from Google Chrome, would it be related?

Uncaught SecurityError: Blocked a frame with origin “[http://www.twitch.tv](http://www.twitch.tv)” from accessing a frame with origin “[http://www.pokemonrealtime.com.usrfiles.com](http://www.pokemonrealtime.com.usrfiles.com)”. The frame requesting access set “document.domain” to “[twitch.tv](http://twitch.tv)”, but the frame being accessed did not. Both must set “document.domain” to the same value to allow access.t.default.Instrumentation.subscribe.after @ emberchat-5adff9118db163bbca272d91c2293158.js:32(anonymous function) @ emberchat-5adff9118db163bbca272d91c2293158.js:6V @ emberchat-5adff9118db163bbca272d91c2293158.js:7i @ emberchat-5adff9118db163bbca272d91c2293158.js:6i.default.defineModel.setHostMode @ emberchat-5adff9118db163bbca272d91c2293158.js:34(anonymous function) @ emberchat-5adff9118db163bbca272d91c2293158.js:34(anonymous function) @ global-b109f1a01daeb967794b7fc48447c97b.js:15f @ global-b109f1a01daeb967794b7fc48447c97b.js:15l.fireWith @ global-b109f1a01daeb967794b7fc48447c97b.js:15i.(anonymous function) @ global-b109f1a01daeb967794b7fc48447c97b.js:15(anonymous function) @ tmi-v3.rd56974791049e4c4aaa8482ac4b4922a02063671.js:2f @ global-b109f1a01daeb967794b7fc48447c97b.js:15l.fireWith @ global-b109f1a01daeb967794b7fc48447c97b.js:15i.(anonymous function) @ global-b109f1a01daeb967794b7fc48447c97b.js:15f @ global-b109f1a01daeb967794b7fc48447c97b.js:15l.fireWith @ global-b109f1a01daeb967794b7fc48447c97b.js:15x @ global-b109f1a01daeb967794b7fc48447c97b.js:16t @ global-b109f1a01daeb967794b7fc48447c97b.js:16  
global-b109f1a01daeb967794b7fc48447c97b.js:30 TMI.js [irc] WARNING: Could not parse IRC message: CAP.  
global-b109f1a01daeb967794b7fc48447c97b.js:30 TMI.js [irc] WARNING: Could not parse IRC message: GLOBALUSERSTATE.  
global-b109f1a01daeb967794b7fc48447c97b.js:30 TMI.js [irc] WARNING: Could not parse IRC message: 353.  
global-b109f1a01daeb967794b7fc48447c97b.js:30 TMI.js [irc] WARNING: Could not parse IRC message: 366.  
global-b109f1a01daeb967794b7fc48447c97b.js:30 TMI.js [irc] WARNING: Could not parse IRC message: CAP.  
global-b109f1a01daeb967794b7fc48447c97b.js:30 TMI.js [irc] WARNING: Could not parse IRC message: GLOBALUSERSTATE.

---

<div class="post-metadata">

**Author:** ![matt\_thomas](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/matt_thomas/32/710_2.png) [@matt\_thomas](https://discuss.dev.twitch.com/u/matt_thomas)\
**Post date:** [September 18, 2015, 4:06am UTC](https://discuss.dev.twitch.com/t/solved-embedded-web-chat-cant-receive-any-messages/3371/2 "2015-09-18T04:06:26Z")

</div>

How are you trying to embed the chat? What code are you using?

The exact reason why it’s not working is almost definitely related to the error:  
**"Uncaught SecurityError: Blocked a frame with origin “[http://www.twitch.tv](http://www.twitch.tv)”** from accessing a frame with origin “[http://www.pokemonrealtime.com.usrfiles.com](http://www.pokemonrealtime.com.usrfiles.com)”. The frame requesting access set “document.domain” to “[twitch.tv](http://twitch.tv)”, but the frame being accessed did not. Both must set “document.domain” to the same value to allow access.t.default.Instrumentation.subscribe.after …"

---

<div class="post-metadata">

**Author:** ![Fugiman](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/fugiman/32/108_2.png) [@Fugiman](https://discuss.dev.twitch.com/u/Fugiman)\
**Post date:** [September 18, 2015, 9:00am UTC](https://discuss.dev.twitch.com/t/solved-embedded-web-chat-cant-receive-any-messages/3371/3 "2015-09-18T09:00:30Z")

</div>

None of those errors seem unexpected to me. Do you have a demo or further debugging steps?

---

<div class="post-metadata">

**Author:** ![Pokemon\_Realtime](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@Pokemon\_Realtime](https://discuss.dev.twitch.com/u/Pokemon_Realtime)\
**Post date:** [September 18, 2015, 10:22am UTC](https://discuss.dev.twitch.com/t/solved-embedded-web-chat-cant-receive-any-messages/3371/4 "2015-09-18T10:22:33Z")

</div>

I embed the chat exactly as it states in the documentation, with an iframe:

[https://github.com/justintv/Twitch-API/blob/master/embedding.md#chat](https://github.com/justintv/Twitch-API/blob/master/embedding.md#chat)

My website is hosted by [Wix.com](http://Wix.com) and their website editor. I do know that all of their user-customizable JavaScript code lives within an iframe running under the domain [yourdomain.com.usrfiles.com](http://yourdomain.com.usrfiles.com)

However, I specify just [yourdomain.com](http://yourdomain.com) in the Twitch redirect URI. Would this be the cause of the cross-domain errors? I did see in the Twitch chat JavaScript that it does window.parent in a few places.

---

<div class="post-metadata">

**Author:** ![Pokemon\_Realtime](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@Pokemon\_Realtime](https://discuss.dev.twitch.com/u/Pokemon_Realtime)\
**Post date:** [September 18, 2015, 10:23am UTC](https://discuss.dev.twitch.com/t/solved-embedded-web-chat-cant-receive-any-messages/3371/5 "2015-09-18T10:23:20Z")

</div>

My demo can be seen at [www.pokemonrealtime.com](http://www.pokemonrealtime.com)

What’s strange is that it has worked fine once or twice and I would receive messages, but now I can’t seem to get it to work again, and I haven’t changed any code.

---

<div class="post-metadata">

**Author:** ![Fugiman](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/fugiman/32/108_2.png) [@Fugiman](https://discuss.dev.twitch.com/u/Fugiman)\
**Post date:** [September 18, 2015, 8:11pm UTC](https://discuss.dev.twitch.com/t/solved-embedded-web-chat-cant-receive-any-messages/3371/6 "2015-09-18T20:11:22Z")

</div>

Please make sure to use the lowercase version of the name: `papaplatte`, not `Papaplatte`. If you’re using the API to populate the embeds, use `login`, not `display_name`.

---

<div class="post-metadata">

**Author:** ![Pokemon\_Realtime](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@Pokemon\_Realtime](https://discuss.dev.twitch.com/u/Pokemon_Realtime)\
**Post date:** [September 19, 2015, 12:34am UTC](https://discuss.dev.twitch.com/t/solved-embedded-web-chat-cant-receive-any-messages/3371/7 "2015-09-19T00:34:37Z")

</div>

That solved it! Thank you so much!

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [October 19, 2015, 12:34am UTC](https://discuss.dev.twitch.com/t/solved-embedded-web-chat-cant-receive-any-messages/3371/8 "2015-10-19T00:34:56Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
