lavalink-devs / youtube-source

A rewritten YouTube source manager for Lavaplayer.
MIT License
163 stars 28 forks source link

com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Get the best YouTube experience #26

Closed AJ-OP2311 closed 4 months ago

AJ-OP2311 commented 4 months ago

Basic Troubleshooting

Version of youtube-source

1.3.0

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

ytsearch

Code Example

i got this error, when i playing track,

0|java     | 2024-07-07 09:22:36.572  INFO 8331 --- [ader-2-thread-1] lavalink.server.player.AudioLoader       : Loaded playlist Search results for: aooge tum kabhi
0|java     | 2024-07-07 09:22:38.649  INFO 8331 --- [  XNIO-1 task-1] l.server.player.AudioLoaderRestHandler   : Got request to load for identifier "https://www.youtube.com/watch?v=i96UO8-GFvw"
0|java     | 2024-07-07 09:22:38.930 ERROR 8331 --- [ader-2-thread-1] lavalink.server.player.AudioLoader       : Load failed
0|java     | com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Get the best YouTube experience
0|java     |    at dev.lavalink.youtube.clients.skeleton.Client.getPlayabilityStatus(Client.java:73) ~[youtube-plugin-1.3.0.jar!/:na]
0|java     |    at dev.lavalink.youtube.clients.skeleton.NonMusicClient.loadTrackInfoFromInnertube(NonMusicClient.java:98) ~[youtube-plugin-1.3.0.jar!/:na]
0|java     |    at dev.lavalink.youtube.clients.skeleton.NonMusicClient.loadVideo(NonMusicClient.java:315) ~[youtube-plugin-1.3.0.jar!/:na]
0|java     |    at dev.lavalink.youtube.YoutubeAudioSourceManager.lambda$routeFromVideoId$6(YoutubeAudioSourceManager.java:309) ~[youtube-plugin-1.3.0.jar!/:na]
0|java     |    at dev.lavalink.youtube.YoutubeAudioSourceManager.loadItemOnce(YoutubeAudioSourceManager.java:185) ~[youtube-plugin-1.3.0.jar!/:na]
0|java     |    at dev.lavalink.youtube.YoutubeAudioSourceManager.loadItem(YoutubeAudioSourceManager.java:151) ~[youtube-plugin-1.3.0.jar!/:na]
0|java     |    at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:406) ~[lavaplayer-1.5.4.jar!/:na]
0|java     |    at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:388) ~[lavaplayer-1.5.4.jar!/:na]
0|java     |    at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:183) ~[lavaplayer-1.5.4.jar!/:na]
0|java     |    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
0|java     |    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
0|java     |    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
0|java     |    at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]
0|java     |    Suppressed: com.sedmelluq.discord.lavaplayer.tools.exception.EnvironmentInformation:
0|java     |   lavaplayer.version: 1.5.4
0|java     |   os.arch: amd64
0|java     |   os.name: Linux
0|java     |   os.version: 5.15.0-46-generic
0|java     |   java.vendor: Ubuntu
0|java     |   java.version: 17.0.11
0|java     |   java.runtime.version: 17.0.11+9-Ubuntu-122.04.1
0|java     |   java.vm.version: 17.0.11+9-Ubuntu-122.04.1```

Exception and Stacktrace

server: # REST and WS server
    port: 2333 # The port that the server listens on
    address: 0.0.0.0
plugins:
    youtube:
        enabled: true # Whether this source can be used.
        allowSearch: true # Whether "ytsearch:" and "ytmsearch:" can be used.
        allowDirectVideoIds: true # Whether just video IDs can match. If false, only complete URLs will be loaded.
        allowDirectPlaylistIds: true # Whether just playlist IDs can match. If false, only complete URLs will be loaded.
        # The clients to use for track loading. See below for a list of valid clients.
        # Clients are queried in the order they are given (so the first client is queried first and so on...)
        clients:
            - MUSIC
            - ANDROID
            - WEB
            - TVHTML5EMBEDDED
            - ANDROID_LITE
            - MEDIA_CONNECT
        # You can configure individual clients with the following.
        # Any options or clients left unspecified will use their default values,
        # which enables everything for all clients.
        WEB: # names are specified as they are written below under "Available Clients".
            # This will disable using the WEB client for video playback.
            playback: true
        TVHTML5EMBEDDED:
            # The below config disables everything except playback for this client.
            playlistLoading: true # Disables loading of playlists and mixes for this client.
            videoLoading: true # Disables loading of videos for this client (playback is still allowed).
            searching: true # Disables the ability to search for videos for this client..
    lavasrc:
        providers: # Custom providers for track loading. This is the default
            # - "dzisrc:%ISRC%" # Deezer ISRC provider
            # - "dzsearch:%QUERY%" # Deezer search provider
            - 'ytsearch:"%ISRC%"' # Will be ignored if track does not have an ISRC. See https://en.wikipedia.org/wiki/International_Standard_Recording_Code
            - 'ytsearch:%QUERY%' # Will be used if track has no ISRC or no track could be found for the ISRC
            #  you can add multiple other fallback sources her
        sources:
            spotify: true # Enable Spotify source
            applemusic: true # Enable Apple Music source
            deezer: true # Enable Deezer source
            yandexmusic: false # Enable Yandex Music source
        spotify:
            clientId: ''
            clientSecret: ''
            countryCode: 'US' # the country code you want to use for filtering the artists top tracks. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
            playlistLoadLimit: 10 # The number of pages at 100 tracks each
            albumLoadLimit: 6 # The number of pages at 50 tracks each
        applemusic:
            countryCode: 'US' # the country code you want to use for filtering the artists top tracks and language. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
            mediaAPIToken: '' # apple music api token
            playlistLoadLimit: 6 # The number of pages at 300 tracks each
            albumLoadLimit: 6 # The number of pages at 300 tracks each
        deezer:
            masterDecryptionKey: '' # the master key used for decrypting the deezer tracks. (yes this is not here you need to get it from somewhere else)
        yandexmusic:
            accessToken: 'your access token' # the token used for accessing the yandex music api. See https://github.com/TopiSenpai/LavaSrc#yandex-music
            playlistLoadLimit: 1 # The number of pages at 100 tracks each
            albumLoadLimit: 1 # The number of pages at 50 tracks each
            artistLoadLimit: 1 # The number of pages at 10 tracks each
        youtube:
            countryCode: 'US' # the country code you want to use for searching lyrics via ISRC. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
lavalink:
    plugins:
        - dependency: 'com.github.topi314.lavasrc:lavasrc-plugin:3.2.10'
          repository: "https://maven.topi.wtf/releases"
        - dependency: 'dev.lavalink.youtube:youtube-plugin:1.3.0'
          repository: "https://maven.lavalink.dev/releases"

    server:
        password: 'm'
        sources:
            # The default Youtube source is now deprecated and won't receive further updates. Please use https://github.com/lavalink-devs/youtube-source#plugin instead.
            youtube: false
            bandcamp: true
            soundcloud: true
            twitch: true
            vimeo: true
            mixer: true
            nico: true
            http: true # warning: keeping HTTP enabled without a proxy configured could expose your server's IP address.
            local: false
        filters: # All filters are enabled by default
            volume: true
            equalizer: true
            karaoke: true
            timescale: true
            tremolo: true
            vibrato: true
            distortion: true
            rotation: true
            channelMix: true
            lowPass: true
        bufferDurationMs: 400 # The duration of the NAS buffer. Higher values fare better against longer GC pauses. Duration <= 0 to disable JDA-NAS. Minimum of 40ms, lower values may introduce
        frameBufferDurationMs: 5000 # How many milliseconds of audio to keep buffered
        opusEncodingQuality: 10 # Opus encoder quality. Valid values range from 0 to 10, where 10 is best quality but is the most expensive on the CPU.
        resamplingQuality: HIGH # Quality of resampling operations. Valid values are LOW, MEDIUM and HIGH, where HIGH uses the most CPU.
        trackStuckThresholdMs: 10000 # The threshold for how long a track can be stuck. A track is stuck if does not return any audio data.
        useSeekGhosting: true # Seek ghosting is the effect where whilst a seek is in progress, the audio buffer is read from until empty, or until seek is ready.
        youtubePlaylistLoadLimit: 10 # Number of pages at 100 each
        playerUpdateInterval: 1 # How frequently to send player updates to clients, in seconds
        youtubeSearchEnabled: true
        soundcloudSearchEnabled: true
        gc-warnings: true
        #ratelimit:
        #ipBlocks: [] # list of ip blocks
        #excludedIps: ["...", "..."] # ips which should be explicit excluded from usage by lavalink
        #strategy: "LoadBalance" # RotateOnBan | LoadBalance | NanoSwitch | RotatingNanoSwitch
        #searchTriggersFail: true # Whether a search 429 should trigger marking the ip as failing
        #retryLimit: -1 # -1 = use default lavaplayer value | 0 = infinity | >0 = retry will happen this numbers times
        youtubeConfig: # Required for avoiding all age restrictions by YouTube, some restricted videos still can be played without.
           email: "" # Email of Google account
           password: "" # Password of Google account
        #httpConfig: # Useful for blocking bad-actors from ip-grabbing your music node and attacking it, this way only the http proxy will be attacked
        #proxyHost: "localhost" # Hostname of the proxy, (ip or domain)
        #proxyPort: 3128 # Proxy port, 3128 is the default for squidProxy
        #proxyUser: "" # Optional user for basic authentication fields, leave blank if you don't use basic auth
        #proxyPassword: "" # Password for basic authentication
metrics:
    prometheus:
        enabled: false
        endpoint: /metrics

sentry:
    dsn: ''
    environment: ''
#  tags:
#    some_key: some_value
#    another_key: another_value

logging:
    file:
        path: ./logs/

        level:
            root: INFO
            lavalink: INFO

        request:
            enabled: true
            includeClientInfo: true
            includeHeaders: false
            includeQueryString: true
            includePayload: true
            maxPayloadLength: 10000

        logback:
            rollingpolicy:
                max-file-size: 1GB
                max-history: 30```
devoxin commented 4 months ago

The box for IPv6 rotation reproduction is checked but IPv6 rotation is not in use.

AJ-OP2311 commented 4 months ago

i used the ipv6 rotation

devoxin commented 4 months ago

Your config doesn't show any indications of having used IPv6 rotation. It's still default.

AJ-OP2311 commented 4 months ago

you mean in yml file ? ipBlocks ? i remove that and post it here

devoxin commented 4 months ago

The entire thing is commented out and under-indented. This is not typical for a config which has been used and looks more like the default one has been copy-pasted.

AJ-OP2311 commented 4 months ago

so , i post here full yml with token ? did you say this ?