streamlink-twitch-gui: `/helix/channels` is returning a 500 Internal Server Error response (stream lists don't load / are empty)
There’s currently an outage on the Twitch API and it returns 500 error codes (Internal Server Error) on the /helix/channels API endpoint which is required for querying certain channel data. This affects all stream lists, like top streams, followed streams, followed channels, etc.
As I already mentioned on Gitter/Matrix, this is caused when requesting more than 6 broadcaster_ids on the /helix/channels API endpoint. 7 or more returns in an error code 500.
https://gitter.im/streamlink/streamlink-twitch-gui?at=625475f1257a35782572b131
I can fix this here by limiting the number of IDs in a single request, which would increase the number of requests that need to be made to the API. Since API requests are rate limited, this is not good, but the limit is high enough so that this shouldn’t be a problem.
I’ll push a workaround soon.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 9
- Comments: 20 (7 by maintainers)
I have reported this on the twitchdev/issues repo as well as the twitch dev forums, and there’s been a response already 50 minutes ago or so
I’ve pushed the
temp-workaround-issue-887branch to the repo which you can build the app from (see 868b777a83232a66100fa4e3ddd97ce4d38c5893).This limits the number of
broadcaster_idparameters of each/helix/channelsAPI request to at most 1. Requesting only one ID seems to be stable and doesn’t cause any status code 500 responses.This is however incredibly stupid and inefficient, and it’s not how the API endpoint is supposed to be used. Usually up to 100 IDs will get queried in one go. Remember that the Twitch API is rate limited, so browsing lots of streams/channels will make a single
/helix/channelsAPI request for every stream/channel item that gets shown (unless the data has already been cached), and this may result in running into the max-API-requests-per-minute limitation.Build instructions can be found as usual here, but I’ll post them here as well: https://github.com/streamlink/streamlink-twitch-gui/blob/master/CONTRIBUTING.md#developing-and-building
Be aware that this includes the latest changes of the
masterbranch (git history), which has bumped the NW.js version to 0.62, which means if you go back (downgrade) to 2.0.0, then you will run an older NW.js version after having upgraded the local NW.js app config by running this version, which could cause issues. Back up your Streamlink Twitch GUI config directory first, aka the app’s user-data-directory: https://github.com/streamlink/streamlink-twitch-gui/wiki/Parameters#user-data-directoryThat’s all I can do for now. It’s up to Twitch to fix this. If they don’t fix this any time soon, then I will probably have to apply these changes permanently or remove the features that rely on data that is read from the broken API endpoint, but I doubt that this will be necessary. Depending on their work schedule though, it is unknown when this API issue will be fixed, so be patient.
Quick update… Twitch is now returning this instead of error code 500
but it’s not reliable/deterministic. Sometimes it returns data, sometimes it does not. Tested this by querying the same IDs multiple times.
I’ve opened an issue on the twitchdev/issues repo. I am not sure though if any Twitch devs will notice, because they haven’t been particularly active over there in the past. This issue may also need to be reported on their dev forums.
Looks like the API issue has been resolved by Twitch. Closing the thread and deleting the workaround branch…
Seems to work again.
This helped heaps, thank you!
You also don’t need that part when using Chatterino to start streams via Streamlink.
You need to set the preferred quality in Chatterino.
That has nothing to do with Streamlink Twitch GUI though. That’s just Chatterino directly adressing Streamlink which you have installed because Streamlink Twitch GUI needs it. So it’s less of a workaround and more of another way of using Streamlink which for example you could also do via command prompt.
I’m experiencing similar issues (error code 500, no lists populating, unable to display the streamer page) and I’ve been opening streams manually by using Chatterino with the Streamlink Twitch GUI (STG) installed.
Hope this might help someone!
Looks like it is in fact not caused by the number of requested
broadcaster_ids. This seems to be caused by certain IDs themselves, so this might be an issue with their database cluster and internal network. I’m afraid I can’t add a workaround.