question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to search videos

See original GitHub issue

This 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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
janplaehncommented, Oct 6, 2020

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!

0reactions
janplaehncommented, Oct 6, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't Use Search Bar For Videos. Any way to fix?
I found a fix. Clear your tiktok cache, delete tiktok, turn your phone off, turn it back on, download tiktok and then log...
Read more >
How to Troubleshoot YouTube Search Not Working?
It is quite simple – open Chrome and then press the Ctrl + Shift + N key combination. You will see a window...
Read more >
Top 13 Ways to Fix YouTube Search Is Not Working
What to Do if YouTube Search Is Not Working on Android or iPhone · 1. Check Your Internet Connection · 2. Close and...
Read more >
How to Fix YouTube Search Not Working
One common reason you can't use YouTube's search functionality is your app has a minor glitch. Other causes include an inactive internet ......
Read more >
How To Fix YouTube Search Not Working
Reboot your phone · Close the YouTube app and reopen it · Check your internet connection · Try searching with different keywords.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found