Pages Menu
TwitterRssFacebook

Posted by on Oct 11, 2020 in Everything Else

How to: Fix “Something went wrong” error in YouTube Live Streaming

This blog post is pretty unrelated to what I normally talk about, but I had this problem, didn’t find the resolution on the web anywhere, and then was able to fix it, so I thought it might be useful to someone.

I’m talking about this error: which you see when trying access the Live Streaming page in YouTube Studio:

Specifically, some part of the page load is failing with a 500 error: could not fetch broadcast {0}.

It doesn’t seem to matter how many times you refresh, Private Browser or whatever, always the same.

What is it?

Well, I don’t really know what exactly causes it, because I’m not YouTube and they have chosen not to add any super-clear error messages about this. BUT… I’d been playing around with steaming keys, creating and deleting them whilst testing different resolutions and bit rates. So, I wondered if maybe I had messed up the keys somehow. What if there was a way to just delete the keys, all the way back to the Default stream key, and start again.

I managed to find a way to delete all the keys I’d created, which for me fixed the problem and meant that the Live Streaming page loaded OK again.

Disclaimer: this fixed my problem, it might not fix yours. This isn’t official advice from YouTube or anything like that, it’s just something I tried which worked out. This will delete streaming keys: if you don’t know what that means, don’t do this. Think of the content in the post as interesting ideas, not instructions.

Here’s how

It turns out that YouTube has a Live Streaming API. Even better, they have a nice interactive Reference section as well, meaning that making a few API calls doesn’t involve a whole load of messing around and set up. Nice!

First, there’s a call to list out all the video streams you have. “Video Streams” are referred to on the YouTube Live Streaming page as “Stream keys”. Navigate to the LiveStreams:list page:

Notice the “Try this API” section on the right. This will enable us to quickly make some API calls.

Click the list (my streams) link in the middle of the page, which will auto-populate the “Try this API” section with the correct details. Make sure that both check-boxes in the Credentials section are ticked, and then click Execute.

You’ll be asked to authenticate and approve in a popup window, and then you’ll see the results of the API call shown underneath the Execute button. The banner should be green and it should say 200.  200 means everything is good:

This is the response from the API, and it’s in JSON format. To make it easier to read, copy it into a JSON viewer, such as this one.

You can see that I have two streaming keys. This screenshot was taken after I fixed the problem – before that I had 4 keys. Because I’d been changing them around a lot, I figured maybe that was the problem, so I chose to delete them.

You can delete keys using the API. Navigate to the LiveStreams.delete page:

This time, copy the id from the JSON that you want to delete and paste it into the id field in the “Try this API” section. Click Execute, approve, and you’re done. Again, green banner is good. This time, 204 means everything is OK.

I deleted all my keys apart from the Default stream key. After doing this, I reloaded the Livestreaming page again, and it loaded OK!

I hope this was useful and helped solve your problem. If it did, say thanks by subscribing to my channel to see what videos I’m live streaming, now that I’m all fixed up and ready to go!

Written by Tom Morgan

Tom is a Microsoft Teams Platform developer and Microsoft MVP who has been blogging for over a decade. Find out more.
Buy the book: Building and Developing Apps & Bots for Microsoft Teams. Now available to purchase online with free updates.

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.