lavalink-devs / youtube-source

A rewritten YouTube source manager for Lavaplayer.
MIT License
161 stars 27 forks source link

java.lang.RuntimeException: Not success status code: 403 #46

Closed Kevin28576 closed 2 months ago

Kevin28576 commented 2 months ago

Basic Troubleshooting

Version of youtube-source

1.7.2

The search query, URL, playlist or video ID that triggered the issue

ytsearch:天氣之子

Code Example

application.yml

lavalink:
    plugins:
        - dependency: com.github.topi314.lavasrc:lavasrc-plugin:4.1.1
          repository: https://maven.lavalink.dev/releases
          snapshot: false
        - dependency: com.github.topi314.sponsorblock:sponsorblock-plugin:3.0.0
          repository: https://maven.lavalink.dev/releases
          snapshot: false
        - dependency: com.dunctebot:skybot-lavalink-plugin:1.7.0
          repository: https://maven.lavalink.dev/releases
          snapshot: false
        - dependency: dev.lavalink.youtube:youtube-plugin:1.7.2
          snapshot: false
    pluginsDir: ./plugin
    server:
        bufferDurationMs: 400
        filters:
            channelMix: true
            distortion: true
            equalizer: true
            karaoke: true
            lowPass: true
            rotation: true
            timescale: true
            tremolo: true
            vibrato: true
            volume: true
        frameBufferDurationMs: 1000
        gc-warnings: true
        opusEncodingQuality: 10
        password: rhythmlavalinkpass
        playerUpdateInterval: 5
        resamplingQuality: MEDIUM
        soundcloudSearchEnabled: true
        sources:
            bandcamp: true
            http: true
            local: false
            soundcloud: true
            twitch: true
            vimeo: true
            youtube: false
        trackStuckThresholdMs: 10000
        useSeekGhosting: true
        youtubeConfig:
            email: ●●●●●●●●●●
            password: ●●●●●●●●●●
        youtubePlaylistLoadLimit: 10
        youtubeSearchEnabled: true
logging:
    file:
        path: ./logs/
    level:
        lavalink: INFO
        root: INFO
    logback:
        rollingpolicy:
            max-file-size: 1GB
            max-history: 30
    request:
        enabled: true
        includeClientInfo: true
        includeHeaders: false
        includePayload: true
        includeQueryString: true
        maxPayloadLength: 10000
metrics:
    prometheus:
        enabled: false
        endpoint: /metrics
plugins:
    lavasrc:
        applemusic:
            albumLoadLimit: 300
            countryCode: US
            mediaAPIToken: ●●●●●●●●
            playlistLoadLimit: 10
        deezer:
            masterDecryptionKey: ""
        sources:
            applemusic: true
            deezer: false
            spotify: true
            yandexmusic: true
        spotify:
            albumLoadLimit: 300
            clientId: ●●●●●●●●
            clientSecret: ●●●●●●●●●●
            countryCode: JP
            playlistLoadLimit: 10
        yandexmusic:
            accessToken: ●●●●●●●●●●
    youtube:
        TVHTML5EMBEDDED:
            playlistLoading: false
            searching: false
            videoLoading: false
        WEB:
            playback: true
        allowDirectPlaylistIds: true
        allowDirectVideoIds: true
        allowSearch: true
        clients:
            - MUSIC
            - ANDROID_TESTSUITE
            - WEB
        enabled: true
        pot:
            token: ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
            visitorData: ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
sentry:
    dsn: ""
    environment: ""
server:
    address: 0.0.0.0
    port: 2333

Exception and Stacktrace

2024-09-07T11:13:44.743+08:00  INFO 27 --- [Lavalink] [           main] lavalink.server.Launcher                 : Starting Launcher v4.0.7 using Java 17.0.12 with PID 27 (/home/container/Lavalink.jar started by ? in /home/container)
2024-09-07T11:13:44.747+08:00  INFO 27 --- [Lavalink] [           main] lavalink.server.Launcher                 : No active profile set, falling back to 1 default profile: "default"
2024-09-07T11:13:47.819+08:00  INFO 27 --- [Lavalink] [           main] l.server.bootstrap.PluginManager         : Found plugin 'youtube-plugin' version 1.7.2
2024-09-07T11:13:47.819+08:00  INFO 27 --- [Lavalink] [           main] l.server.bootstrap.PluginManager         : Found plugin 'DuncteBot-plugin' version 1.7.0
2024-09-07T11:13:47.820+08:00  INFO 27 --- [Lavalink] [           main] l.server.bootstrap.PluginManager         : Found plugin 'lavasrc-plugin' version 4.1.1
2024-09-07T11:13:47.820+08:00  INFO 27 --- [Lavalink] [           main] l.server.bootstrap.PluginManager         : Found plugin 'sponsorblock-plugin' version 3.0.0
2024-09-07T11:13:47.909+08:00  INFO 27 --- [Lavalink] [           main] l.server.bootstrap.PluginManager         : Loaded youtube-plugin-1.7.2.jar (15 classes)
2024-09-07T11:13:47.915+08:00  INFO 27 --- [Lavalink] [           main] l.server.bootstrap.PluginManager         : Loaded skybot-lavalink-plugin-1.7.0.jar (4 classes)
2024-09-07T11:13:48.205+08:00  INFO 27 --- [Lavalink] [           main] l.server.bootstrap.PluginManager         : Loaded lavasrc-plugin-4.1.1.jar (129 classes)
2024-09-07T11:13:48.325+08:00  INFO 27 --- [Lavalink] [           main] l.server.bootstrap.PluginManager         : Loaded sponsorblock-plugin-3.0.0.jar (90 classes)
2024-09-07T11:13:49.235+08:00  INFO 27 --- [Lavalink] [           main] lavalink.server.Launcher                 : Started Launcher in 6.194 seconds (process running for 7.713)
container@pterodactyl~ Server marked as running...
2024-09-07T11:13:49.522+08:00  INFO 27 --- [Lavalink] [           main] lavalink.server.Launcher                 : 
       .   _                  _ _       _    __ _ _
      /\\ | | __ ___   ____ _| (_)_ __ | | __\ \ \ \
     ( ( )| |/ _` \ \ / / _` | | | '_ \| |/ / \ \ \ \
      \\/ | | (_| |\ V / (_| | | | | | |   <   ) ) ) )
       '  |_|\__,_| \_/ \__,_|_|_|_| |_|_|\_\ / / / /
    =========================================/_/_/_/
        Version:        4.0.7
        Build time:     08.07.2024 22:14:17 UTC
        Branch          HEAD
        Commit:         93102f8
        Commit time:    08.07.2024 21:49:02 UTC
        JVM:            17.0.12
        Lavaplayer      2.2.1
2024-09-07T11:13:49.533+08:00  INFO 27 --- [Lavalink] [           main] lavalink.server.Launcher                 : No active profile set, falling back to 1 default profile: "default"
2024-09-07T11:13:52.039+08:00  WARN 27 --- [Lavalink] [           main] io.undertow.websockets.jsr               : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2024-09-07T11:13:52.111+08:00  INFO 27 --- [Lavalink] [           main] io.undertow.servlet                      : Initializing Spring embedded WebApplicationContext
2024-09-07T11:13:52.112+08:00  INFO 27 --- [Lavalink] [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2509 ms
2024-09-07T11:13:54.219+08:00  INFO 27 --- [Lavalink] [           main] c.g.t.lavasrc.plugin.LavaSrcPlugin       : Loading LavaSrc plugin...
2024-09-07T11:13:54.431+08:00  INFO 27 --- [Lavalink] [           main] c.s.d.l.tools.GarbageCollectionMonitor   : GC monitoring enabled, reporting results every 2 minutes.
2024-09-07T11:13:55.738+08:00  INFO 27 --- [Lavalink] [           main] d.l.youtube.plugin.YoutubePluginLoader   : YouTube source initialised with clients: WEB_REMIX, ANDROID_TESTSUITE, WEB 
2024-09-07T11:13:55.739+08:00  INFO 27 --- [Lavalink] [           main] c.d.lavalinkplugin.DuncteBotInjector     : Registering getyarn audio source manager
2024-09-07T11:13:55.743+08:00  INFO 27 --- [Lavalink] [           main] c.d.lavalinkplugin.DuncteBotInjector     : Registering clypit audio source manager
2024-09-07T11:13:55.745+08:00  INFO 27 --- [Lavalink] [           main] c.d.lavalinkplugin.DuncteBotInjector     : Registering text to speech audio source manager with language en-AU
2024-09-07T11:13:55.747+08:00  INFO 27 --- [Lavalink] [           main] c.d.lavalinkplugin.DuncteBotInjector     : Registering PornHub audio source manager
2024-09-07T11:13:55.749+08:00  INFO 27 --- [Lavalink] [           main] c.d.lavalinkplugin.DuncteBotInjector     : Registering reddit audio source manager
2024-09-07T11:13:55.804+08:00  INFO 27 --- [Lavalink] [           main] c.d.lavalinkplugin.DuncteBotInjector     : Registering OC Remix audio source manager
2024-09-07T11:13:55.811+08:00  INFO 27 --- [Lavalink] [           main] c.d.lavalinkplugin.DuncteBotInjector     : Registering TikTok audio source manager
2024-09-07T11:13:55.817+08:00  INFO 27 --- [Lavalink] [           main] c.d.lavalinkplugin.DuncteBotInjector     : Registering Mixcloud audio source manager
2024-09-07T11:13:55.819+08:00  INFO 27 --- [Lavalink] [           main] c.d.lavalinkplugin.DuncteBotInjector     : Registering Soundgasm audio source manager
2024-09-07T11:13:55.821+08:00  INFO 27 --- [Lavalink] [           main] c.g.t.lavasrc.plugin.LavaSrcPlugin       : Registering Spotify audio source manager...
2024-09-07T11:13:55.821+08:00  INFO 27 --- [Lavalink] [           main] c.g.t.lavasrc.plugin.LavaSrcPlugin       : Registering Apple Music audio source manager...
2024-09-07T11:13:55.821+08:00  INFO 27 --- [Lavalink] [           main] c.g.t.lavasrc.plugin.LavaSrcPlugin       : Registering Yandex Music audio source manager...
2024-09-07T11:13:55.837+08:00  INFO 27 --- [Lavalink] [           main] c.g.t.s.plugin.SponsorBlockPlugin        : Loading SponsorBlock Plugin...
2024-09-07T11:13:56.317+08:00  INFO 27 --- [Lavalink] [           main] l.server.config.KoeConfiguration         : OS: LINUX, Arch: X86_64
2024-09-07T11:13:56.318+08:00  INFO 27 --- [Lavalink] [           main] l.server.config.KoeConfiguration         : Enabling JDA-NAS
2024-09-07T11:13:56.323+08:00  INFO 27 --- [Lavalink] [           main] c.s.l.c.natives.NativeLibraryLoader      : Native library udpqueue: loading with filter null
2024-09-07T11:13:56.330+08:00  INFO 27 --- [Lavalink] [           main] c.s.l.c.natives.NativeLibraryLoader      : Native library udpqueue: successfully loaded.
2024-09-07T11:13:56.527+08:00  WARN 27 --- [Lavalink] [           main] l.server.config.SentryConfiguration      : Turning off sentry
2024-09-07T11:13:57.412+08:00  INFO 27 --- [Lavalink] [           main] io.undertow                              : starting server: Undertow - 2.3.13.Final
2024-09-07T11:13:57.424+08:00  INFO 27 --- [Lavalink] [           main] org.xnio                                 : XNIO version 3.8.8.Final
2024-09-07T11:13:57.435+08:00  INFO 27 --- [Lavalink] [           main] org.xnio.nio                             : XNIO NIO Implementation Version 3.8.8.Final
2024-09-07T11:13:57.710+08:00  INFO 27 --- [Lavalink] [           main] org.jboss.threads                        : JBoss Threads version 3.5.0.Final
2024-09-07T11:13:57.815+08:00  INFO 27 --- [Lavalink] [           main] o.s.b.w.e.undertow.UndertowWebServer     : Undertow started on port 2333 (http) with context path '/'
2024-09-07T11:13:57.822+08:00  INFO 27 --- [Lavalink] [           main] lavalink.server.Launcher                 : Started Launcher in 8.518 seconds (process running for 16.3)
2024-09-07T11:13:57.823+08:00  INFO 27 --- [Lavalink] [           main] lavalink.server.Launcher                 : Lavalink is ready to accept connections.
2024-09-07T11:14:08.508+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] io.undertow.servlet                      : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-09-07T11:14:08.508+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2024-09-07T11:14:08.510+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] o.s.web.servlet.DispatcherServlet        : Completed initialization in 2 ms
2024-09-07T11:14:08.548+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] l.server.io.HandshakeInterceptorImpl     : Incoming connection from /125.228.67.13:49380
2024-09-07T11:14:08.618+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] l.server.io.RequestLoggingFilter         : GET /v4/websocket, client=125.228.67.13
2024-09-07T11:14:08.746+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] lavalink.server.io.SocketServer          : Connection successfully established from Rhythm
2024-09-07T11:15:32.719+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] l.server.player.AudioLoaderRestHandler   : Got request to load for identifier "ytsearch:"
2024-09-07T11:15:32.725+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] lavalink.server.player.AudioLoader       : No matches found
2024-09-07T11:15:32.910+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] l.server.io.RequestLoggingFilter         : GET /v4/loadtracks?identifier=ytsearch%3A, client=125.228.67.13
2024-09-07T11:15:34.762+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] l.server.player.AudioLoaderRestHandler   : Got request to load for identifier "ytsearch:天氣之子"
2024-09-07T11:15:34.848+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] d.l.y.http.YoutubeAccessTokenTracker     : Updating YouTube visitor id succeeded, new one is CgtIbk5zakNYbERuNCjfiu-2BjIKCgJUVxIEGgAgDjoMCAEg3Nj6zPWr8e1m, next update will be after 600 seconds.
2024-09-07T11:15:35.091+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] lavalink.server.player.AudioLoader       : Loaded playlist Search results for: 天氣之子
2024-09-07T11:15:35.131+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] l.server.io.RequestLoggingFilter         : GET /v4/loadtracks?identifier=ytsearch%3A%E5%A4%A9%E6%B0%A3%E4%B9%8B%E5%AD%90, client=125.228.67.13
2024-09-07T11:15:36.339+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] l.server.io.RequestLoggingFilter         : PATCH /v4/sessions/s0q6cexxtqclehk8/players/1156930341035065487?noReplace=false, client=125.228.67.13, payload={"voice":{"token":"d744b467588ca84b","endpoint":"japan7678.discord.media:443","sessionId":"74828843597c0d3289cc4e9a52b1fb8a"}}
2024-09-07T11:15:36.418+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] l.server.player.AudioLoaderRestHandler   : Got request to load for identifier "ytsearch:天氣之子"
2024-09-07T11:15:36.618+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] lavalink.server.player.AudioLoader       : Loaded playlist Search results for: 天氣之子
2024-09-07T11:15:36.628+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] l.server.io.RequestLoggingFilter         : GET /v4/loadtracks?identifier=ytsearch%3A%E5%A4%A9%E6%B0%A3%E4%B9%8B%E5%AD%90, client=125.228.67.13
2024-09-07T11:15:36.715+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] l.server.io.RequestLoggingFilter         : PATCH /v4/sessions/s0q6cexxtqclehk8/players/1156930341035065487?noReplace=false, client=125.228.67.13, payload={"encodedTrack":"QAAA+wMAVOOAiuWkqeawlOS5i+WtkOOAi+aXpeacrOmrmOWIhuWKqOa8q+eUteW9se+8jOebuOavlOaZtOWkqe+8jOaIkeabtOmcgOimgeeahOaYr+S9oO+8gQAZ5LiA57Gz55S15b2xLeWumOaWuemikemBkwAAAAAACVqIAAt0cjBycmx4S0RTVQABACtodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PXRyMHJybHhLRFNVAQAwaHR0cHM6Ly9pLnl0aW1nLmNvbS92aS90cjBycmx4S0RTVS9tcWRlZmF1bHQuanBnAAAHeW91dHViZQAAAAAAAAAA"}
2024-09-07T11:15:38.941+08:00 ERROR 27 --- [Lavalink] [back-1-thread-1] c.s.d.l.t.p.LocalAudioTrackExecutor      : Error in playback of tr0rrlxKDSU
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something broke when playing the track.
        at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:45) ~[lavaplayer-2.2.1.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:121) ~[lavaplayer-2.2.1.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$2(DefaultAudioPlayerManager.java:339) ~[lavaplayer-2.2.1.jar!/:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]
Caused by: java.lang.RuntimeException: Not success status code: 403
        at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.validateStatusCode(PersistentHttpStream.java:88) ~[lavaplayer-2.2.1.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.attemptConnect(PersistentHttpStream.java:124) ~[lavaplayer-2.2.1.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.connect(PersistentHttpStream.java:106) ~[lavaplayer-2.2.1.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.internalRead(PersistentHttpStream.java:158) ~[lavaplayer-2.2.1.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.read(PersistentHttpStream.java:174) ~[lavaplayer-2.2.1.jar!/:na]
        at java.base/java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288) ~[na:na]
        at java.base/java.io.DataInputStream.readByte(DataInputStream.java:268) ~[na:na]
        at com.sedmelluq.discord.lavaplayer.container.matroska.format.MatroskaEbmlReader.readEbmlInteger(MatroskaEbmlReader.java:39) ~[lavaplayer-2.2.1.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.container.matroska.format.MatroskaFileReader.readNextElement(MatroskaFileReader.java:47) ~[lavaplayer-2.2.1.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.container.matroska.MatroskaStreamingFile.readFile(MatroskaStreamingFile.java:94) ~[lavaplayer-2.2.1.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.container.matroska.MatroskaAudioTrack.loadMatroskaFile(MatroskaAudioTrack.java:52) ~[lavaplayer-2.2.1.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.container.matroska.MatroskaAudioTrack.process(MatroskaAudioTrack.java:35) ~[lavaplayer-2.2.1.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.track.DelegatedAudioTrack.processDelegate(DelegatedAudioTrack.java:25) ~[lavaplayer-2.2.1.jar!/:na]
        at dev.lavalink.youtube.track.YoutubeAudioTrack.processStatic(YoutubeAudioTrack.java:153) ~[youtube-plugin-1.7.2.jar!/:na]
        at dev.lavalink.youtube.track.YoutubeAudioTrack.processWithClient(YoutubeAudioTrack.java:121) ~[youtube-plugin-1.7.2.jar!/:na]
        at dev.lavalink.youtube.track.YoutubeAudioTrack.process(YoutubeAudioTrack.java:72) ~[youtube-plugin-1.7.2.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:109) ~[lavaplayer-2.2.1.jar!/:na]
        ... 4 common frames omitted
        Suppressed: dev.lavalink.youtube.ClientInformation: 
  yts.version: 1.7.2
  client.identifier: WEB
  client.options: ClientOptions{playback=true, playlistLoading=true, videoLoading=true, searching=true}
2024-09-07T11:17:49.360+08:00  INFO 27 --- [Lavalink] [  XNIO-1 task-2] l.server.io.RequestLoggingFilter         : PATCH /v4/sessions/s0q6cexxtqclehk8/players/623515774559977523?noReplace=false, client=125.228.67.13, payload={"voice":{"token":"6dd93667ceb54f6c","endpoint":"japan5898.discord.media:443","sessionId":"74828843597c0d3289cc4e9a52b1fb8a"}}
topi314 commented 2 months ago

[x] My issue is reproducible with IPv6 rotation.

You are not using ipv6 rotation

If you haven't already try oauth too