# Not see hosted assets on stream

**URL:** <https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162>\
**Category:** Extensions\
**Created:** [August 16, 2018, 10:31am UTC](https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162 "2018-08-16T10:31:18Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andy\_Andy](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Andy\_Andy](https://discuss.dev.twitch.com/u/Andy_Andy)\
**Post date:** [August 16, 2018, 10:31am UTC](https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162/1 "2018-08-16T10:31:19Z")

</div>

Hi all!

I created extension and set it. But it looks like (on Top Right corner):

 ![image](https://d2opxh93rbxzdn.cloudfront.net/original/2X/a/a30550f867da0b484622f57803c02aa4250022cd.jpg)

I moved to “Hosted Test” and in “Local Test” and had the same result:

 ![image](https://d2opxh93rbxzdn.cloudfront.net/original/2X/3/30e7428cd092d37d76f19201547a2fb6433dc007.png)

For **Assets** I used assets from **“Hello World app”** without any changes.  
For **zip archive** I used all files from **public** folder:

![image](https://d2opxh93rbxzdn.cloudfront.net/original/2X/d/d7b06c47d7200a21dcf0c435b1e9b166a9b5558b.png)  
And I tried to use only from local folder but result is the same:  
 ![image](https://d2opxh93rbxzdn.cloudfront.net/original/2X/5/5640528bffa2c4f0664a7ac27db66f903cde4c2d.png)

Could somebody please tell me what I am doing wrong?  
Nothing to help me.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 16, 2018, 11:46am UTC](https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162/2 "2018-08-16T11:46:35Z")

</div>

Sounds like you uploaded the zip with a folder in, instead of a zip with the files in as per

> [@\[SOLVED\] 404, The specified key does not exist](https://discuss.dev.twitch.com/t/solved-404-the-specified-key-does-not-exist/11921):
>
> So I have been working on a panel extension for my stream and I got past the local testing, everything was working fine. I uploaded the files in a .zip to Twitch. I followed all the guides, made sure to include the extension helper JS file, but I am getting a 404 error when it tries to load the extension files form the Twitch CDN. I have tried created a new extension and uploaded the example project that Twitch has in the documentation to see if the issue would still happened and it did. I’m no…

Also check chrome inspector for 404 errors when the content is attempted to be loaded.

Also check that the paths and names are set correctly in the extensions settings

---

<div class="post-metadata">

**Author:** ![Andy\_Andy](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Andy\_Andy](https://discuss.dev.twitch.com/u/Andy_Andy)\
**Post date:** [August 16, 2018, 1:11pm UTC](https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162/3 "2018-08-16T13:11:16Z")

</div>

Hi @BarryCarlyon,

no, I am uploading files without folder.

Hm, in Chrome Console I see error with csp config:

> Refused to load the script ‘[https://code.jquery.com/jquery-3.3.1.min.js](https://code.jquery.com/jquery-3.3.1.min.js)’ because it violates the following Content Security Policy directive: “script-src ‘self’ [https://q5df5besbaqdzm2eayvv2hssnn1ldpt.ext-twitch.tv](https://q5df5besbaqdzm2eayvv2hssnn1ldpt.ext-twitch.tv) [https://extension-files.twitch.tv](https://extension-files.twitch.tv)”.

Maybe you know way how to configure csp?

---

<div class="post-metadata">

**Author:** ![LuckyNoS7evin](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/luckynos7evin/32/5036_2.png) [@LuckyNoS7evin](https://discuss.dev.twitch.com/u/LuckyNoS7evin)\
**Post date:** [August 16, 2018, 1:22pm UTC](https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162/4 "2018-08-16T13:22:53Z")

</div>

All js, css and html should be hosted on the Twitch CDN. basically include a local copy of jquery

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 16, 2018, 1:39pm UTC](https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162/5 "2018-08-16T13:39:59Z")

</div>

> [@Andy\_Andy](#):
>
> Maybe you know way how to configure csp?

You can’t Twitch owns that

> [@LuckyNoS7evin](#):
>
> All js, css and html should be hosted on the Twitch CDN. basically include a local copy of jquery

Is correct, see also

> **[Extensions Guidelines & Policies](https://dev.twitch.tv/docs/extensions/guidelines-and-policies/)**
>
> Extensions Guidelines and Policies

> 1. Include all JavaScript and CSS files in the extension’s uploaded assets.
> 2. JavaScript files submitted for review can be minified but must not be obfuscated.

And the section regarding `Content Security Policies`

---

<div class="post-metadata">

**Author:** ![Andy\_Andy](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Andy\_Andy](https://discuss.dev.twitch.com/u/Andy_Andy)\
**Post date:** [August 16, 2018, 3:02pm UTC](https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162/6 "2018-08-16T15:02:13Z")

</div>

Hi @LuckyNoS7evin ,  
Sorry what do you mean “hosted on the Twitch CDN”?  
How I can do it?

---

<div class="post-metadata">

**Author:** ![LuckyNoS7evin](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/luckynos7evin/32/5036_2.png) [@LuckyNoS7evin](https://discuss.dev.twitch.com/u/LuckyNoS7evin)\
**Post date:** [August 16, 2018, 3:15pm UTC](https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162/7 "2018-08-16T15:15:25Z")

</div>

When you upload your html files include the us and CSS files with that.

---

<div class="post-metadata">

**Author:** ![Andy\_Andy](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Andy\_Andy](https://discuss.dev.twitch.com/u/Andy_Andy)\
**Post date:** [August 16, 2018, 3:50pm UTC](https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162/8 "2018-08-16T15:50:16Z")

</div>

@Morel @BarryCarlyon  
Aa ok, I put all my assets in .zip.

And now I make button in html and event handler in file config.js (in Twitch CDN).  
But it tells me:

`Refused to execute inline event handler because it violates the following Content Security Policy directive: "script-src 'self' https://q5df5bsbaqzml2eayvv29hsnn1ldpt.ext-twitch.tv https://extension-files.twitch.tv". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.`

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 16, 2018, 4:17pm UTC](https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162/9 "2018-08-16T16:17:12Z")

</div>

Sounds like you have some inline JS where all script needs to be `<script src="" />` as per the CSP guidelines I linked to

---

<div class="post-metadata">

**Author:** ![Andy\_Andy](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Andy\_Andy](https://discuss.dev.twitch.com/u/Andy_Andy)\
**Post date:** [August 16, 2018, 4:24pm UTC](https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162/10 "2018-08-16T16:24:52Z")

</div>

@BarryCarlyon  
yes, in html I have:

> ```
> <script src="./config.js"></script> 
> <button onclick='handler()'>Test</button>
> 
> ```

and in config.js:

> function handler(){  
> twitch.rig.log(‘test’);  
> }

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 16, 2018, 4:45pm UTC](https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162/11 "2018-08-16T16:45:40Z")

</div>

> [@Andy\_Andy](#):
>
> \<button onclick=‘handler()’\>Test\</button\>

Can’t do that ^^

Have to create/bind the click events in JS instead of via onClick

---

<div class="post-metadata">

**Author:** ![Andy\_Andy](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Andy\_Andy](https://discuss.dev.twitch.com/u/Andy_Andy)\
**Post date:** [August 16, 2018, 4:49pm UTC](https://discuss.dev.twitch.com/t/not-see-hosted-assets-on-stream/17162/12 "2018-08-16T16:49:21Z")

</div>

Aaa sure, I will use js framework for development. 🙂

Thank you for help guys, very much! 🤜🤛  
@BarryCarlyon @Morel
