jagrosh / jagrosh/MusicBot

[Bug Report] Timeout preventing videos from loading

Open
#1,434 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.8k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

### Bug Description

A timeout prevents some videos from loading.

Examples of videos not working:

- https://youtu.be/u4DXqKV0Wtk
- https://www.youtube.com/watch?v=GO--mdbQDcg

At first I thought it was due to video length, but these work.

- https://www.youtube.com/watch?v=NtqRjGP3uoY
- https://www.youtube.com/watch?v=AgpWX18dby4

### Steps to Reproduce

1. Deploy bot
2. Request bot to play, https://youtu.be/u4DXqKV0Wtk

### Expected Result

I expected the video to play

### Debug Output

[01:31:47] [ERROR] [LocalAudioTrackExecutor]: Error in playback of u4DXqKV0Wtk
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something broke when playing the track.
at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:44)
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:116)
at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$1(DefaultAudioPlayerManager.java:348)
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:1589)
Suppressed: com.sedmelluq.discord.lavaplayer.tools.exception.EnvironmentInformation:
lavaplayer.version: 1.3.78
os.arch: amd64
os.name: Linux
os.version: 5.15.0-83-generic
java.vendor: Amazon.com Inc.
java.version: 19.0.2
java.runtime.version: 19.0.2+7-FR
java.vm.version: 19.0.2+7-FR
Caused by: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out

### Additional Info

The preferable solution would be adding a config variable or environment variable to adjust this timeout.

### Checklist

- [X] I have looked for information about this [within the documentation](https://jmusicbot.com/)
- [X] I have searched for similar issues [on the issues page](https://github.com/jagrosh/MusicBot/issues?q=is%3Aissue)
- [X] I am running the latest version of the bot: ![Release](https://img.shields.io/github/release/jagrosh/MusicBot.svg)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the LocalAudioTrackExecutor playback path and the SocketTimeoutException shown in the debug output, then reproduce the failure with the listed YouTube URLs. Done means the playback timeout can be adjusted through a configuration or environment setting and the affected videos no longer fail because of that timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.