Unable to search videos
See original GitHub issueThis problem came up recently, when calling YoutubeClient.SearchVideosAsync(), even though no change has been made to the code and things used to work just fine. Maybe there’s been some change on Youtube’s side?
(Filename: Assets/YoutubeSearcher.cs Line: 71)
Newtonsoft.Json.JsonReaderException: Error reading JToken from JsonReader. Path ‘’, line 0, position 0. at Newtonsoft.Json.Linq.JToken.ReadFrom (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings) [0x0005c] in <d47de75a7e3f422ca4ca64a654c80495>:0 at Newtonsoft.Json.Linq.JToken.Load (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings) [0x00000] in <d47de75a7e3f422ca4ca64a654c80495>:0 at Newtonsoft.Json.Linq.JToken.Parse (System.String json, Newtonsoft.Json.Linq.JsonLoadSettings settings) [0x0000c] in <d47de75a7e3f422ca4ca64a654c80495>:0 at Newtonsoft.Json.Linq.JToken.Parse (System.String json) [0x00000] in <d47de75a7e3f422ca4ca64a654c80495>:0 at YoutubeExplode.Internal.Parsers.PlaylistAjaxParser.Initialize (System.String raw) [0x00001] in C:\Users\janpl\Documents\Unity Projects\stereodriver\Assets\Scripts\YoutubeExplode\Internal\Parsers\PlaylistAjaxParser.cs:83 at YoutubeExplode.YoutubeClient+<GetPlaylistAjaxParserForSearchAsync>d__17.MoveNext () [0x000d4] in C:\Users\janpl\Documents\Unity Projects\stereodriver\Assets\Scripts\YoutubeExplode\YoutubeClient.cs:173 — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <567df3e0919241ba98db88bec4c6696f>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <567df3e0919241ba98db88bec4c6696f>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <567df3e0919241ba98db88bec4c6696f>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <567df3e0919241ba98db88bec4c6696f>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0 at YoutubeExplode.YoutubeClient+<SearchVideosAsync>d__22.MoveNext () [0x00072] in C:\Users\janpl\Documents\Unity Projects\stereodriver\Assets\Scripts\YoutubeExplode\YoutubeClient.Search.cs:21
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
True, completely forgot I was using an older version, in order to use YoutubeExplode with Unity (which doesnt support c#8). Sorry for posting the issue with the old version I am using. By the way, I managed to fix the issue myself in the old version, as I cannot upgrade or my project will break in Unity.
Thanks for the help anyways! I am super thankful for this project! Keep it up!
There’s actually a few more things like for example switch expressions or using declarations. When I import the newest version of the library I’m actually getting 403 Errors. So I just used the older version instead of going through all of these errors and trying to fix them.