#Help with YT-Cipher

1 messages · Page 2 of 1

slim current
#

The this content isnt available is just that, youtube is saying "this video is not available" could be many reasons, geoblocked, client restricted, etc. not cipher related most likely

eager pewter
#

I tried turning off oauth then it says this video requires login then with oauth enabled saying this content isnt available

slim current
#

unfortunately YT wont tell us why. You can always open another help thread about it or search for that error message on here, I am sure there are more threads about it

eager pewter
#

ok

wild aspen
eager pewter
#

Same issue with another refresh token and another hosting ip

slim current
#

Its possible that video is just unavailable to tv clients or smth, its for just one video right?

wild aspen
#

some music videos don't work with non-music clients uuuuu

still spoke
slim current
still spoke
crude nymph
still spoke
scenic fox
#

Do you want a timeout lol

scenic fox
crude nymph
still spoke
still spoke
scenic fox
slim current
# still spoke I already have all of that and I disabled YouTube

Either you do not, or your configs are not being applied properly or something. We cannot fix this for you, we can only point you to the documentation to help yourself. I recommend taking a close double and triple checks of your configs and the errors. You have demonstrated several times now that you do not read docs, error messages, etc. You just see it and ask "Fix it for me pls". We are more than willing to help, but it really feels like this is going in circles and you should really try to learn and figure it out. I garuntee that will be a much better outcome than asking everyone else to fix it for you and hoping you get lucky. If you want to keep trying that though, try asking one of the AIs for help. I feel like I have given you all the help I can

slim gate
#

do you want me to pin this

#

If you wanna make an FAQ at any point, just tag me and I'll pin that too

still spoke
patent cargo
#

Hello

eager pewter
slim current
#

YT-cipher FAQ

--- What is the easiest way to set this up? ---

  1. Make sure you are on the latest release of youtube-source plugin
  2. Add this to your lavalink application.yml in the section under plugins -> youtube
plugins:
  youtube:
    remoteCipher:
      url: "https://cipher.kikkia.dev/"

*** --- Why do I need yt-cipher ---***
YouTube constantly changes a hidden code needed to play videos. Instead of having Lavalink break this code repeatedly, we made a separate, smaller service to handle just that one job.

This makes it much faster and easier for the Lavalink team to fix things every time YouTube makes a change.

***--- What if I want to host the yt-cipher service myself? --- ***
It is pretty easy to setup yt-cipher yourself, we reccomend using docker as that is the easiest. Please see this section of the docs: https://github.com/kikkia/yt-cipher?tab=readme-ov-file#hosting-yourself

*** --- I think yt-cipher is causing an error what should I do? ---***

Look at the error, if search the error and see anything referencing RemoteCipherManager definitely reach out. If you see 403 errors, also reach out.

--- This video is not available or Please sign in
These are likely not yt-cipher, and I recommend opening a general help thread.

--- Problematic YouTube player script or LocalSignatureCipherManager
This is likely an issue with your remoteCipher setup in your lavalink application.yaml, please double check spelling and indentation. It should be nested in plugins -> youtube. Also double check that lavalink -> server -> sources -> youtube == false

*** --- yt-cipher doesnt work it 404s. --- ***
This is by design, all paths will 404, except for the paths defined in the api specification: https://github.com/kikkia/yt-cipher?tab=readme-ov-file#api-specification

slim current
crude nymph
#

Hello @slim current, I saw your UserAgent idea, which I think is quite good. I find it interesting, but I know it's still in development. I suppose it can be customised on the YouTube source side or on the Yt-Cipher side ?
I saw that it can remain optional. I find it interesting and intriguing to learn more about this idea and how it will be used if it is customisable or something left as default.

slim current
#

Its nothing too fancy, its only used for prometheus metrics.
For example, I run several LL nodes, so I give each node a unique user-agent, then I can see in my metrics dashboards stuff like requests per second, what player scripts are being used for each node, etc

#

Another use for me, is with the public one, I can now track users YT-source version number, so if we have to make breaking changes to api spec or something we can have a better idea of how that effects users

slim current
#

Going to do a small dns update, I dont expect more than a few seconds of downtime, but I thougt I should post this here to get ahead of it in case a few people hit some failed requests

#

Ok CF Dns is shitty rn, if you swap to ctest.kikkia.dev it will work.

#

Ok fixed ~10 mins of downtime, sorry

slim current
#

With that migration finished though, it should shave a few ms off of response time. also cipher.kikkia.dev/ and cipher.kikkia.dev/api/ both work. And if you use the one without /api/ that should shave another 1-2ms off on average.

burnt token
#
2025-10-07T11:15:37.463Z  INFO 32 --- [Lavalink] [  XNIO-1 task-2] l.server.player.AudioLoaderRestHandler   : Loaded track ROSÉ & Bruno Mars - APT. (Official Music Video)
2025-10-07T11:15:37.507Z  INFO 32 --- [Lavalink] [  XNIO-1 task-2] l.server.io.RequestLoggingFilter         : GET /v4/loadtracks?identifier=https://www.youtube.com/watch?v%3Dekr2nIex040, client=103.183.82.227
2025-10-07T11:15:38.036Z  INFO 32 --- [Lavalink] [  XNIO-1 task-3] l.server.io.RequestLoggingFilter         : PATCH /v4/sessions/x894xtt96koi0frq/players/904230958465699870, client=103.183.82.227, payload={"voice": {"token": "34a77e6c03589e1c", "endpoint": "india10010.discord.media:443", "sessionId": "8f8a1389d8cbf3f66ce4935c21dcbc67"}}
2025-10-07T11:15:38.258Z  INFO 32 --- [Lavalink] [  XNIO-1 task-3] l.server.io.RequestLoggingFilter         : PATCH /v4/sessions/x894xtt96koi0frq/players/904230958465699870?noReplace=False, client=103.183.82.227, payload={"encodedTrack": "QAAA0wMAMVJPU0XMgSAmIEJydW5vIE1hcnMgLSBBUFQuIChPZmZpY2lhbCBNdXNpYyBWaWRlbykABVJPU8OJAAAAAAACo8gAC2VrcjJuSWV4MDQwAAEAK2h0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9ZWtyMm5JZXgwNDABAD9odHRwczovL2kueXRpbWcuY29tL3ZpL2VrcjJuSWV4MDQwL21heHJlc2RlZmF1bHQuanBnP3Y9NjcxMWRiYWMAAAd5b3V0dWJlAAAAAAAAAAA=", "position": "0"}
2025-10-07T11:15:38.292Z  INFO 32 --- [Lavalink] [back-1-thread-1] d.l.y.http.YoutubeAccessTokenTracker     : Updating YouTube visitor id succeeded, new one is CgtMRUVaZllVSEhybyja7JPHBjInCgJGUhIhEh0SGwsMDg8QERITFBUWFxgZGhscHR4fICEiIyQlJiAXOgwIASD_pdToocu98mhYlsn508Og9800, next update will be after 600 seconds.
2025-10-07T11:15:39.492Z  WARN 32 --- [Lavalink] [back-1-thread-1] c.s.d.l.t.p.LocalAudioTrackExecutor      : Suspicious exception for playback of ekr2nIex040
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: This video is unavailable
        at dev.lavalink.youtube.track.YoutubeAudioTrack.process(YoutubeAudioTrack.java:131) ~[youtube-plugin-1.14.0.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:109) ~[lavaplayer-2.2.3.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$2(DefaultAudioPlayerManager.java:339) ~[lavaplayer-2.2.3.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]
#

Do you have any idea on wht the issue is

crude nymph
#

Or the video is now private or simply no longer available.

slim current
#

For that address error @sand kite What is the host set to?

sand kite
slim current
#

Is this within a docker container?

sand kite
slim current
#

If you just leave it at 0.0.0.0 it will listen on all network interfaces, the error you are seeing is due to deno not being able to find a network interface for the address you have set

sand kite
#

so i need to give it like 0.0.0.0:1646

#

like this?

#

i mean port and ip

slim current
#

Just 0.0.0.0

#

Port is separate

sand kite
#

yeah

#

i mean the port i need to give that right?

slim current
#

You can use any port you want
Then with host set to 0.0.0.0 the service is accessable at http://your-ip:your-port

#

These can be set as env variables, or leave them at default

#
PORT - Port to run the api on, default: 8001
HOST - Sets the hostname for the deno server, default: 0.0.0.0
sand kite
#

i gave ip and port but it uses default

slim current
#

How are you running the service, its likely something is overwriting your env variables

sand kite
#

in Pterodactyl panel

slim current
#

oh god pterodactyl

sand kite
slim current
#

Umm there is some other stuff from a while back with other users and pterodactyl over writes their env variables

#

I think they found a fix, let me see if I can dig it back up

sand kite
#

but i choose editing server.ts :)

#

btw what is this error??

2025-10-08T11:40:41.568-04:00 ERROR 31 --- [Lavalink] [ce-token-poller] d.l.youtube.http.YoutubeOauth2Handler    : Failed to fetch OAuth2 token response
java.io.IOException: Invalid status code for oauth2 token fetch: 400
        at com.sedmelluq.discord.lavaplayer.tools.io.HttpClientTools.assertSuccessWithContent(HttpClientTools.java:168) ~[lavaplayer-2.2.3.jar!/:na]
        at dev.lavalink.youtube.http.YoutubeOauth2Handler.pollForToken(YoutubeOauth2Handler.java:155) ~[na:na]
        at dev.lavalink.youtube.http.YoutubeOauth2Handler.lambda$initializeAccessToken$0(YoutubeOauth2Handler.java:108) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
slim current
#

Just change these to what you want

const port = Deno.env.get("PORT") || 8001;
const host = Deno.env.get("HOST") || '0.0.0.0';
sand kite
slim current
sand kite
#

anyways thanks for the assistance now server is working :)

#

btw kikkia can u come on my dm?

#

topi sir just asking a doubt nothing else :)

turbid loom
slim current
#

I don't see why not, but I only ever run this in docker so shrugneko

turbid loom
#

well it does work :D

#

just that u forgot to mention --env in the readme, and only had it set to deno run --allow-net --allow-read --allow-write --allow-env which for some reason doesn't take env variables without the --env flag included as well, extra steps are annoying 💀

hoary dust
#

look like yt-cipher uses a lot ram

turbid loom
#

yeah but it's not that much tbh

hoary dust
#

Looking at my log it seems like it's being used quite a bit but it's got a lot of RAM

violet flame
#

Idk why I get:
org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http://0.0.0.0:8001/
On lavalink it has the correct ip and port, the cypher works like it should, gives the script but fails here, how can i fix it?

scenic fox
#

0.0.0.0 is not a valid ip

violet flame
#

Alright?

scenic fox
#

no

#

0.0.0.0 is NEVER a valid ip

crude nymph
#

0.0.0.0 is work

#

for me

slim current
#

At some point if i have a lot of time i also want to slim the docker image size

slim current
#

0.0.0.0 isnt actually an ip when used as a hostname, its just saying "attach to all network interfaces "

eager pewter
#

is there any issue with the latest yt plugin v1.14.0 because that is not working for me even with cipher but at the same time this snapshot with same config and cipher is working.

dev.lavalink.youtube:youtube-plugin:755aab35029153a705ebd4be63c56a55d68ae678

slim current
#

"not working for me", need more description. Errors? Logs? Etc

slim current
#

Config naming changed a little, double check your yaml vs the current github documentation

eager pewter
silver salmon
#

btw

#

2025-10-09T12:34:31.120Z ERROR 36 --- [Lavalink] [back-1-thread-1] d.l.y.c.LocalSignatureCipherManager : Problematic YouTube player script /s/player/38e0f4b0/player_ias.vflset/en_US/base.js detected (issue detected with script: must find sig function). Dumped to /tmp/lavaplayer-yt-player-script882335274010173712.js (Source version: 755aab35029153a705ebd4be63c56a55d68ae678)

#

new player script

eager pewter
#

it's working after I changed to new yml format

silver salmon
#

yep

#

once i go back to 1.14.0 it works fine

#

💀

slim current
#

They change player scripts pretty much every day, except on weekends

eager pewter
violet flame
#

It’s for not sending my ip

#

On lavalink is correct

#

I’m not gonna send the ip of my server hosting cypher

#

It gets the script but it fails on that

scenic fox
#

Then don't write 0 lol

violet flame
scenic fox
#

Use x xd

violet flame
#

Alright

#

Let me send the message correctly .-.

#

Idk why I get:
org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http://x.x.x.x:8001/
On lavalink it has the correct ip and port, the cypher works like it should, gives the script but fails here, how can i fix it?

#

Now better?

scenic fox
#

And your config looks like?

wild aspen
violet flame
#

Only fails when lavalink does it

violet flame
wild aspen
violet flame
#

Because it does work correctly the server

#

So I don’t see from where is getting that is not a valid host

violet flame
slim current
#

url: http:///x.x.x.x:8001
Wanna double check that the third / isn't causing this issue?

violet flame
scenic fox
#

open ya eyes @violet flame

#

/ / /

#

xd

#

add quotes

slim current
#

https://ideone.com/EjXoLJ
Three slash parses the host as null, therefor no valid host name error

violet flame
#

I don't think it's that, but let me check anyways .-.

violet flame
#

And it does fetch the script

slim current
#

How does it fetch the script if its throwing that error?

#

That would go before the http request fires since its saying it doesnt have a hostname to send it to

#

If that doesn't fix it, post a full stacktrace

violet flame
#

Though the log doesn't actually make sense

scenic fox
#

XD?

#

Dude
A triple slash isn't valid either way

violet flame
#
2025-10-09T06:42:23.663Z DEBUG 13 --- [Lavalink] [XNIO-1 task-4] d.l.youtube.cipher.RemoteCipherManager   : Timestamp from script /s/player/38e0f4b0/player_ias.vflset/en_US/base.js
2025-10-09T06:42:23.664Z DEBUG 13 --- [Lavalink] [XNIO-1 task-4] d.l.youtube.cipher.RemoteCipherManager   : Getting timestamp for script: /s/player/38e0f4b0/player_ias.vflset/en_US/base.js
2025-10-09T06:42:23.664Z DEBUG 13 --- [Lavalink] [XNIO-1 task-4] d.l.youtube.YoutubeAudioSourceManager    : Client "WEB" threw a non-fatal exception, storing and proceeding...

org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http://x.x.x.x:8001/get_sts```
violet flame
#

As when I checked the server's config there were two

scenic fox
violet flame
#

Either way, on the new ip it works

#

Thanks for helping me on this... Garbage, let's leave it there

floral island
#

why is it asking me an api token on localhost?

#

Caused by: java.io.IOException: Decryption proxy request failed with status code: 401. Response: {"error":"Missing API token"}

#
remoteCipher:
      url: "http://0.0.0.0:8001"
# Already tested http://localhost:8001, same api token error
#

obs: im using docker

turbid loom
#

And the other is public without a password set

floral island
nova bridge
#

can i please use somebody elses docker image?

turbid loom
#

Just run it with deno directly

nova bridge
#

?

#

i pay to deploy apps to railway.com and would like a docker image. never heard of deno

turbid loom
#

deno is a javascript runtime

nova bridge
#
services:
  ejs-api:
    # Uncomment to build locally
    # build:
    #   context: .
    #   dockerfile: Dockerfile
    image: shmuelley/yt-cipher:latest
    container_name: ejs_signature_api
    ports:
      - "8001:8001"
    environment:
      - API_TOKEN=noctra
    restart: unless-stopped
#

?

#

im getting errors

#
2025-10-11T06:10:38.303Z ERROR 26 --- [Lavalink] [back-1-thread-1] c.s.d.l.t.p.LocalAudioTrackExecutor      : Error in playback of 5rqJJfabAujtHaGuZCXy4q
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.3.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:121) ~[lavaplayer-2.2.3.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$2(DefaultAudioPlayerManager.java:339) ~[lavaplayer-2.2.3.jar!/:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
Caused by: java.io.IOException: Decryption proxy request failed with status code: 301. Response: 
        at dev.lavalink.youtube.cipher.RemoteCipherManager.getTimestampFromScript(RemoteCipherManager.java:270) ~[youtube-plugin-1.14.0.jar!/:na]
        at dev.lavalink.youtube.cipher.RemoteCipherManager.getTimestamp(RemoteCipherManager.java:127) ~[youtube-plugin-1.14.0.jar!/:na]
        at dev.lavalink.youtube.clients.skeleton.NonMusicClient.loadTrackInfoFromInnertube(NonMusicClient.java:130) ~[youtube-plugin-1.14.0.jar!/:na]
        at dev.lavalink.youtube.clients.skeleton.StreamingNonMusicClient.loadFormats(StreamingNonMusicClient.java:35) ~[youtube-plugin-1.14.0.jar!/:na]
        at dev.lavalink.youtube.track.YoutubeAudioTrack.loadBestFormatWithUrl(YoutubeAudioTrack.java:211) ~[youtube-plugin-1.14.0.jar!/:na]
        at dev.lavalink.youtube.track.YoutubeAudioTrack.processWithClient(YoutubeAudioTrack.java:148) ~[youtube-plugin-1.14.0.jar!/:na]
        at dev.lavalink.youtube.track.YoutubeAudioTrack.process(YoutubeAudioTrack.java:94) ~[youtube-plugin-1.14.0.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.track.DelegatedAudioTrack.processDelegate(DelegatedAudioTrack.java:25) ~[lavaplayer-2.2.3.jar!/:na]
        at com.github.topi314.lavasrc.mirror.MirroringAudioTrack.process(MirroringAudioTrack.java:56) ~[lavasrc-plugin-4.8.1.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:109) ~[lavaplayer-2.2.3.jar!/:na]
        ... 4 common frames omitted

slim current
#

You can always use the public api https://cipher.kikkia.dev/ or use the official docker image.
There is nowhere in the service that returns any 300 codes, so that is likely from whatever you are hosting it on

turbid loom
#

I was just about to say it's caused by railway itself

#

People should really stop using such stupid things and move to a vps

slim current
#

If the actual response still makes it to the client, just with a 300 code maybe we can relax the plugin to treat it as a non error, but idk how these hosts handle their http gateways and what not

wet sundial
#

@slim current hey bro the read timeout error most of the time any fix of this ?

silver salmon
#

add timeouts

silver salmon
wet sundial
scenic fox
#

Send your config
Then we can tell you if it's correct or not

#

But if 10s isn't enough timeout you should consider if something else is broken in your setup

#

If it doesn't work, could also be that your lavalink is outdated

slim current
#

Also if you are on a really old yt-cipher and a slow machine the AST on script download could hit the 3s timeout by default.

wet sundial
scenic fox
#

Show your logs then
It shows all the versions

#

full logs

slim current
#

Also, i have probably asked you one of the most important questions half a dozen times to no answer, how often does this happen? 100% of the time? 10%? <1%?

wet sundial
slim current
#

So this happens say after X video loads, with the same player script that the others used?

#

Just making sure, because if this happens on a script thats already been processed and cached its very likely some networking hangup on the machine or smth

wet sundial
#

or i think sometime network hangup hope so

slim current
#

How long does it take on a fresh restart to happen? Minutes, hours? If you had to guess at how many videos are loaded before it happens how many do you think?

Couple things to try:

  • Setup a curl overnight or something to hit it like every couple seconds and see if those ever timeout (if possible over ipv4 and ipv6 separatetly to see if it has any effect)
  • Try hitting the public api for a while and see if those ever time out
#

Do you run in docker?

wet sundial
#

yes docker

slim current
#

Maybe we could have you add a debug log that just prints out the request duration within the yt-cipher server, so we can see if any requests actually take long enough to trigger a timeout

#

So we can determine if its yt-cipher being super slow for some reason or if its some networking thing somewhere

wet sundial
#

okay

slim current
#

If you add a try / finally block around all of the baseHandler function, and log the total duration elapsed in the finally block that should log it on every request.

In the docker-compose file uncomment out the build, context and dockerfile lines, and make the image line commented.

Then just run docker-compose build to build a fresh image with your new logs

nova bridge
slim current
nova bridge
#

and run on 1.14?

#

ok thank you. im getting a load failed now but ill figure that out

nova bridge
silver salmon
#

use oauth

nova bridge
#

u too kikka

#

i got my cipher to work too. i had http instead of https

sand kite
#

Wait what is the use of reolve_url??

silver salmon
#

tells you

turbid loom
#

But wait, is it automatically picked up by the yt plugin?

#

or nah?

slim current
#

Its a new endpoint that does a lot more work than decrypting the cipher, it also constructs the full playback url
Make sure to update your yt-cipher service (if you self host) before doing the update of the plugin

#

Caused by: java.io.IOException: Decryption proxy request failed with status code: 301. Response:?
This means that your host you are running yt-cipher on is messing with the http responses from yt-cipher, you may need to mess around with it to figure out how to make it let you talk directly to yt-cipher

nova bridge
meager moon
nova bridge
meager moon
nova bridge
#

yeah

meager moon
#

Wait let me share my app.yml

#

My app.yml

nova bridge
#

what are you hosting the lavalink server on?

#

locally?

meager moon
nova bridge
#

so you probably wouldnt use local host right? they are deployed separate?

turbid loom
#

you would if both are hosted on the same vps

nova bridge
#

right

meager moon
nova bridge
#

Here is my app.yml for reference. my lavalink and cipher run separate.

lavalink:
    plugins:
        - dependency: dev.lavalink.youtube:youtube-plugin:1.14.0
          snapshot: false
        - dependency: com.github.topi314.lavasearch:lavasearch-plugin:1.0.0
          snapshot: false
        - dependency: com.github.topi314.lavasrc:lavasrc-plugin:4.8.1
          snapshot: false
    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: 5000
        gc-warnings: true
        nonAllocatingFrameBuffer: false
        opusEncodingQuality: 10
        password: youshallnotpass
        playerUpdateInterval: 5
        resamplingQuality: LOW
        soundcloudSearchEnabled: true
        sources:
            bandcamp: true
            http: true
            local: false
            nico: true
            soundcloud: true
            twitch: true
            vimeo: true
            youtube: false
        timeouts:
            connectTimeoutMs: 10000
            connectionRequestTimeoutMs: 10000
            socketTimeoutMs: 10000
        trackStuckThresholdMs: 10000
        useSeekGhosting: true
        youtubePlaylistLoadLimit: 6
        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:
    lavalyrics:
        sources:
            - spotify
            - youtube
    lavasrc:
        applemusic:
            albumLoadLimit: 6
            countryCode: US
            playlistLoadLimit: 6
        providers:
            - ytsearch:"%ISRC%"
            - ytsearch:%QUERY%
            - scsearch:%QUERY%
            - spsearch:%QUERY%
            - sprec:%QUERY%
        sources:
            applemusic: true
            deezer: false
            flowerytts: false
            spotify: true
            vkmusic: false
            yandexmusic: false
            youtube: true
        spotify:
            albumLoadLimit: 6
            clientId: ###
            clientSecret: ###
            localFiles: false
            playlistLoadLimit: 6
            preferAnonymousToken: true
            resolveArtistsInSearch: false
    youtube:
        clients:
            - TV
            - TVHTML5EMBEDDED
        oauth:
            enabled: true
        remoteCipher:
            password: noctra
            url: https://cipher-socket-production.up.railway.app
sentry:
    dsn: ""
    environment: ""
server:
    address: 0.0.0.0
    http2:
        enabled: false
    port: 31663
meager moon
nova bridge
#

you dont need any other youtube settings besides what i have set and as far as i am aware, the 301 status is a problem with the cipher.

#

yes and you may use it if you would like

turbid loom
#

and i also use vps

meager moon
slim current
nova bridge
meager moon
#

Using docker

turbid loom
#

your token might be invalid in the docker compose file

meager moon
turbid loom
#

and the app.yml

meager moon
slim current
#

Not the full error, but my guess that Missing Api ... is missing api token?
Also the Something Broke When Playing Track is not the actual error, read the whole stack trace you will find caused by: ACTUAL ERROR

turbid loom
#

docker doesn't take .env if i remember right

#

or does it?

slim current
#

It does if you volume it in I think

turbid loom
#

i run it with deno directly

#

because with docker it just caused issues whenever i modified the token in composer file

#

💀

#

it instantly crashed

#

and worked fien with the defaults

#

fine*

slim current
#

With docker it only has access to the .env file if you specifically add a docker volume in the compose so that it can actaully access the .env file on your fs

turbid loom
#

Aha

slim current
#

But just using the environment section in the compose yml is easiest imo. It doesnt have enough env variables to warrent an env file, for me at least.

turbid loom
#

I guess that explains why it crashed for me whenever i modified the composer file

turbid loom
#

fun fact, that's where my shit failed

slim current
#

Show an error?

turbid loom
#

hold on

meager moon
#

Xd

#

I will need to find the error part only

turbid loom
#

nvm, managed to solve

wet sundial
#
#
# Fatal JavaScript out of memory: Reached heap limit
#
==== C stack trace ===============================

    deno(+0x2cb1758) [0xaaaae37d1758]
    deno(+0x2cb0654) [0xaaaae37d0654]
    deno(+0x2cb4c28) [0xaaaae37d4c28]
    deno(+0x2d05db4) [0xaaaae3825db4]
    deno(+0x2ed024c) [0xaaaae39f024c]
    deno(+0x2ece118) [0xaaaae39ee118]
    deno(+0x2ec4250) [0xaaaae39e4250]
    deno(+0x2ec20d0) [0xaaaae39e20d0]
    deno(+0x2ea6f9c) [0xaaaae39c6f9c]
    deno(+0x3316b4c) [0xaaaae3e36b4c]
    deno(+0x42daf04) [0xaaaae4dfaf04]
Player cache directory ensured at: /usr/src/app/player_cache
Initialized 4 workers
Server listening on http://[::]:8001
Listening on http://[::]:8001/

<--- Last few GCs --->

[7:0xffff38120000] 21024699 ms: Scavenge 1982.2 (2057.4) -> 1982.1 (2068.9) MB, pooled: 0.0 MB, 35.44 / 0.00 ms (average mu = 0.710, current mu = 0.247) allocation failure;
[7:0xffff38120000] 21026553 ms: Mark-Compact (reduce) 1997.6 (2072.2) -> 1995.3 (2050.4) MB, pooled: 0.0 MB, 261.35 / 0.00 ms (+ 1441.3 ms in 249 steps since start of marking, biggest step 17.1 ms, walltime since start of marking 1854 ms) (average mu = 0.

#

@slim current hey you know the issue ?

meager moon
nova bridge
# meager moon This is the error

I dont think the cipher was found.

Remote cipher service request to resolve URL failed with status code: 404. Response: {"error":"Not Found"}

meager moon
#

But, My Yt cipher is hosted properly

turbid loom
#

since it says out of memory

wet sundial
turbid loom
#

your vps or the ram allocated to your js project?

wet sundial
turbid loom
#

You said it's already 8 gb and i asked you

#

8 gb what, the ram of your vps or the one yOU gave to yt-cipher?

wet sundial
#

ram of the vps

turbid loom
#

anyway, add this --v8-flags="--max-old-space-size-8192" if you want to give it 8 GB

#

or just change to 4096 for 4 GB

wet sundial
#

how much needed?

#

i did set the still its show heap limit

turbid loom
#

Odd, usually this process resolves that issue

nova bridge
# meager moon Yea

not really sure how to help other than saying it is a configuration issue. I changed how my url and password were formatted in my app.yml and it worked.

you are welcome to use my cipher if it comes to it.

slim current
slim current
#

and how many active players do you average? Are we talking in the thousands?

#

Only time I have seen that happen is on an old version that had a memory creep over thousands of decodes

meager moon
slim current
#

If using docker, what is the image sha?

eager pewter
#

I have found an issue with v1.14.0 that songs start but it's not audible and to fix this I need to make the bot disconnect and play again or simply change the vc region.

I'm confused whether it's related with YT-Cipher or something else?

slim current
#

Likely not, but if you go back to the older versions does it still happen?

eager pewter
#

I'mma try with latest cipher and 1.15.0

slim current
#

Oh wait, on 1.14? my bad I thought you meant 1.15 already. Umm with 1.14 I dont think there is any change that would cause that issue, in theory maybe 1.15 could if something in url construction was overlooked, but my bot which plays about 30k yt tracks per day has been using 1.15 for a few days and no complaints of it so far on my end. Not impossible, but i have heard that issue of not starting a track for years every so often

naive wagon
eager pewter
naive wagon
#

to see if it gets fixed

#

somehow

eager pewter
eager pewter
#

upgraded to latest version but still same issue

I have attached the screenshot, in both screenshots track was started but the bot isn't showing in the voice debug

then after changing vc region or making the bot disconnect and playing again worked

#

@naive wagon which lavalink wrapper are you using?

#

I think the issue is from Lavalink or maybe the library because the plugin is working fine.

slim current
#

I think the issue is more with discord, the LL client or LL itself rather than yt-cipher. I've heard of this issue long before yt-cipher tho

eager pewter
#

well i've fixed this by sending op: 4 event on player create with some retry and verification logics

slim current
#

What client lib do you use? I wonder if that issue comes from improper client library handling

eager pewter
#

I think it may occur due to high latency in the host maybe not sure but it's fixed now

slim current
#

Nice, might be worth writing down what you did or something, I see that question a bit, would be nice to have something for them to try

eager pewter
timid garden
#

tbh it has nothing to do with cipher

eager pewter
radiant ermine
crude nymph
#

Hello @slim current, I found a bug concerning the clearing of old players after x days. It still does not delete the old files. In the meantime, I restarted, but since adding it, there has been a slight bug. Am I the only one with this issue ?

#

Or is it that if the old player lasted more than x days, it gets deleted ?

#

My mistake, I found the issue that was causing the problem. Sorry for the inconvenience.

wanton drift
#

Unsure if anyone else randomly started getting these errors, but I updated to the newest lavasrc, youtube-source, and yt-cipher and weirdly yt-cipher is throwing 404 not found errors:

2025-10-15T23:51:42.379Z ERROR 404838 --- [Lavalink] [back-1-thread-1] c.s.d.l.t.p.LocalAudioTrackExecutor      : Error in playback of jYdaQJzcAcw

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.3.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:121) ~[lavaplayer-2.2.3.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$2(DefaultAudioPlayerManager.java:339) ~[lavaplayer-2.2.3.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.io.IOException: Remote cipher service request to resolve URL failed with status code: 404. Response: {"error":"Not Found"}
        at dev.lavalink.youtube.cipher.RemoteCipherManager.validateAndGetResponseBody(RemoteCipherManager.java:178) ~[youtube-plugin-e10cb6a8bd8ff2b80da9303bb0a6c740c3ea9e2c.jar!/:na]
        at dev.lavalink.youtube.cipher.RemoteCipherManager.resolveUrl(RemoteCipherManager.java:157) ~[youtube-plugin-e10cb6a8bd8ff2b80da9303bb0a6c740c3ea9e2c.jar!/:na]
        at dev.lavalink.youtube.cipher.RemoteCipherManager.resolveFormatUrl(RemoteCipherManager.java:66) ~[youtube-plugin-e10cb6a8bd8ff2b80da9303bb0a6c740c3ea9e2c.jar!/:na]
        at dev.lavalink.youtube.track.YoutubeAudioTrack.loadBestFormatWithUrl(YoutubeAudioTrack.java:225) ~[youtube-plugin-e10cb6a8bd8ff2b80da9303bb0a6c740c3ea9e2c.jar!/:na]
        at dev.lavalink.youtube.track.YoutubeAudioTrack.processWithClient(YoutubeAudioTrack.java:151) ~[youtube-plugin-e10cb6a8bd8ff2b80da9303bb0a6c740c3ea9e2c.jar!/:na]
        at dev.lavalink.youtube.track.YoutubeAudioTrack.process(YoutubeAudioTrack.java:97) ~[youtube-plugin-e10cb6a8bd8ff2b80da9303bb0a6c740c3ea9e2c.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:109) ~[lavaplayer-2.2.3.jar!/:na]
        ... 4 common frames omitted

@slim current I reverted back to older versions that previously worked for me and they are all throwing the same as well which is odd

wanton pendant
#

Me too

silver salmon
#

instead of a 404 im getting 500 from youtube.

#
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
Caused by: java.io.IOException: Invalid status code for player api response: 500
        at com.sedmelluq.discord.lavaplayer.tools.io.HttpClientTools.assertSuccessWithContent(HttpClientTools.java:168) ~[lavaplayer-2.2.4.jar!/:na]
        at dev.lavalink.youtube.clients.skeleton.NonMusicClient.loadJsonResponse(NonMusicClient.java:66) ~[youtube-plugin-1.15.0.jar!/:na]
        at dev.lavalink.youtube.clients.skeleton.NonMusicClient.loadTrackInfoFromInnertube(NonMusicClient.java:139) ~[youtube-plugin-1.15.0.jar!/:na]
        at dev.lavalink.youtube.clients.skeleton.StreamingNonMusicClient.loadFormats(StreamingNonMusicClient.java:35) ~[youtube-plugin-1.15.0.jar!/:na]
        at dev.lavalink.youtube.track.YoutubeAudioTrack.loadBestFormatWithUrl(YoutubeAudioTrack.java:214) ~[youtube-plugin-1.15.0.jar!/:na]
        at dev.lavalink.youtube.track.YoutubeAudioTrack.processWithClient(YoutubeAudioTrack.java:151) ~[youtube-plugin-1.15.0.jar!/:na]
        at dev.lavalink.youtube.track.YoutubeAudioTrack.process(YoutubeAudioTrack.java:97) ~[youtube-plugin-1.15.0.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.track.DelegatedAudioTrack.processDelegate(DelegatedAudioTrack.java:25) ~[lavaplayer-2.2.4.jar!/:na]
        at com.github.topi314.lavasrc.mirror.MirroringAudioTrack.process(MirroringAudioTrack.java:56) ~[lavasrc-plugin-5.11.0.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:109) ~[lavaplayer-2.2.4.jar!/:na]
        ... 4 common frames omitted```
#
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.4.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:121) ~[lavaplayer-2.2.4.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$2(DefaultAudioPlayerManager.java:339) ~[lavaplayer-2.2.4.jar!/:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]```
#

2 parts.

stone terrace
#

Youtube itself is having issues over 300k reports about it

wanton drift
wanton drift
stone terrace
#

its working again for me

wanton drift
#

lol yea that was quick

spiral ocean
#

wasnt quick

#

lmao

#

was down for the last hour

#

still is

wanton drift
#

i meant quick as in from the time i reported the issue to it 'working' again lul

spiral ocean
#

someone getting fired fr

wanton drift
#

rip call susan

silver salmon
#

call google

crude nymph
#

its work for me ^^

river siren
#

Hey y'all, I'm using yt-cipher for my music bot and still getting the "please sign in" when I try to play a song. Common issues says I have to enable OAuth. How do I go about this?

river siren
#

okay thanks

velvet merlin
#

skipInitialization: true
If you alr have a refreshToken then

slim gate
# river siren so even if I'm using yt cipher I still have to add the requestToken and skipInit...

First run:

  • do not specify refreshToken
  • do not specify skipInitialization
    once you have completed the oauth flow and linked an account, youtube-source will log your account refresh token in your terminal output. You can specify this in your application.yml to avoid doing the oauth flow again

skipInitialization is optional with a refresh token. If you supply a valid token, it won't prompt the oauth flow at all. If it's invalid or not supplied, initialization will begin unless skipInitialization is set to true.

river siren
sacred harbor
#

This is probably a stupid question, but i don't have the time to keep up with the changes and couldn't find it in search: What is 'encrypted_signature' and am I supposed to provide it myself or something? I updated cipher and yt-plugin like two days ago and problems started popping up.

Lavalink 4.0.8
youtube-plugin 1.15.0
yt-cipher should be the latest (idk an effective way to update shit in docker other than git pull && docker compose up -d)

getting friendly exception in lavalink, which boils down to:

2025-10-17T19:08:24.307+02:00  INFO 1025289 --- [Lavalink] [  XNIO-1 task-3] l.server.io.RequestLoggingFilter         : PATCH /v4/sessions/c94mruxkienr9gc6/players/477930709030404117?noReplace=false, client=127.0.0.1, payload={"track":{"encoded":"QAAA7gMASVbDhkIgLSBSw5NBIChMSVZFKSB8IEljZWxhbmQg7aC87beu7aC87be4IHwgR3JhbmQgRmluYWwgfCBFdXJvdmlzaW9uIDIwMjUAF0V1cm92aXNpb24gU29uZyBDb250ZXN0AAAAAAAC0qgAC2M3M0x4MVFVWlpBAAEAK2h0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9YzczTHgxUVVaWkEBADBodHRwczovL2kueXRpbWcuY29tL3ZpL2M3M0x4MVFVWlpBL21xZGVmYXVsdC5qcGcAAAd5b3V0dWJlAAAAAAAAAAA="}}
2025-10-17T19:08:24.414+02:00 ERROR 1025289 --- [Lavalink] [back-1-thread-1] c.s.d.l.t.p.LocalAudioTrackExecutor      : Error in playback of c73Lx1QUZZA
.
.
.
Caused by: java.io.IOException: Remote cipher service request to resolve URL failed with status code: 400. Response: {"error":"Invalid request body: 'encrypted_signature' is missing or invalid"}
        at dev.lavalink.youtube.cipher.RemoteCipherManager.validateAndGetResponseBody(RemoteCipherManager.java:183) ~[youtube-plugin-1.15.0.jar!/:na]
.
.
.

config file: https://pastebin.com/FMHRNXwX

slim current
#

docker-compose pull should grab the newest image

#

That error I think is from a slightly older version of yt-cipher when using 1.15.0

sacred harbor
#

That seems to fix this issue, thank you!
Now i only sometimes (rarely?) get java.net.SocketTimeoutException: Read timed out, but I suppose that's not yt-cipher related anymore.

slim current
#

Hmm, do you know how often? You can try adding this to the LL config

lavalink:
  server:
    timeouts:
      connectTimeoutMs: 10000
      connectionRequestTimeoutMs: 10000
      socketTimeoutMs: 10000

I think I have seen some other people with ipv6 on hetzner getting those

wanton drift
#
java.io.IOException: UT002002: Channel is closed
        at io.undertow.websockets.core.WebSocketChannel.send(WebSocketChannel.java:354) ~[undertow-core-2.3.13.Final.jar!/:2.3.13.Final]
        at io.undertow.websockets.core.WebSockets.sendInternal(WebSockets.java:906) ~[undertow-core-2.3.13.Final.jar!/:2.3.13.Final]
        at io.undertow.websockets.core.WebSockets.sendInternal(WebSockets.java:900) ~[undertow-core-2.3.13.Final.jar!/:2.3.13.Final]
        at io.undertow.websockets.core.WebSockets.sendText(WebSockets.java:63) ~[undertow-core-2.3.13.Final.jar!/:2.3.13.Final]
        at io.undertow.websockets.core.WebSockets.sendText(WebSockets.java:50) ~[undertow-core-2.3.13.Final.jar!/:2.3.13.Final]
        at lavalink.server.io.SocketContext.send(SocketContext.kt:165) ~[classes!/:4.1.1]
        at lavalink.server.io.SocketContext.sendMessage(SocketContext.kt:149) ~[classes!/:4.1.1]
        at lavalink.server.io.SocketContext$WsEventHandler.gatewayClosed(SocketContext.kt:228) ~[classes!/:4.1.1]
        at moe.kyokobot.koe.internal.EventDispatcher.gatewayClosed(EventDispatcher.java:47) ~[core-2.1.1.jar!/:na]
        at moe.kyokobot.koe.gateway.AbstractMediaGatewayConnection.onClose(AbstractMediaGatewayConnection.java:141) ~[core-2.1.1.jar!/:na]
        at moe.kyokobot.koe.gateway.MediaGatewayV8Connection.onClose(MediaGatewayV8Connection.java:168) ~[core-2.1.1.jar!/:na]
        at moe.kyokobot.koe.gateway.AbstractMediaGatewayConnection.close(AbstractMediaGatewayConnection.java:100) ~[core-2.1.1.jar!/:na]
        at moe.kyokobot.koe.internal.MediaConnectionImpl.disconnect(MediaConnectionImpl.java:70) ~[core-2.1.1.jar!/:na]
        at moe.kyokobot.koe.internal.MediaConnectionImpl.close(MediaConnectionImpl.java:250) ~[core-2.1.1.jar!/:na]
        at moe.kyokobot.koe.internal.KoeClientImpl.destroyConnection(KoeClientImpl.java:44) ~[core-2.1.1.jar!/:na]
        at lavalink.server.io.SocketContext.destroyPlayer(SocketContext.kt:137) ~[classes!/:4.1.1]
        at lavalink.server.io.SocketContext.shutdown$Lavalink_Server(SocketContext.kt:201) ~[classes!/:4.1.1]
        at lavalink.server.io.SocketServer.afterConnectionClosed(SocketServer.kt:168) ~[classes!/:4.1.1]
        at org.springframework.web.socket.handler.WebSocketHandlerDecorator.afterConnectionClosed(WebSocketHandlerDecorator.java:85) ~[spring-websocket-6.1.9.jar!/:6.1.9]
        at org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator.afterConnectionClosed(LoggingWebSocketHandlerDecorator.java:72) ~[spring-websocket-6.1.9.jar!/:6.1.9]
        at org.springframework.web.socket.handler.ExceptionWebSocketHandlerDecorator.afterConnectionClosed(ExceptionWebSocketHandlerDecorator.java:78) ~[spring-websocket-6.1.9.jar!/:6.1.9]
        at org.springframework.web.socket.adapter.standard.StandardWebSocketHandlerAdapter.onClose(StandardWebSocketHandlerAdapter.java:144) ~[spring-websocket-6.1.9.jar!/:6.1.9]
        at io.undertow.websockets.jsr.UndertowSession.closeInternal(UndertowSession.java:236) ~[undertow-websockets-jsr-2.3.13.Final.jar!/:2.3.13.Final]
        at io.undertow.websockets.jsr.UndertowSession.close(UndertowSession.java:195) ~[undertow-websockets-jsr-2.3.13.Final.jar!/:2.3.13.Final]
        at org.springframework.web.socket.adapter.standard.StandardWebSocketSession.closeInternal(StandardWebSocketSession.java:237) ~[spring-websocket-6.1.9.jar!/:6.1.9]
        at org.springframework.web.socket.adapter.AbstractWebSocketSession.close(AbstractWebSocketSession.java:144) ~[spring-websocket-6.1.9.jar!/:6.1.9]
        at lavalink.server.io.SocketContext.closeWebSocket(SocketContext.kt:208) ~[classes!/:4.1.1]
        at lavalink.server.io.SocketContext.closeWebSocket(SocketContext.kt:212) ~[classes!/:4.1.1]
        at lavalink.server.io.ShutdownHandler.run(ShutdownHandler.kt:13) ~[classes!/:4.1.1]

new error I've come across with latest version, but seems to have not happened since around 2023

#

#1130136181082947664 message I've read topis explanation for it and am gonna deep dive a bit more and see wat could be causing it on my end, however if anyone has any insight it would be great as well 😄

spiral ocean
#

the error is the discord voice server ending

wanton drift
#

ill make a new help post for it

slim current
#

new player script incoming that will require a people to pull a new version of yt-cipher soon. Ill work on it when im home in a like 5 or 6 hrs

naive wagon
naive wagon
#

i might try implementing this thnx

proper shore
slim current
#

Auto updates? Not super feasible without restarting the process and pulling the update. That's the unfortunate reality of self hosting, luckily it's super quick and the service spins up in just a few seconds so a simple docker-compose pull and down/up is all you need. You could write a basic bash script to do that command and if it pulls a new image then reboot, put it on a 1hr timer or smth, that's a workaround for auto updates I guess

#

"gptcoder" just ask an AI to do the bash script should be simple enough for them to handle

scenic fox
#

it could be worse

#

you could have to restart your lavalink

honest tartan
proper shore
slim current
#

ill post aometning when its done

slim current
honest tartan
#

yts.version: 1.13.5

slim current
slim current
#

Newest build of YT-cipher fixes this bad script 638ec5c6

scenic fox
#

yt-dlp ejs 0.1.0 release 👁️

slim current
#

yeah next thing is to see if we can use their recent changes for getting it release ready to just pull in the js as a dep rather than git cloning it 😂.

fathom acorn
slim current
#

if you are using docker just pull the latest image

naive wagon
#

@slim current i'm using deno so please update the readme for the newest build the git checkout part

slim current
#

I wont update the readme as it will just change when they merge into their master branch (when they do I will update the readme)

What you can do is look at the steps taken in the docker file and follow those or wait for it to merge (i would imagine soon)

#

Basically just download ejs from this fork instead
git clone https://github.com/seproDev/ejs.git
then checkout this branch in the ejs
cd ejs && git checkout fix-sig
Then just patch it as normal and run it

wet sundial
#

suddenly i getting this @slim current

slim current
#

Did you do anything to cause this? Update yt-source?

#

Newer yt-souce 1.15 I think uses a new endpoint that you may need to update yt-cipher to get if you use an old yt cipher

wet sundial
slim current
#

I dont understand. Did you do anything when this started? Or like "I woke up and it broke randomly in the night" kind of thing?

My first guess with such low amount of details is, you updated to newest yt-source plugin but self host an old version of yt-cipher, but I cant know without more info

wet sundial
wet sundial
#

no old version

slim current
#

how are you running yt-cipher, also check your LL config maybe you are pointing to the to the wrong address or something, resolveUrl this is the newer endpoint not in old yt-cipher versions. Double check the remoteCipher url in your config and also make sure you pulled the newest docker image / run the latest commit on master from the gh repo (if just using deno)

wet sundial
slim current
#

3 fixes, use the newest yt-cipher, or downgrade your yt-source, or use the public one I guess

wet sundial
#

👍

eager pewter
#

do I need to increase or decrease more?

crude nymph
#

Yes or improve your connection

slim current
#

I have never seen a request take more than maybe 2 seconds, and thats on a potato that is doing script prepossessing, so literal worst case, normally your looking at 2ms for preprocessed and maybe 500ms for the first request for a script. Increasing or decreasing won't help you here. Correct me if I am wrong but here is what I remember of you hitting this issue for a while

  • IPV6
  • Hosting on the same machine LL is on
  • Tried upping timeout
  • Doesn't happen all the time

Does this ever happen if you use another service like the public api?
Did you ever run the curl commands (I think I sent you a while back) to see if any of those timeout?
Did you ever try doing this on a machine from another host?

If I had to guess, its most likely some ipv6 networking setup thing on the machine. Maybe a version of yt-source with some extra logging is needed

eager pewter
spiral ocean
#

but at the same time could just yt lol

#

ever have a yt page be slow etc

#

just normal network shit

sand harness
#

@fierce tusk \

turbid loom
#

yt cipher is a separate thing from spotify tokener

#

check the pinned text

onyx bronze
#

thats a different project btw from this, contact me if there are any problems or open issues

scenic fox
#

this thread is about the "official" cipher service

#

so if you use anything else, not in here

#

doesnt matter if its mentioned or not

#

you can just use the official tho

north ferry
#

its fine, it got fixed.

nova bridge
#

is there anyway to make yt-cipher use less ram?

#

green line is yt-cipher, blue is lavalink

slim current
#

You could run it on less threads, by default it spawns 1 thread for each thread on the host, you can set it with the MAX_THREADS env var I think. 1 is fine unless you are serving like many hundreds if not 1k+ players. Less workers will make an impact on mem usage

#

Unfortunately though each player script is like 20-40mb of ram use to emulate iirc. I can look more into some more efficent caching, but it may require some ejs changes

spiral ocean
#

yk just let it use 1 million

nova bridge
#

i reduced it

#

only uses like 250 now

slim current
#

I played around a little with adding tree shaking to the EJS preprocessing step. It added ~7% preprocess time for a ~13% mem savings so not too bad. But those solver functions really touch almost everything in the script if it only was able to drop 13% of the script file. Even though it worked, it also could not account for dynamic accesses, so in theory if they started doing dynamic accesses in their obfuscation it could break. So it's probably best to just leave it out. RAM usage is not too bad, although in this economy scared

scenic fox
#

how long is stuff cached for anyway?

#

dunno how big the cache is anyway

slim current
#

Until either process restart, or max cache size is reached. Its just a LRU cache with no TTL

#

Default is 150 scripts, which is really high. Could def lower it. I doubt anyone reaches 150 though. Even my public one which touches many regional scripts maybe hits 60-70 before the deno garbage men come around and clear it out

spiral ocean
#

prob doesnt reach more then 3 at once

scenic fox
#

I'd prob add a ttl

spiral ocean
#

once a new script comes out the old one is done forever and ever

scenic fox
#

but then, if deno gcs the map its prob fine

slim current
#

For sure, haven't added a TTL yet because 1. its not that much mem, and 2 deno GC seems to handle it when you start using a lot of mem

scenic fox
#

meh, idk kinda useless to cache a script which as no usages for 24h

slim current
#

For sure, haven't had a need to add that complexity yet though. The cached scripts themselves I think clear after 7 or 30 days from FS

#

Script is cached to disk for some amount of days, the AST processed scripts are in mem in the LRU

scenic fox
# nova bridge

would be interesting to see whats the biggest memory hog in this case

slim current
#

Looking at my pub node it peaked yesterday at 2 worker threads, 110 cached scripts, 2.5GB mem usage then after GC it went down to 30 scripts and 900Mb

scenic fox
#

yeah you should definitely consider running some more aggressive ttl then

#

i mean its fine if you have the ram, but not everyone does
but then
they also can just use your public node lol

slim current
#

Right now if you set a lower cache or worker thread count it can run really lean

#

esp if you just serve 1 region, so you are always serving en_GB or something

#

each worker thread has its own instance of the AST tools used by ejs iirc, which is also a bit of a hog.

#

I will probably just drop the defaults to like 4 worker thread max, and cache at like 15 by default or smth

#

I was trying to figure out the est RPS per active player and its so damn low even 1 worker thread is probably fine unless you have a huge bot

1 player loading a vid every 3 mins takes 180 players to reach even 1 RPS, and when even my slow ass arm cores serve an avg response time of 1-2ms cpu time. I think it's fine for anyone short of like the biggest ones

slim current
#

Thank you for this in depth question seeking help. I can let you know, this error code has nothing to do with yt-cipher. it is common for many reasons, ranging from private video, removed video, region lock, age lock, account flagged, ip flagged, etc. This error comes before YT-cipher does its main cipher work anyways iirc

still spoke
#

Hello, is there a bug with the plugin or something else? I restarted everything 5 minutes ago, relaunched my bot, and when I try to play music, I get a bunch of stuff in Lavalink, for example, "suspicious exception".

eager pewter
still spoke
eager pewter
still spoke
#

YouTube plugins 1.16.0

#

It was working perfectly, I stopped to update the discord.js dependency, and since then it's been doing this: I have to search for a title and launch it, or launch the playlist directly 😅

fathom acorn
#

I'm also having a problem using individual links like https://www.youtube.com/watch?v=5RpDkUT4IHM it's not found, I use link playlist or play use title it works

✘ Zach Hood - never knew a heart could break itself (Lyrics)
🔔 Click the bell to stay updated.

✘ Stream/DL:
ZachHood.lnk.to/NeverKnewAHeartCouldBreakItself

✘ Follow Zach Hood:
https://www.instagram.com/zachary.hood
https://www.tiktok.com/@zach.hood
https://open.spotify.com/artist/5aHlyw2WWqZW0HLICBuv7U

🎤 Lyrics:

You're getting u...

▶ Play video
eager pewter
still spoke
eager pewter
#

Discord.js is not related with this

still spoke
still spoke
#

I also use Kikkia's link for its decoder; maybe that's the problem on her end, I don't know.

eager pewter
#

I'm using self hosted cipher but same issue.

still spoke
fathom acorn
still spoke
# fathom acorn This problem I just encountered today is probably not due to the udpate package ...

Okay, I didn't pay attention at all. It had been a month since I restarted it, and everything was still working this morning without any errors. I think it's the Cypher side I'm using; maybe it's the creator's audience. I'm only seeing that right now. Or maybe they changed something on the Spotify or YouTube side, but I doubt it. As for Lavalink, I just restarted and refreshed the YouTube and Spotify tokens.

scenic fox
#

Instead of spamming useless messages you all you should read the POST GUIDELINES and send the things it requests

#

"Doesn't work* isn't useful for anyone to look into this to debug

slim current
#

These issues have 0 to do with yt-cipher, I know that was the last thing to change, but these suspicious track is not available, you must log in, etc exceptions come before yt-cipher is ever utilized to decipher anything. They come during track loading in innertube
at dev.lavalink.youtube.clients.skeleton.NonMusicClient.loadTrackInfoFromInnertube(NonMusicClient.java:148) ~[youtube-plugin-1.16.0.jar!/:na]

These errors come from primarily flagged IPs, or flagged accounts, etc. An account does not have to be banned to be flagged. From my observations running many many tracks over literally thousands of accounts. These errors are not predictable, but I notice them happen more to accounts that play a lot and mostly from a datacenter IP. If I run the node from a residential IP or its an account thats not constantly streaming they tend to go away. Thats my observations at least. Its a mix of heuristics that YT uses to flag you as "maybe a bot, but dont fully ban them yet" or something along those lines

still spoke
slim current
#

It's not necesisarilly just the account, from my testing it seems like they take a ton of different variables into account. The ones I have played a lot with are IP and account. For example I saw 1 account that played fine from my home, but if I used wiregaurd to have the traffic go through the VPS I run one of my LL nodes on, it would not load videos in the browser.

still spoke
#

@slim current I just tested it; I changed my YouTube token to an account that's never been used. I also changed my Spotify developer account, but it's still the same after restarting and testing. Do you think it could be an IP address or something like that?

scenic fox
#

Yt has nothing to do with Spotify

#

Try a different server

#

Then you will know

#

He already said that it can be the IP being banned above

still spoke
#

The administrator of my web hosting provider tested to see if my IP address was banned. Apparently, there were no blocks, nothing strange. I'll change it anyway and see.

#

😘

spiral ocean
spiral ocean
#

It just means u can hit the site

#

It doesn’t mean YouTube hasn’t flagged the network

#

If ur getting sign in issues while only hosting on a certain network it’s cause ur flagged

#

YouTube isn’t dumb they can see if a IP is Residential or not

still spoke
#

Do you think if I gave you a local example it would do the same thing? Sorry, I don't know much about this.

spiral ocean