[SOLVED] Getting 404 for hosted config.html asset

The image below contains all the relevant information. I have verified that it works correctly on the developer rig using the same files, but for some reason uploading the ZIP file with the same assets results in the config not loading when I test the extension and I see that 404 for the html in Chrome dev tools.

Any help would be greatly appreciated, thanks!

Are you zipping that PlayerCard folder? The files have to be at the root of the zip or otherwise the HTML files will be in a different path on Twitch’s CDN to where it’s actually trying to load them from.

1 Like

Yes, I am zipping that PlayerCard folder exactly as shown

In that case just zip the 4 files directly, and upload the zip again to Twitch and it should work :slight_smile:

You can still use folders for your assets, it’s just the HTML files that need to be at the root of the zip so that they’re at the correct path on Twitch’s CDN when unzipped, those HTML files can reference JS, CS, Images etc… within folders perfectly fine.

Sorry, to be more clear, I am zipping the 4 files directly. In that picture, I am zipping the “PlayerCard” folder, and uploading that zip.

Ah sorry I misunderstood, in that case I’m not sure why it would be 404’ing. The only thing I can suggest then to is to try again later, maybe there was an issue on Twitch’s end (which I’ve seen happen once before with asset uploads).

1 Like

Sorry to see you’re having challenges. Are any of the other files showing up?

Thanks for the fast responses. I’ve been trying again just uploading the same ZIP folder every so often, and it finally loads the html file but now gives aborted 404s for the other contents. Thanks for the help

For reference, Archive.zip (the file that was uploaded) is the contents around it (config*, panel*, and fonts/) zipped up

You need to use relative urls (not absolute) to load your css and js

As your zip is uploaded to a sub folder of the extensions domain. (Something like extensionsdomain.twitch.tv/extensionversion/yourfiles)

Thanks for the response. Using relative URLs I believe, like so:

That’s an absolute url. As it starts with a / instead of declaring a path “relative” to the HTML file.

It should be

<script type="text/javascript" src="config.js"></script>
1 Like

Holy cow, thanks so much Barry, I should’ve included that HTML from the start. Have an awesome day :slight_smile: :+1: