Closed PatrykPatryk5 closed 2 months ago
I had the same issue. Try npm update or npm i @distube/ytdl-core@latest that fixxed it for me.
i got the same issue aswell. it was fine until this morning. i didnt change anything either but bot disconnects immediately after joining vc and gives this error.
Same here, tried npm update or reinstalling ytdl-core, still nothing
anyone what should i do to make it work??
switch to soundcloud for now, youtube is being strict even after having cookies this time
youtube cooked
Same error anyone figureout?
Will it be resolved?
Here's the patch until it's fixed in the upstream https://github.com/soya-daizu/ytdl-core/tree/sig-patch
package.json:
"@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch"
note: This is essentially just copying Lavalink's patch https://github.com/lavalink-devs/youtube-source/commit/7103b1a14cd8731d2fa1e0b401253443f7358f68
@soya-daizu can u tell us how to do it?
@soya-daizu should i just copy your package.json and copy it to my code?
@mamdouhaass Yes you can just replace it and it should work. However, I'm not going to update this further, so you should put it back as it used to be when it's fixed in this repo.
U will not fix it for good? @soya-daizu
here's the patch until it's fixed in the upstream https://github.com/soya-daizu/ytdl-core/tree/sig-patch
package.json:
"@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch"
@soya-daizu Your patch works. Thank you so much. appreciate you ❤️
@mamdouhaass It should work until youtube breaks it again. It's just that this branch will not be maintained alongside the original one.
Here's the patch until it's fixed in the upstream https://github.com/soya-daizu/ytdl-core/tree/sig-patch
package.json:
"@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch"
note: This is essentially just copying Lavalink's patch lavalink-devs/youtube-source@7103b1a
It worked!
@vitor-kb bro can u tell me what u did?
what should i copy from the patch?
Here's the patch until it's fixed in the upstream https://github.com/soya-daizu/ytdl-core/tree/sig-patch
package.json:
"@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch"
note: This is essentially just copying Lavalink's patch lavalink-devs/youtube-source@7103b1a
Thank you, saved the day.
@smclean117 can u tell me what to do?
Help
WARNING: Could not parse n transform function. Please report this issue with the "1720559747647-base.js" file on https://github.com/distubejs/ytdl-core/issues. Stream URL may be slow but still works.
@smclean117 I need help please
@smclean117 can u tell me what to do?
I'm a relative rookie when it comes to this but I replaced ytdl-core line in package.json with the line "@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch"
deleted ytdl-core from node_modules folder then ran npm install again
i have more than one line in package.json called ytdl @smclean117
"dependencies": {
"@discord-player/extractor": "^4.4.1",
"@discordjs/opus": "^0.9.0",
"conf": "^12.0.0",
"discord-player": "^6.6.2",
"discord.js": "^14.12.1",
"dotenv": "^16.3.1",
"ffmpeg": "0.0.4",
"fluent-ffmpeg": "^2.1.2",
"opusscript": "0.0.8",
"prism-media": "^1.3.5",
"@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch"
},
this is my dependencies section if that helps
@smclean117 I did what you said to do and when I do npm install I get this error
PS C:\Users\conta\OneDrive\Desktop> npm install npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno -4058 npm ERR! enoent An unknown git error occurred npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\conta\AppData\Local\npm-cache_logs\2024-07-09T21_29_36_194Z-debug-0.log
@Seukoooowwdd
What you should have done is to replace only one line which defines the dependency to this package (@distube/ytdl-core
)
Revert your changes and find the line that starts with "@distube/ytdl-core":
. That should look like "@distube/ytdl-core": "^4.13.4"
or something.
Now replace that line with "@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch"
and run npm install
again.
Notice that you're changing the source of @distube/ytdl-core
to my branch. Once this problem is also fixed on the original branch, you should put it back to the original or you won't receive future updates to this package.
@mamdouhaass ^This is essentially what you also need to do
@soya-daizuShould I do that? Because that's what I did and when I do npm install I get an error I think there is something I didn't do that needed to be done
@soya-daizu thats what i did when i run npm i i get this error npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno -4058 npm ERR! enoent An unknown git error occurred npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
npm ERR! A complete log of this run can be found in: C:\Users\Administrator\AppData\Local\npm-cache_logs\2024-07-09T21_42_29_535Z-debug-0.log
should i change the package.lock json? too?
@mamdouhaass I think you don't have git installed on your system and that's causing the problem.
@soya-daizu How to install git?
how to do that?
i installed git windows same problem
i installed git windows same problem
what does running git --version
state?
It's good for me but when I start the music it disconnects straight away
mine doesnt disconnect it create a new js file with numbers
what did u install @Seukoooowwdd
Thank you, it's all good for me, will the problem come back one day or not or is it good? @soya-daizu
@Seukoooowwdd I don't know. This will be the permanent fix for this specific problem, but if youtube decides to break things again then people need to find another workaround. Until then it will just happen to work and that's always how downloading from youtube has been. I guess it will be okay for a couple of months or so.
@vitor-kb bro can u tell me what u did?
Updated package.json and run npm i again
What should I do when I have this? WARNING: Using old cookie format, please use the new one instead. (https://github.com/distubejs/ytdl-core#cookies-support)
What should I change? The problem is not solved. Please help me ?
{ "name": "ytdl-core", "description": "YouTube video downloader in pure javascript.", "keywords": [ "youtube", "video", "download" ], "version": "4.11.5", "repository": { "type": "git", "url": "git://github.com/fent/node-ytdl-core.git" }, "author": "fent fentbox@gmail.com (https://github.com/fent)", "contributors": [ "Tobias Kutscha (https://github.com/TimeForANinja)", "Andrew Kelley (https://github.com/andrewrk)", "Mauricio Allende (https://github.com/mallendeo)", "Rodrigo Altamirano (https://github.com/raltamirano)", "Jim Buck (https://github.com/JimmyBoh)", "Paweł Ruciński (https://github.com/Roki100)", "Alexander Paolini (https://github.com/Million900o)" ], "main": "./lib/index.js", "types": "./typings/index.d.ts", "files": [ "lib", "typings" ], "scripts": { "test": "nyc --reporter=lcov --reporter=text-summary npm run test:unit", "test:unit": "mocha --ignore test/irl-test.js test/*-test.js --timeout 4000", "test:irl": "mocha --timeout 16000 test/irl-test.js", "lint": "eslint ./", "lint:fix": "eslint --fix ./", "lint:typings": "tslint typings/index.d.ts", "lint:typings:fix": "tslint --fix typings/index.d.ts" }, "dependencies": { "m3u8stream": "^0.8.6", "miniget": "^4.2.2", "sax": "^1.1.3" }, "devDependencies": { "@types/node": "^13.1.0", "assert-diff": "^3.0.1", "dtslint": "^3.6.14", "eslint": "^6.8.0", "mocha": "^7.0.0", "muk-require": "^1.2.0", "nock": "^13.0.4", "nyc": "^15.0.0", "sinon": "^9.0.0", "stream-equal": "~1.1.0", "typescript": "^3.9.7" }, "engines": { "node": ">=12" }, "license": "MIT" }
@Seukoooowwdd What you should have done is to replace only one line which defines the dependency to this package (
@distube/ytdl-core
) Revert your changes and find the line that starts with"@distube/ytdl-core":
. That should look like"@distube/ytdl-core": "^4.13.4"
or something. Now replace that line with"@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch"
and runnpm install
again.Notice that you're changing the source of
@distube/ytdl-core
to my branch. Once this problem is also fixed on the original branch, you should put it back to the original or you won't receive future updates to this package.
i did exacly like your method, used it in my file and everything, yet bot when playing song joins and everything is okay, issue only does not play any song, even tried to sudo apt-get ffmpeg and update phyton also, sometimes it makes the problem for that too, but as i can see this time its not ffmpeg its actually tydl-core issue, and yet your method isn't working also bot keeps leaving the voice channel after joinning..
"dependencies": {
"@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch",
},
Just simply replace "@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch"
at the line started with "@distube/ytdl-core"
in your package.json.
Then run npm i. If it still warning, remove node_module
, package-lock.json
completely, run npm i again.
It worked for me.
This is really interesting. The patch worked for me locally. When I deployed it it no longer is working and is still returning the 403/could not parse n transform function error. Any thoughts to why this would be happening?
@matthewmichel have you delete .npm(if exist), node_modules & package_lock.json files and try run again npm i script?
I am delete node_modules, pnpm-lock.yaml, execute "pnpm store prune", changed package to "@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch", execute "pnpm install". And i still get WARNING: Could not parse n transform function + Server returned 403 Forbidden (access denied). I tried to change cookies and remove cookies entirely. Nothing changed.
Here's the patch until it's fixed in the upstream https://github.com/soya-daizu/ytdl-core/tree/sig-patch
package.json:
"@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch"
note: This is essentially just copying Lavalink's patch lavalink-devs/youtube-source@7103b1a
Thank you it's worked
Describe the bug
I have no idea what happened. I didn't change anything and it broke
WARNING: Could not parse n transform function. Please report this issue with the "1720463648608-base.js" file on https://github.com/distubejs/ytdl-core/issues. Stream URL may be slow but still works.
File
1720463648608-base.zip
Environment