we released a new Extension today.
Before releasing we tested our code with some development-products and it worked wonderful.
Now we released and changed the products to development: NO.
If we now try to to use Bits on Streamer who has installed the Extension, we just get a meesage: “Sorry, something went wrong”.
A look in the Network analysis shows: It calls https://api.twitch.tv/v5/bits/extensions/is-eligible/veve100
And this call returns with 500 - Internal Server Error.
We used the same code in another Extension and there it works great.
Has someone an idea what is wrong?
I’ve been investigating the documentation and this is because the channel can not receive bits, if I am not mistaken it seems that now any type of channel can install, so you should check if the channel is enabled to use bits, doing so you provide your experience to any kind of channel, to check this should be something like: twitch.ext.features.isBitsEnabled
Checking the Bits in Extensions Feature Flag
Extensions with Bits in Extensions features can be installed by all broadcasters, regardless of their ability to receive Bits on their channels. You can check the
twitch.ext.features.isBitsEnabled feature flag to determine if Bits in Extensions features will work in your extension on the current channel.
This flag may be false if:
- You did not enable Bits support in the Monetization tab in the Extensions manager.
- The broadcaster is not eligible to receive Bits.
- The broadcaster disabled Bits in Extensions features for your extension.
If this flag is
false , you should disable or hide the Bits in Extensions features in your extension. Better yet: build experiences that account for both eligible and ineligible channels.
Unfortunately there is no explanation with the 500 Internal Server Error http response.
I had this error many times, and here’s a list of reasons that will generate such error:
You have installed a release version that uses Bits, on a channel that is not Affiliate or Partner. You will get this error, even if you’re the developer, and even if you have Bits in your account.
You called useBits on an invalid SKU. Your SKU must be available, and “development” must be set to no IF you’re using a released extension. Development SKUs don’t work in release environment.
You had such an SKU, and you deprecated it.
In short, when I have this error (and I do, from time to time,) I first make sure I’m on my affiliate account, and I use getProducts() to get a list of SKUs. Make sure these two are valid for you.