I noticed an issue with my (and the example) Twitch API project

I’ve been working through this project and I have a basic demo going right now using the 8 channels provided to us. I noticed that the feature i’ve implemented in order to view the channel’s twitch page is broken. When you click the name of the channel on my web app, it opens a new tab with the url of https://www.twitch.tv/[channel name here] BUT the page loads infinitely. Now if I take the same url and plug it into another tab, the page loads as it should. I found this weird, so I went into the project’s example and tested the same feature. Clicked the channel name, and what do you know? The page jumps to a new a tab is it should, opening up the channel’s twitch page BUT it does the exact same thing. It loads continuously without rendering anything.

Has this happened to anyone else? Could it be an issue with https??

link to my project

EDIT: Note that I have tested this locally, not on codepen, and the function works. It must be an issue with CORS and codepen. If anyone has any questions please post here I would like to discuss further.

1 Like

This is a known issue. I wracked my brains trying to figure out why mine was failing to properly load the Twitch pages as well, but came across a Reddit post that verified that it was an issue with Codepen.

Good to know i’m not going crazy!

Was just about to post a similar issue. For future reference, here’s some stack overflow articles discussing:

javascript - Loading the Facebook API in JSFiddle - Stack Overflow