Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Youtube error 403 #51

Open
Lezhek opened this issue Sep 21, 2024 · 28 comments
Open

Youtube error 403 #51

Lezhek opened this issue Sep 21, 2024 · 28 comments
Labels
bug Something isn't working

Comments

@Lezhek
Copy link

Lezhek commented Sep 21, 2024

Who are you? User (who just use bot from discord)/developer/admin (who download all bot stuff to host)?

Admin

Description

PlayingError +

  • Sign in to confirm you’re not a bot

dosen't work with cookies or if you are doing login:pass auth

Steps To Reproduce

/play *any youtube vid

How reliably can you recreate this issue using your steps above?

Always

@Lezhek Lezhek added the bug Something isn't working label Sep 21, 2024
@AlexInCube
Copy link
Owner

Did you fill yt-cookies.json as it says in Config Youtube Cookie?
Also i test right now my cookies and it works.

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

yes I did

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

I don't care about this throw away account so here are my cookies

[
{
    "domain": ".youtube.com",
    "expirationDate": 1761478924.598523,
    "hostOnly": false,
    "httpOnly": false,
    "name": "__Secure-1PAPISID",
    "path": "/",
    "sameSite": "unspecified",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "XKKoVOPhOSKYJocw/ADFPNTHxoBJk-6FM7",
    "id": 1
},
{
    "domain": ".youtube.com",
    "expirationDate": 1761478924.598517,
    "hostOnly": false,
    "httpOnly": true,
    "name": "__Secure-1PSID",
    "path": "/",
    "sameSite": "unspecified",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "g.a000oQgySOQzp8j_3AScwKOfRztd-e8OjYzCE77VrbYojRm46U9uyzL_g6xSXX5xiDSLMxu72wACgYKAUYSARMSFQHGX2Mi8kL2bp72nzTiRisWpNhb6RoVAUF8yKqpPU--R2gA0itwP-9RWWaX0076",
    "id": 2
},
{
    "domain": ".youtube.com",
    "expirationDate": 1758455026.359224,
    "hostOnly": false,
    "httpOnly": true,
    "name": "__Secure-1PSIDCC",
    "path": "/",
    "sameSite": "unspecified",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "AKEyXzVVHzIwjuyBkLGx6FqJQx-MdlSsRZ8IebiO54_3G4BODSRSI_oQxUFEgF5EjbslfwfWxw",
    "id": 3
},
{
    "domain": ".youtube.com",
    "expirationDate": 1758455022.384382,
    "hostOnly": false,
    "httpOnly": true,
    "name": "__Secure-1PSIDTS",
    "path": "/",
    "sameSite": "unspecified",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "sidts-CjIBQlrA-BsGljC8sm8FhiFvQgjZ6hinKcC38nYCrNxAh4n82zejzD_b-d0w6hAtsVNLShAA",
    "id": 4
},
{
    "domain": ".youtube.com",
    "expirationDate": 1761478924.598525,
    "hostOnly": false,
    "httpOnly": false,
    "name": "__Secure-3PAPISID",
    "path": "/",
    "sameSite": "no_restriction",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "XKKoVOPhOSKYJocw/ADFPNTHxoBJk-6FM7",
    "id": 5
},
{
    "domain": ".youtube.com",
    "expirationDate": 1761478924.598519,
    "hostOnly": false,
    "httpOnly": true,
    "name": "__Secure-3PSID",
    "path": "/",
    "sameSite": "no_restriction",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "g.a000oQgySOQzp8j_3AScwKOfRztd-e8OjYzCE77VrbYojRm46U9u8_SztAYEWm11YaMdHo6oVAACgYKAVgSARMSFQHGX2Mi8TSR8xCbC5Q3ZaywE9DWDRoVAUF8yKpVCpT3MfqNZ751__V1Drte0076",
    "id": 6
},
{
    "domain": ".youtube.com",
    "expirationDate": 1758455026.359274,
    "hostOnly": false,
    "httpOnly": true,
    "name": "__Secure-3PSIDCC",
    "path": "/",
    "sameSite": "no_restriction",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "AKEyXzUqqasJy10Y3OqWfWcil5cDv_UXj-EsDWWC5gXXm50pjTG1SrV0rfoED9YB6JcAXu3b",
    "id": 7
},
{
    "domain": ".youtube.com",
    "expirationDate": 1758455022.384486,
    "hostOnly": false,
    "httpOnly": true,
    "name": "__Secure-3PSIDTS",
    "path": "/",
    "sameSite": "no_restriction",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "sidts-CjIBQlrA-BsGljC8sm8FhiFvQgjZ6hinKcC38nYCrNxAh4n82zejzD_b-d0w6hAtsVNLShAA",
    "id": 8
},
{
    "domain": ".youtube.com",
    "expirationDate": 1761478924.598522,
    "hostOnly": false,
    "httpOnly": false,
    "name": "APISID",
    "path": "/",
    "sameSite": "unspecified",
    "secure": false,
    "session": false,
    "storeId": "0",
    "value": "Kma6Q115sDjjk8eJ/AMXPR6H9pIWTilctH",
    "id": 9
},
{
    "domain": ".youtube.com",
    "expirationDate": 1726920723.81322,
    "hostOnly": false,
    "httpOnly": true,
    "name": "GPS",
    "path": "/",
    "sameSite": "unspecified",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "1",
    "id": 10
},
{
    "domain": ".youtube.com",
    "expirationDate": 1761478924.59852,
    "hostOnly": false,
    "httpOnly": true,
    "name": "HSID",
    "path": "/",
    "sameSite": "unspecified",
    "secure": false,
    "session": false,
    "storeId": "0",
    "value": "A-UVFMd7W7nPv7jTu",
    "id": 11
},
{
    "domain": ".youtube.com",
    "expirationDate": 1761478990.687925,
    "hostOnly": false,
    "httpOnly": true,
    "name": "LOGIN_INFO",
    "path": "/",
    "sameSite": "no_restriction",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "AFmmF2swRQIhAJeEzsFWn-0FUoYvwnZPTkDQ6WUs3jfHL7oTttusFR1hAiBU_6ucose-qoQMh9K0Qs8TnO-ijQrQVwb8eiXliFxIgw:QUQ3MjNmeTRwWkVPTGpfRmdoaFhJQTRSSmRVcktwX2p1MlBaWHc1b3NHLTkxdVVHWVZ4Nl9Ick9DQWpQZzVUemI0dFVoMlpTRGNTUkhNNlJOa2x3bC1FSTVGQjhOanBtWU5DbkhjRGpWNUoyZWEtWHhTNWxzaEc1V0pmdGwzNW1XMzV0UkdVNlRGeHBXZDFuTEFTckhKMlMwdXBwV0tGV2lR",
    "id": 12
},
{
    "domain": ".youtube.com",
    "expirationDate": 1761479025.291081,
    "hostOnly": false,
    "httpOnly": false,
    "name": "PREF",
    "path": "/",
    "sameSite": "unspecified",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "f6=40000000&tz=Europe.Moscow",
    "id": 13
},
{
    "domain": ".youtube.com",
    "expirationDate": 1761478924.598523,
    "hostOnly": false,
    "httpOnly": false,
    "name": "SAPISID",
    "path": "/",
    "sameSite": "unspecified",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "XKKoVOPhOSKYJocw/ADFPNTHxoBJk-6FM7",
    "id": 14
},
{
    "domain": ".youtube.com",
    "expirationDate": 1761478924.598515,
    "hostOnly": false,
    "httpOnly": false,
    "name": "SID",
    "path": "/",
    "sameSite": "unspecified",
    "secure": false,
    "session": false,
    "storeId": "0",
    "value": "g.a000oQgySOQzp8j_3AScwKOfRztd-e8OjYzCE77VrbYojRm46U9u2muSkaO2vf7Zlwa2ejpEMwACgYKAUgSARMSFQHGX2MimOOE3cd8cUpnyXgSKLV0ZxoVAUF8yKo1wbc0mrFV-rprag8oscBe0076",
    "id": 15
},
{
    "domain": ".youtube.com",
    "expirationDate": 1758455026.359109,
    "hostOnly": false,
    "httpOnly": false,
    "name": "SIDCC",
    "path": "/",
    "sameSite": "unspecified",
    "secure": false,
    "session": false,
    "storeId": "0",
    "value": "AKEyXzV7dHgV2t4A71gUSkXv3eJX428cIMj5DH5PJuiX8s-Ygs4jNAuxi8ZO0hz7NTX0_HTy",
    "id": 16
},
{
    "domain": ".youtube.com",
    "expirationDate": 1761478924.598521,
    "hostOnly": false,
    "httpOnly": true,
    "name": "SSID",
    "path": "/",
    "sameSite": "unspecified",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "AdHBiYLyY9KYGliSj",
    "id": 17
}
]

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

I do use the US based VPS server if that matters

@AlexInCube
Copy link
Owner

Not age-restricted videos are works for you?

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

Not age-restricted videos are works for you?

No but I reinstalled the bot and refetched cookie files and it threw me the new error

DisTubeError [FFMPEG_EXITED] +

+ ffmpeg exited with code 8

@AlexInCube
Copy link
Owner

Can you set env var to
BOT_VERBOSE_LOGGING=true
BOT_FFMPEG_LOGGING=true
and then again try to play the song.
You will get in bot console debug messages.

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

Can you set env var to BOT_VERBOSE_LOGGING=true BOT_FFMPEG_LOGGING=true and then again try to play the song. You will get in bot console debug messages.

:error: I'm starting this channel off with a bang!

DisTubeError [FFMPEG_EXITED] +

+ ffmpeg exited with code 8

:error: Попробуйте другую песню, с этой какая-то ерунда происходит.

https://www.youtube.com/watch?v=Jh1snPoHKq8
Sign in to confirm you’re not a bot

@AlexInCube
Copy link
Owner

I am run your video https://www.youtube.com/watch?v=Jh1snPoHKq8 and it works for me

@AlexInCube
Copy link
Owner

On your VPS server run command "docker logs aic-bot" and you get debug errors

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

[ 21/09/2024 | 17:20:35 ] [ Audioplayer ] [1203423714423734342] [process] spawn: ffmpeg -reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5 -analyzeduration 0 -hide_banner -i https://rr3---sn-p5qs7nsk.googlevideo.com/videoplayback?expire=1726950034&ei=MtbuZpuQLLyAkucPy4y7wA8&ip=107.172.78.89&id=o-AFrVTjFxGY3akBxeqwHeDmThL3vrdrY3Dzg2PHortWcG&itag=251&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=Uu&mm=31%2C26&mn=sn-p5qs7nsk%2Csn-ab5l6ndy&ms=au%2Conr&mv=m&mvi=3&pl=24&initcwndbps=952500&siu=1&bui=AXLXGFR1Xc6dP3dIH5uc4F_aPixOrvHE7PPrhFUu1JLRmGaWzVqTz70w9UQbLPgol-I2YyLPzA&spc=54MbxfXjuVrllFJ7-hJFCHJB6m6hts0VegBAZN6zMG-uXChZdM1ETfydGrDN9bUayMENkapDZA&vprv=1&svpuc=1&xtags=drc%3D1&mime=audio%2Fwebm&ns=QayG-7fFtLxiSoi1m9BGqSoQ&rqh=1&gir=yes&clen=3456455&dur=252.201&lmt=1715621599294056&mt=1726928224&fvip=4&keepalive=yes&fexp=51299151&c=WEB&sefc=1&txp=6318224&n=hmU5mvoMJVSwhg&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Csiu%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cxtags%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIhAONtTjhyO5pu02eDyi-Q46PMCZ2Wb1KdQiB8GVn94N98AiB6aYhc4JuM0MGZ8bN9puBAbuU6747NF2wUrBVzTtQGZw%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ABPmVW0wRQIhAOl460qy8efIBghtgC6TNZIANX7jNxvXX27xiqTY-nnJAiBfuikJWiitsrhCRZAUbEtgfR97vC_UYtCpJbM_jb9uWA%3D%3D -ar 48000 -ac 2 -f s16le pipe:1
[ 21/09/2024 | 17:20:36 ] [ Audioplayer ] [1203423714423734342] [ffmpeg] log: [https @ 0x7f6cbfd03ac0] HTTP error 403 Forbidden
[ 21/09/2024 | 17:20:36 ] [ Audioplayer ] [1203423714423734342] [ffmpeg] log: [in#0 @ 0x7f6cc5b1f8c0] Error opening input: Server returned 403 Forbidden (access denied)
[ 21/09/2024 | 17:20:36 ] [ Audioplayer ] [1203423714423734342] [ffmpeg] log: Error opening input file https://rr3---sn-p5qs7nsk.googlevideo.com/videoplayback?expire=1726950034&ei=MtbuZpuQLLyAkucPy4y7wA8&ip=107.172.78.89&id=o-AFrVTjFxGY3akBxeqwHeDmThL3vrdrY3Dzg2PHortWcG&itag=251&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=Uu&mm=31%2C26&mn=sn-p5qs7nsk%2Csn-ab5l6ndy&ms=au%2Conr&mv=m&mvi=3&pl=24&initcwndbps=952500&siu=1&bui=AXLXGFR1Xc6dP3dIH5uc4F_aPixOrvHE7PPrhFUu1JLRmGaWzVqTz70w9UQbLPgol-I2YyLPzA&spc=54MbxfXjuVrllFJ7-hJFCHJB6m6hts0VegBAZN6zMG-uXChZdM1ETfydGrDN9bUayMENkapDZA&vprv=1&svpuc=1&xtags=drc%3D1&mime=audio%2Fwebm&ns=QayG-7fFtLxiSoi1m9BGqSoQ&rqh=1&gir=yes&clen=3456455&dur=252.201&lmt=1715621599294056&mt=1726928224&fvip=4&keepalive=yes&fexp=51299151&c=WEB&sefc=1&txp=6318224&n=hmU5mvoMJVSwhg&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Csiu%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cxtags%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIhAONtTjhyO5pu02eDyi-Q46PMCZ2Wb1KdQiB8GVn94N98AiB6aYhc4JuM0MGZ8bN9puBAbuU6747NF2wUrBVzTtQGZw%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ABPmVW0wRQIhAOl460qy8efIBghtgC6TNZIANX7jNxvXX27xiqTY-nnJAiBfuikJWiitsrhCRZAUbEtgfR97vC_UYtCpJbM_jb9uWA%3D%3D.
[ 21/09/2024 | 17:20:36 ] [ Audioplayer ] [1203423714423734342] [ffmpeg] log: Error opening input files: Server returned 403 Forbidden (access denied)
[ 21/09/2024 | 17:20:36 ] [ Audioplayer ] [1203423714423734342] [stream] log: stream finished
[ 21/09/2024 | 17:20:36 ] [ Audioplayer ] [1203423714423734342] [process] exit: code=8 signal=unknown
[ 21/09/2024 | 17:20:36 ] [ Audioplayer ] [1203423714423734342] [process] error: ffmpeg exited with code 8
[ 21/09/2024 | 17:20:36 ] [ Audioplayer ] [1203423714423734342] Error while playing: DisTubeError [FFMPEG_EXITED]: ffmpeg exited with code 8
    at ChildProcess.<anonymous> (/bot/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/distube/dist/index.js:994:26)
    at ChildProcess.emit (node:events:520:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)
[ 21/09/2024 | 17:20:36 ] [ Audioplayer ] [1203423714423734342] Queue is empty, stopping...

On your VPS server run command "docker logs aic-bot" and you get debug errors

@AlexInCube
Copy link
Owner

Maybe this video is blocked in US? Because you get 403 Forbidden error. Can you test Alan Walker - Faded on your bot?

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

Maybe this video is blocked in US? Because you get 403 Forbidden error. Can you test Alan Walker - Faded on your bot?

I literally opened it from the same IP and account(cookies) in my browser that the VPS is running. Same error with the video you sent me.

@AlexInCube
Copy link
Owner

alan walker is working for you or not?

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

alan walker is working for you or not?

no same error

@AlexInCube
Copy link
Owner

What if you tried playing the video without cookies at all?

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

What if you tried playing the video without cookies at all?

No error code just says to try out different video

@AlexInCube
Copy link
Owner

try out different video? i dont understand

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

try out different video? i dont understand

Sorry I am retarded. It doesn't let me to create docker for the bot without cookies

Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /root/AICoTest/yt-cookies.json

@AlexInCube
Copy link
Owner

so now you can play videos?

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

so now you can play videos?

Nope same error.

@AlexInCube
Copy link
Owner

Other services are works for you? This problems only with youtube?

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

Other services are works for you? This problems only with youtube?

Only youtube everything else (ya music, spotify, soundlcloud) works

@AlexInCube
Copy link
Owner

AlexInCube commented Sep 21, 2024

I don't even know how I can reproduce this bug. On my VDS and on my computer, everything works. I even copied the cookie file you provided and even with it I have Youtube working.

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

well If you'd want to I can give acess to my vps

@Lezhek
Copy link
Author

Lezhek commented Sep 21, 2024

that's probably ytdl-core issue

https://github.com/distubejs/ytdl-core/issues

funny but yt shorts actually works

@AlexInCube
Copy link
Owner

AlexInCube commented Sep 22, 2024

can you contact me in vk? https://vk.com/alexincube
i want to debug this problem with you

@AlexInCube
Copy link
Owner

Use proxy or vpn to resolve 403 error

@AlexInCube AlexInCube changed the title Youtube is not working Youtube error 403 Sep 22, 2024
@AlexInCube AlexInCube reopened this Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants