Track exception - lavaplayer.tools.FriendlyException: Please sign in [ERROR]
Last few weeks been having problems getting Ukulele to play. Using jocull jda-5 docker image
docker image: ghcr.io/jocull/ukulele:jda-5 CC: @jocull
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.5.RELEASE)
2024-10-21 17:56:40.557 INFO 1 --- [ main] d.arbjerg.ukulele.UkuleleApplicationKt : Starting UkuleleApplicationKt on 5fc6d1215ec3 with PID 1 (/opt/ukulele/ukulele.jar started by ukulele in /opt/ukulele)
2024-10-21 17:56:40.562 INFO 1 --- [ main] d.arbjerg.ukulele.UkuleleApplicationKt : No active profile set, falling back to default profiles: default
2024-10-21 17:56:42.372 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data R2DBC repositories in DEFAULT mode.
2024-10-21 17:56:42.747 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 368ms. Found 1 R2DBC repository interfaces.
2024-10-21 17:56:45.379 INFO 1 --- [ main] dev.arbjerg.ukulele.jda.CommandManager : Registered 14 commands with 23 names
2024-10-21 17:56:45.517 INFO 1 --- [ main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 6.4.4 by Redgate
2024-10-21 17:56:45.867 INFO 1 --- [ main] o.f.c.internal.database.DatabaseFactory : Database: jdbc:h2:./db/database (H2 1.4)
2024-10-21 17:56:45.994 INFO 1 --- [ main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.058s)
2024-10-21 17:56:46.036 INFO 1 --- [ main] o.f.core.internal.command.DbMigrate : Current version of schema "PUBLIC": 2
2024-10-21 17:56:46.048 INFO 1 --- [ main] o.f.core.internal.command.DbMigrate : Schema "PUBLIC" is up to date. No migration necessary.
2024-10-21 17:56:46.492 WARN 1 --- [ main] net.dv8tion.jda.api.JDA : Automatically disabled CacheFlags due to missing intents
2024-10-21 17:56:46.494 WARN 1 --- [ main] net.dv8tion.jda.api.JDA : Disabled CacheFlag.STICKER (missing GatewayIntent.GUILD_EMOJIS_AND_STICKERS)
2024-10-21 17:56:46.495 WARN 1 --- [ main] net.dv8tion.jda.api.JDA : Disabled CacheFlag.ONLINE_STATUS (missing GatewayIntent.GUILD_PRESENCES)
2024-10-21 17:56:46.495 WARN 1 --- [ main] net.dv8tion.jda.api.JDA : Disabled CacheFlag.SCHEDULED_EVENTS (missing GatewayIntent.SCHEDULED_EVENTS)
2024-10-21 17:56:46.497 WARN 1 --- [ main] net.dv8tion.jda.api.JDA : You can manually disable these flags to remove this warning by using disableCache(CacheFlag.STICKER, CacheFlag.ONLINE_STATUS, CacheFlag.SCHEDULED_EVENTS) on your DefaultShardManagerBuilder
2024-10-21 17:56:47.349 INFO 1 --- [ main] n.dv8tion.jda.api.sharding.ShardManager : Login Successful!
2024-10-21 17:56:47.498 INFO 1 --- [ main] dev.arbjerg.ukulele.jda.EventHandler : JDA.ShardInfo(currentShard=[0 / 1], totalShards=1): INITIALIZING -> INITIALIZED
2024-10-21 17:56:47.499 INFO 1 --- [ main] dev.arbjerg.ukulele.jda.EventHandler : JDA.ShardInfo(currentShard=[0 / 1], totalShards=1): INITIALIZED -> LOGGING_IN
2024-10-21 17:56:47.550 INFO 1 --- [roller-Worker-0] dev.arbjerg.ukulele.jda.EventHandler : JDA.ShardInfo(currentShard=[0 / 1], totalShards=1): LOGGING_IN -> CONNECTING_TO_WEBSOCKET
2024-10-21 17:56:47.697 INFO 1 --- [ main] d.arbjerg.ukulele.UkuleleApplicationKt : Started UkuleleApplicationKt in 8.367 seconds (JVM running for 9.395)
2024-10-21 17:56:47.745 INFO 1 --- [inWS-ReadThread] dev.arbjerg.ukulele.jda.EventHandler : JDA.ShardInfo(currentShard=[0 / 1], totalShards=1): CONNECTING_TO_WEBSOCKET -> IDENTIFYING_SESSION
2024-10-21 17:56:47.745 INFO 1 --- [inWS-ReadThread] n.d.j.internal.requests.WebSocketClient : Connected to WebSocket
2024-10-21 17:56:47.764 INFO 1 --- [inWS-ReadThread] dev.arbjerg.ukulele.jda.EventHandler : JDA.ShardInfo(currentShard=[0 / 1], totalShards=1): IDENTIFYING_SESSION -> AWAITING_LOGIN_CONFIRMATION
2024-10-21 17:56:47.957 INFO 1 --- [inWS-ReadThread] dev.arbjerg.ukulele.jda.EventHandler : JDA.ShardInfo(currentShard=[0 / 1], totalShards=1): AWAITING_LOGIN_CONFIRMATION -> LOADING_SUBSYSTEMS
2024-10-21 17:56:48.190 INFO 1 --- [inWS-ReadThread] net.dv8tion.jda.api.JDA : Finished Loading!
2024-10-21 17:56:48.192 INFO 1 --- [inWS-ReadThread] dev.arbjerg.ukulele.jda.EventHandler : JDA.ShardInfo(currentShard=[0 / 1], totalShards=1): LOADING_SUBSYSTEMS -> CONNECTED
2024-10-21 17:57:40.227 INFO 1 --- [atcher-worker-1] dev.arbjerg.ukulele.jda.CommandManager : Invocation: ;play dnd ambient music
2024-10-21 17:57:42.334 INFO 1 --- [back-1-thread-1] d.l.y.http.YoutubeAccessTokenTracker : Updating YouTube visitor id succeeded, new one is CgtDdjJUdldjUlZGbyiWrNq4BjIKCgJVUxIEGgAgODoMCAEgm5OGouPCpYtn, next update will be after 600 seconds.
2024-10-21 17:57:42.484 WARN 1 --- [back-1-thread-1] c.s.d.l.t.p.LocalAudioTrackExecutor : Suspicious exception for playback of sHA_4wfQhE8
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Please sign in
at dev.lavalink.youtube.track.YoutubeAudioTrack.process(YoutubeAudioTrack.java:102) ~[common-1.8.3.jar!/:na]
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:109) ~[lavaplayer-2.2.2.jar!/:na]
at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$2(DefaultAudioPlayerManager.java:339) ~[lavaplayer-2.2.2.jar!/:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
2024-10-21 17:57:42.485 ERROR 1 --- [back-1-thread-1] dev.arbjerg.ukulele.audio.Player : Track exception
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Please sign in
at dev.lavalink.youtube.track.YoutubeAudioTrack.process(YoutubeAudioTrack.java:102) ~[common-1.8.3.jar!/:na]
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:109) ~[lavaplayer-2.2.2.jar!/:na]
at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$2(DefaultAudioPlayerManager.java:339) ~[lavaplayer-2.2.2.jar!/:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
at java.base/java.lang.Thread.run(Unknown Source) ~[na:an]
Followed the issue to lavaplayer's issue tracker:
https://github.com/lavalink-devs/lavaplayer/issues/156
Which had said to report that issue on the correct repository:
https://github.com/lavalink-devs/youtube-source
After reviewing the issues there, I found numerous tickets all reporting the same issue, all marked as duplicate, and the latest issue 68 indicates it is a duplicate of 64:
https://github.com/lavalink-devs/youtube-source/issues/64
Which ironically does not mention a solution (closed as "not planned"), but does have an indirect unrelated comment referencing issue 61 which I just happened to follow and does mention the official solution:
https://github.com/lavalink-devs/youtube-source/issues/61
In 61, devoxin summaries the official solution with:
Official Solution:
"Use OAuth"
Not sure how difficult that would be to enable, or implement?
The youtube-source page has some instructions:
https://github.com/lavalink-devs/youtube-source/
To enable OAth, it says to just add, which seems simple enough.
YoutubeAudioSourceManager source = new YoutubeAudioSourceManager();
// This will trigger an OAuth flow, where you will be instructed to head to YouTube's OAuth page and input a code.
// This is safe, as it only uses YouTube's official OAuth flow. No tokens are seen or stored by us.
source.useOauth2(null, false);
I am just not sure where exactly this would need to be added?
@jocull is this something you are familiar enough with you could add to your awesome branch?
I've been watching activity upstream a bit just to see where this goes. A lot has changed, and keeps changing. Here are a few breadcrumbs in addition to those listed above. yt-dlp has a lot of mindshare and far more users, so I trust their take on the situation the most.
- https://github.com/lavalink-devs/youtube-source/issues/75
- https://github.com/lavalink-devs/youtube-source/issues/78
- https://github.com/yt-dlp/yt-dlp/issues/10128
- https://github.com/yt-dlp/yt-dlp/issues/11503
Based on what I've seen so far, and please correct me if wrong, is that:
- Using OAuth is (or was?) an option
- However the risk of getting accounts banned using it is super high
- Making so called "burner" accounts is not trivial to do, due to phone number verification
- Some of the chatter indicates it's going away in YT's API entirely 🤷
- Some people have luck with IPv6 hacks, IP rotation, etc. But this is very much hit and miss.
- Some newer chatter indicates you can use "cookies"? I haven't taken the time to understand this, or what it would take to port it to be lavalink compatible
So all of that to say, solutions aren't clear and most likely we will spend time spinning our wheels only to end up with solutions that are swiftly broken again.
As a token of ❤️ for you all, in the meantime I can encourage some coping with Discord's Watch Together feature
I've been using it for now, and while it includes ads and quite a number of unavailable videos, it helps ease the pain while you commiserate with friends over inferior quality lyrics videos of your favorites made unrestricted by re-upload 😜
Thanks for the response @jocull . YouTube sadness.
I just tested out the "Discord's Watch Together". It sort of works. Super ad heavy, which is disappointing, considering I pay for the YouTube subscription. But in a pinch it works better than nothing.
Thanks.