Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suspicious exception for playback of xyz. This video is not available #56

Closed
Veqtive opened this issue Sep 26, 2024 · 6 comments
Closed

Comments

@Veqtive
Copy link

Veqtive commented Sep 26, 2024

Version of youtube-source: 1.8.2
The search query, URL, playlist or video ID that triggered the issue:
for example: https://www.youtube.com/watch?v=dQw4w9WgXcQ (But basicly any video, also with ytsearch)
Code Example:

// Init in Main
this.playerManager = new PlayerManager();
YoutubeAudioSourceManager ytSourceManager = new YoutubeAudioSourceManager(/*allowSearch:*/ true, new Client[] {
    new MusicWithThumbnail(), new WebWithThumbnail(), new AndroidTestsuiteWithThumbnail()
});
//ytSourceManager.useOauth2(null, false);
ytSourceManager.useOauth2(Config.YTOAUTH, true);
audioPlayerManager.registerSourceManager(ytSourceManager);
AudioSourceManagers.registerRemoteSources(playerManager, dev.lavalink.youtube.YoutubeAudioSourceManager.class);

// AudioLoadResult
	@Override
	public void trackLoaded(AudioTrack track) {
	    Queue queue = controller.getQueue();
	    if (position == null || position >= queue.getQueuelist().size()) {
	        queue.addTrack(track);
	    } else if (position == 0) {
	        controller.getPlayer().playTrack(track);
	    } else {
	        queue.addTrackAtPosition(track, position);
	    }
	}

// PlayerManager
	public void loadAndPlay(TextChannel channel, String trackUrl, User user) {
        MusicController controller = getController(channel.getGuild().getIdLong());

        Main.INSTANCE.audioPlayerManager.loadItemOrdered(controller, trackUrl, new AudioLoadResultHandler() {
            @Override
            public void trackLoaded(AudioTrack track) {
                controller.getQueue().addTrack(track);
            }

Exception and Stacktrace:

20:38:06.209 [lava-daemon-pool-playback-1-thread-1] DEBUG com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor - Common failure for playback of dQw4w9WgXcQ: This video is not available

and

2024-09-26 11:41:45.154 [lava-daemon-pool-playback-1-thread-1] �[31m[WARN ]�[0;39m c.s.d.l.t.p.LocalAudioTrackExecutor - Suspicious exception for playback of dQw4w9WgXcQ
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: This video is not available
	at dev.lavalink.youtube.track.YoutubeAudioTrack.process(YoutubeAudioTrack.java:102)
	at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:109)
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$2(DefaultAudioPlayerManager.java:339)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1570)
@devoxin devoxin transferred this issue from lavalink-devs/lavaplayer Sep 26, 2024
@devoxin
Copy link
Member

devoxin commented Sep 26, 2024

I have transferred your issue to youtube-source as it's predominantly based around problems with YouTube.
Please could you edit your issue with the additional information requested in our issue template.

Additionally, for the Twitch issues, please open a separate issue on the Lavaplayer repository. Make sure to provide the identifier of the channel you are having issues loading.

@xthesebx
Copy link

Switching to this worked for me:
new YoutubeAudioSourceManager(true, new WebWithThumbnail(), new AndroidMusicWithThumbnail(), new TvHtml5EmbeddedWithThumbnail(), new MusicWithThumbnail())
web client and music client seem broken

@Veqtive
Copy link
Author

Veqtive commented Sep 27, 2024

Can confirm. After changing part of my code from this issue and then using your suggestion, YouTube Playback works again.

@xthesebx
Copy link

btw. this issue also somehow broke another sourcemanager for me, so maybe this was at fault for your twitch issue too

@Kascald
Copy link

Kascald commented Sep 28, 2024

I tried applying the constructor settings in the comment above, but it failed.
but this changes worked.
thx to @xthesebx. you gave me a hint!

[before]
// allowSearch: true , allowDirectVideoIds: true , allowDirectPlaylistIds: true...
new YoutubeAudioSourceManager(true, true, true,
new Client[]{
new Music(),
new Web(),
new AndroidTestsuite()
});

[after]
new YoutubeAudioSourceManager(true);

I tried playing youtube source

@HagarJNode HagarJNode mentioned this issue Sep 28, 2024
5 tasks
@devoxin
Copy link
Member

devoxin commented Oct 19, 2024

Closing as stale. For anyone who stumbles upon this issue, update your client list.

@devoxin devoxin closed this as completed Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants