[Bug]: Local API error 400 (bad request) and falling back to Invidious API when loading videos or searches
Guidelines
- [X] I have encountered this bug in the latest release of FreeTube.
- [X] I have encountered this bug in the official downloads of FreeTube.
- [X] I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
- [X] I have searched the documentation for information that matches the description of the bug I want to file, without success.
- [X] This issue contains only one bug.
Describe the bug
Freetube is working perfectly fine, but I keep getting these two errors when loading videos or searches, even when loading as a new window:
- Local API Error (Click to copy): Error: Request to https://www.youtube.com/youtubei/vtrue/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8&prettyPrint=false&alt=json failed with status 400
- Falling back to Invidious API
I believe these errors in the console are causing these error messages:
- renderer.js:2 VIDEOJS: WARN: using Vhs.BANDWIDTH_VARIANCE is UNSAFE be sure you know what you are doing
- www.youtube.com/youtubei/vtrue/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8&prettyPrint=false&alt=json:1 Failed to load resource: the server responded with a status of 400 ()
- Error: Request to https://www.youtube.com/youtubei/vtrue/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8&prettyPrint=false&alt=json failed with status 400
at Object.
(renderer.js:2:1334762) at Generator.next ( ) at a (renderer.js:2:876803) www.youtube.com/youtubei/vtrue/next?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8&prettyPrint=false&alt=json:1 - Failed to load resource: the server responded with a status of 400 ()
Am I the only one getting these errors, or is this something on YouTube's end?
Expected Behavior
No error messages when loading videos or searches.
Issue Labels
API issue
FreeTube Version
v0.19.1
Operating System Version
Windows 10 Pro 22H2
Installation Method
.exe
Primary API used
Local API
Last Known Working FreeTube Version (If Any)
No response
Additional Information
No response
Nightly Build
- [ ] I have encountered this bug in the latest nightly build.
I came here due to having this same issue, I have been using the latest release since the day it was released and have not had this problem until today, Suspecting something that YT has changed?
- [x] I have encountered this bug in the latest nightly build.
Tested on nightly-3891 and nightly-3981*.
Same, just started doing it around an hour ago. v0.19.1
Updated to a nightly build to see if this was fixed but seems too recent a bug. v0.19.1-nightly-3981 Beta
Same Issue
can confirm on Linux :3
Been having this one for the last while as per #4699 Not sure I have any useful information that isn't already listed, but I will mention that at least for me and for now the Invideous API seems to be functional.
I also noticed since this particular bug/issue, While searching for one particular search, If you want to search something else afterwards, You have to close Freetube completely to follow through with a new search, Otherwise the previous search results are still present.
Edit: This only causes an issue with Preferred API Backend set to use Local API, Changing to invidious API solves all of the above issues on my end.
you can solve this by changing your Invidius API (https://api.invidious.io/) and then setting your Preferred API Backend to Invidius API
this solved the 400 error for me
EDIT: most instances are still struggling with whatever changes must have happened
Not our code issue
Youtube change their response data in sw.js_data, it's not always the same (AB testing some stuff?)
Reported in https://github.com/LuanRT/YouTube.js/issues/602
Made an untested workaround - https://github.com/PikachuEXE/FreeTube/actions/runs/8000502141 Like nightly version use at your own risk and backup before using it It's for myself (don't ask me to add stuff to it, just make your own fork)
I'm seeing this on macos freetube version 0.19.1. It just started for me today. Yesterday was fine.
I am also seeing this happening today on Windows 11 and version 0.19.1 as well
Switching to "Invidius API" helps, but it's also not loading all the time.
I have the same problem
Stop bumping the post to say you have the same problem, unless you have something unique to add. Upvote the thread and follow.
We don't need emails for every single person using the app today. We're all seeing the same thing.
I haven't put it in my repository, but thanks to PikachuEXE the problem is solved
@Joel21 How did you do it. thanks
Guess I'll just uninstall...
Not our code issue Youtube change their response data in
sw.js_data, it's not always the same (AB testing some stuff?) Reported in LuanRT/YouTube.js#602Made an untested workaround - https://github.com/PikachuEXE/FreeTube/actions/runs/8000502141 Like nightly version use at your own risk and backup before using it It's for myself (don't ask me to add stuff to it, just make your own fork)
There is the solution
I solved this issue by. Settings > General Settings > chose Invidious API from 'Preferred API backend' and 'click' "Current Instance as Default" button.
if it slow just chose another 'invidious instance'.