jagrosh / jagrosh/MusicBot

[Bug Report] Music Bot can't play livestream sources on youtube

Open
#1,664 0 comments 11 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

When trying to play a livestream on youtube with the music bot, it gives error 403

here's the error log when trying to execute a livestream:
[17:26:59] [ERROR] [AudioHandler]: Track WXZxjn7wysA has failed to play
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something broke when playing the track.
at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:45)
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:121)
at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$2(DefaultAudioPlayerManager.java:339)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Not success status code: 403
at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.validateStatusCode(PersistentHttpStream.java:88)
at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.attemptConnect(PersistentHttpStream.java:124)
at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.connect(PersistentHttpStream.java:106)
at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.internalRead(PersistentHttpStream.java:158)
at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.read(PersistentHttpStream.java:174)
at com.sedmelluq.discord.lavaplayer.container.mpeg.reader.MpegReader.tryReadInt(MpegReader.java:156)
at com.sedmelluq.discord.lavaplayer.container.mpeg.reader.MpegReader.nextChild(MpegReader.java:54)
at com.sedmelluq.discord.lavaplayer.container.mpeg.reader.MpegReader$Chain.run(MpegReader.java:254)
at com.sedmelluq.discord.lavaplayer.container.mpeg.MpegFileLoader.parseHeaders(MpegFileLoader.java:68)
at dev.lavalink.youtube.track.YoutubeMpegStreamAudioTrack.updateGlobalSequence(YoutubeMpegStreamAudioTrack.java:91)
at dev.lavalink.youtube.track.YoutubeMpegStreamAudioTrack.(YoutubeMpegStreamAudioTrack.java:59)
at dev.lavalink.youtube.track.YoutubeAudioTrack.processStream(YoutubeAudioTrack.java:173)
at dev.lavalink.youtube.track.YoutubeAudioTrack.processWithClient(YoutubeAudioTrack.java:114)
at dev.lavalink.youtube.track.YoutubeAudioTrack.process(YoutubeAudioTrack.java:71)
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:109)
... 4 common frames omitted

### Steps to Reproduce

1. execute play command
2. provide the link from a livestream youtube video
3. console outputs error 403

### Expected Result

play the output

### Debug Output

```
System Properties:
java.version = 11.0.18
java.vm.name = OpenJDK 64-Bit Server VM
java.vm.specification.version = 11
java.runtime.name = OpenJDK Runtime Environment
java.runtime.version = 11.0.18+10
java.specification.version = 11
os.arch = amd64
os.name = Linux

JMusicBot Information:
Version = 0.4.3
Owner = 856228667393703936
Prefix = .
AltPrefix = !!
MaxSeconds = 0
NPImages = true
SongInStatus = false
StayInChannel = true
UseEval = false
UpdateAlerts = true

Dependency Information:
JDA Version = 4.4.1_353
JDA-Utilities Version = 3.0.5
Lavaplayer Version = 2.2.1

Runtime Information:
Total Memory = 37
Used Memory = 18

Discord Information:
ID = 1090490154944311376
Guilds = 5
Users = 2
```

### Additional Info

I'm running the bot from sparkedhost

### 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 using an official release from [the releases page](https://github.com/jagrosh/MusicBot/releases)

### JMusicBot Version

0.4.3

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the play command with a YouTube livestream and inspect the AudioHandler failure alongside the reported Lavaplayer stack trace. Check whether the current dependency versions still produce the 403; done means the livestream plays successfully without the reported error.

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.