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.

Error in loading item ytsearch:

See original GitHub issue
21:00:24.145 [lava-daemon-pool-info-loader-2-thread-1] ERROR com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager - Error in loading item ytsearch: sis
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something went wrong when looking up the track
	at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:43)
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.dispatchItemLoadFailure(DefaultAudioPlayerManager.java:237)
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:226)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.sedmelluq.discord.lavaplayer.tools.OrderedExecutor$ChannelRunnable.executeQueue(OrderedExecutor.java:98)
	at com.sedmelluq.discord.lavaplayer.tools.OrderedExecutor$ChannelRunnable.run(OrderedExecutor.java:87)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "String.split(String)" because "durationText" is null
	at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:57)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSearchProvider.loadSearchResult(YoutubeSearchProvider.java:74)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager$LoadingRoutes.search(YoutubeAudioSourceManager.java:254)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager$LoadingRoutes.search(YoutubeAudioSourceManager.java:220)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeLinkRouter.route(DefaultYoutubeLinkRouter.java:34)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItemOnce(YoutubeAudioSourceManager.java:188)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItem(YoutubeAudioSourceManager.java:127)
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:437)
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:419)
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:218)
	... 6 common frames omitted
Caused by: java.lang.NullPointerException: Cannot invoke "String.split(String)" because "durationText" is null
	at com.sedmelluq.discord.lavaplayer.tools.DataFormatTools.durationTextToMillis(DataFormatTools.java:91)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSearchProvider.extractPolymerData(YoutubeSearchProvider.java:161)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSearchProvider.lambda$polymerExtractTracks$0(YoutubeSearchProvider.java:149)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1510)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSearchProvider.polymerExtractTracks(YoutubeSearchProvider.java:148)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSearchProvider.extractSearchResults(YoutubeSearchProvider.java:94)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSearchProvider.loadSearchResult(YoutubeSearchProvider.java:71)
	... 14 common frames omitted

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
caneleexcommented, Sep 17, 2020

it doesn’t work in maven

i forgot you have to use com.github.sedmelluq as the group (in gradle) or group id (in maven)

0reactions
Mrtolcommented, Sep 17, 2020

you have to use commit bec3995 as the lavaplayer version as sed hasn’t released a new release which fixes this (#495). you have to add jitpack.io as your maven repo to be able to use the commit (or respectively any commit) as the version.

gradle example:

repositories {
    jcenter() // repo for other dependencies
    maven { url 'https://jitpack.io' } // required to be able to use commits as dependencies' version
}

dependencies {
   implementation group: 'com.sedmelluq', name: 'lavaplayer', version: 'bec3995'
}

image

image

it doesn’t work in maven

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix this syntax error on my Try and Except
YDL_OPTIONS) as ydl: try: info = ydl.extract_info("ytsearch:%s" % item, download=False)['entries'[0]] except Exception as e: return False ...
Read more >
yt-search - npm
Start using yt-search in your project by running `npm i yt-search`. There are 177 other projects in the npm registry using yt-search.
Read more >
yt-dlp(1) - Arch manual pages
The default value "fixup_error" repairs broken URLs, but emits an error if this is not possible instead of searching; --ignore-config: Don't load any...
Read more >
lavaplayer - Bountysource
Lavaplayer was no longer able to load YouTube tracks after a day of use ... DefaultAudioPlayerManager - Error in loading item ytsearch:blueberry faygo...
Read more >
How to download multiple videos in one search? - Ask Ubuntu
$ youtube-dl --playlist-items 1-10 'ytsearch:football' [youtube:search] query "football": Downloading page 1 [download] Downloading playlist: ...
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