I can't make the extensions to work

Hello all and thanks for your time.

I’m having a hard time (near frustration) to get all of this working, probably due to misunderstanding the documents.

Let’s go step by step:

0- I’m on Windows 10

1- I’ve downloaded the rig, installed node and yarn.
2- I’ve configured the environment vars
3- Configured hosts file
4- Started the rig using yarn start

Everything goes well so far, I can access the dev rig through https://localhost.rig.twitch.tv:3000/

Now comes the problem which is really starting to piss me off since I can’t understand how all of this works despite having read the docs a LOT of times in case I’ve just missed something.

I want to create an extension. I’ve downloaded the hello world sample, I’ve used yarn extension-init / yarn host to try to make this sample extension to at least get listed on the extension views. I’ve configured the testing base uri a bazillion times following the docs but still I can’t see the extension when I open the dev-rig.

I’ve tried also to get the boilerplate but I need to install docker / docker-compose which, for me, is just too much software already to make this work, it cannot be this way.

I have a Windows Server running my website from which I was going to create the Web Services to communicate with my extension. Is this what you guys call a EBS, right?

Basically, I don’t understand how to add an extension to this dev-rig and to make it work so I can start testing. I don’t need a boilerplate nor a sample, I can just do it myself from scratch, but I just need to figure out how to make the dev-rig to “recognize” the extension.

Could you guys please point me in the right direction? It seems that I’m just plain stupid to understand this.

Thanks!

Let’s break some of this down!

Have you created an Extension on the dev site? https://github.com/twitchdev/developer-rig#create-an-extension-on-the-twitch-dev-site

When you have created one, you need the client id and several other fields to be passed as environment variables: https://github.com/twitchdev/developer-rig#developer-rig-configuration

An Extension has two components, a front end and a back end. Both must be accessible over HTTPS to be loaded into the Developer Rig.

The five Developer Rig variables are:

  • EXT_CLIENT_ID
  • EXT_SECRET
  • EXT_VERSION
  • EXT_CHANNEL
  • EXT_OWNER_NAME

The first three can be obtained from the dev site. Also ensure that the testingbaseuri in the dev site matches the URI for your locally hosted assets.

1 Like

Hi @rbartlet, thank you very much for your reply!

Yep, I’ve created the extension and the environment variables are configured as well.

Now that you mentioned I’m not exactly sure, and sorry for this noobish question, what should I write into the Testing Base Uri. If the dev-rig is running on https://localhost.rig.twitch.tv:3000/ and the extension is located at %root-repository%/test/ and I have there one file called test.html (it has the extension helper and all that stuff in the HTML code) what should the test uri be? This one? https://localhost.rig.twitch.tv:3000/test/

I have to mention that the paths for every view is test.html as well.

Edit: Just to add more info. I’ve configured a local IIS server running at http://localhost:8081/ and put the assets there (http://localhost:8081/test/test.html), then I went into the dev portal, configured the URI to http://localhost:8081/test/ just to try something else and still is “not working”. What I do notice though is that i’m getting a 404 from https://api.twitch.tv/v5/extensions/XXX/auth/refresh/rigtesting, maybe this could be the problem? Not sure how to fix it though.

Note: XXX is my client id and rigtesting is the EXT_CHANNEL

Well, I managed to make it work. I’ve setted up the IIS on localhost to host the frontend assets, created a self-certificate for HTTPS and it worked. What I’m not getting though is why when the assets where on the dev-rig it didn’t work.

that is due to our content security policy for extensions - assets must be hosted with a cert.

the rig uses the same libraries that the twitch website does. we did this to provide an experience as close to the actual production system as possible so there are no surprised when you move from the rig to production.

Thank you very much for your answer dave and thanks to all the Twitch Staff for allowing us to create extensions to improve viewers experience!

Thank YOU for your feedback and using the rig! Looking forward to the extension you build :slight_smile:

1 Like