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 not sure what the issue is at this point. I have tried changing up all the code and the file structure to ensure that there were no issues there. From all the searching, testing, and trials that I have done I can’t seem to find any solution to this issue on my end. I currently just have a super basic “Hello World” file set uploaded just to make sure none of my code was causing the issues and it doesn’t appear that it is.
Here is the error that is loading in my panels iframe:
404 Not Found
Code: NoSuchKey
Message: The specified key does not exist.
Key: hzviu132lbvm97jtmtmncrvtjc1ft1/0.0.1/c712cfb21f62a2e50d65f689e5414241/viewer.html
RequestId: B6E6C6E922895B0C
HostId: q940vpJg48pS9Sdb+jmf2n80vgEXV1bEf/dcnNKwH6kaUpWAtLsu98W0qUFl7N7KNnUR8zOoTTc=
Has anyone else encountered something like this and found a fix? I feel like I’m going crazy at this point.
It does say ensure “Files are placed in the root of the ZIP directory” in the “Hosted Test” section of the docs, I just glossed over that.
Glad I’m not the only one who ran into this though. Makes me feel less crazy
I’ve tried, this, but I’m still getting the exact same error. At this point my viewer.html and config.html don’t even link to any of my other assets, they just say “hello world”
But still same error :S
I made a folder called assets, and inside it placed my 2 html files. I then compressed them - then compressed the parent folder (assets.zip) and uploaded it to the Twitch cdn. No luck
Hi - I’m sorry to bump this but running into this issue as well.
I’m running an extension off of the boilerplate react template. I am able to run it successfully on the Rig. To upload it, I ran npm run build to create the dist folder. I then compress the dist folder and am able to upload the compressed zip file successfully.
When I go to install it on my channel, the panel fails to load. I get the same 404 error that the OP had.
I’ve tried using “yarn build” instead of npm and have checked the panel.html files for the helper extension script: <script src="https://extension-files.twitch.tv/helper/v1/twitch-ext.min.js"></script>.
To compress the folder I cd into the parent folder and enter zip -r dist.zip dist/. I’ve also tried going into the dist folder, selecting all the files, right clicking and choosing “compress.” Is there another way to zip files that you would suggest?
(Also, sorry if you were auto tagged because of your username, although I definitely appreciate the help )
Edit: It works!!! It seems like it started working after using the Archive.zip I got by going into the dist folder, selecting all the files, and right click-compressing that. @Dist thank you so much you are my hero.
Note, another reason for getting the NoSuchKey error and having all your dependency files result in 404 errors is using absolute paths instead of relative paths in host page elements that have properties that reference file paths. For example, if the SRC property of an included Javascript file has SRC="/javascripts/misc.js" then that won’t work. It should be SRC=“javascripts/misc.js”. Note the removal of the initial slash. This applies to all properties that reference other file elements including those for stylesheets, etc.
How is it not related? That’s the exact error you will get if you try to use absolute paths. That’s how I found this 7 month old post. By looking for that error. Are you saying that if there are multiple solutions to the exact same error message, that they should be on different threads?
The issue in this thread wasn’t that absolute paths were used instead of relative paths, it was that the build folder was zipped instead of just the contents. It has nothing to do with the paths used within the files themselves to reference other files.
The issue you are talking about is using absolute paths which wont work due to extensions not being hosted from the root path. Which has been documented many times elsewhere on both these forums, and the TwitchDev discord server as it’s a frequent issue for new extension developers.