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

A while ago, it was working fine, but then it suddenly stopped working without any apparent reason. Did YT change something? #1201

Closed
lerry30 opened this issue Apr 6, 2023 · 12 comments
Labels

Comments

@lerry30
Copy link

lerry30 commented Apr 6, 2023

evalmachine.:25
[])||(0,c[2])((0,c[45])((0,c[25])(c[21],c[55],(0,c[11])()),c[2],(0,c[86])(c[55],c[53]),c[13],c[77],c[27]),c[52],c[62],c[74]),1==c[43]&&((0,c[45])((0,c[2])((0,c[13])(c[65+Math.pow(3,2)%391],c[85]),c[78],c[35],c[68]),c[2],((0,c[76])(c[3],c[77]),c[40])(c[77]),c[40],c[87]),1)||(((((0,c[13])(c[87],c[65]),c[52])(c[46],c[Math.pow(5,3)%149+-51]),c[47])(c[63],c[1]),c[62])(c[50],c[18]),c[28])(c[56],c[50])};lma(ncode);
^

SyntaxError: Missing catch or finally after try
at new Script (node:vm:100:7)
at exports.decipherFormats (C:\Users\node\ytdl\node_modules\ytdl-core\lib\sig.js:116:51)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at async exports.getInfo (C:\Users\node\ytdl\node_modules\ytdl-core\lib\info.js:401:17)
error

@Amatog94
Copy link

Amatog94 commented Apr 6, 2023

#1197 same issues here

@JdyxZ
Copy link

JdyxZ commented Apr 6, 2023

In a different thread related to this issue, people have suggested using the 4.9.1 version or the 4.10.0 version to solve the issue. For me the 4.9.1 version solves the issue, however I only use validateID, getInfo and chooseFormat built-in methods of the module. You will have to try and check by yourself. In order to downgrade your current version to the 4.9.1 or whatever version you want to try, you can hit:

npm i ytdl-core@4.9.1

@kaizinbr
Copy link

kaizinbr commented Apr 6, 2023

same here

@kaizinbr
Copy link

kaizinbr commented Apr 6, 2023

In a different thread related to this issue, people have suggested using the 4.9.1 version or the 4.10.0 version to solve the issue. For me the 4.9.1 version solves the issue, however I only use validateID, getInfo and chooseFormat built-in methods of the module. You will have to try and check by yourself. In order to downgrade your current version to the 4.9.1 or whatever version you want to try, you can hit:

npm i ytdl-core@4.9.1

for me this worked but the download speed got very very slow

@LoboMetalurgico
Copy link

Same here

@joshverd
Copy link

joshverd commented Apr 6, 2023

4.9.1 works, but downloads keep getting stuck at ~60%.

@LoboMetalurgico
Copy link

A better aprouch to fix this issue: #1197 (comment)

@shakeebshams
Copy link

bump, having issues with my app as well

@maddaxlallatin
Copy link

maddaxlallatin commented Apr 7, 2023

You could downgrade your ytdl-core package to version ^4.9.1 or ^4.10.0 and that should fix this:

npm i ytdl-core@4.9.1
If you don't want to downgrade...

As far as I know, there is a PR to fix this bug, so the next minor version should work as expected.

In the meantime, you could update your node_modules/ytdl-core/lib/utils.js file (although I don't usually recommend this). On line 63 replace /(^|[[{:;,])\s?$/ with /(^|[[{:;,/])\s?$/


const ESCAPING_SEQUENZES = [
  // Strings
  { start: '"', end: '"' },
  { start: "'", end: "'" },
  { start: '`', end: '`' },
  // RegeEx
  { start: '/', end: '/', startPrefix: /(^|[[{:;,/])\s?$/ },

@mipapamedijo
Copy link

mipapamedijo commented Apr 8, 2023

@papamaddax thanks, that worked for me with ytdl-core@latest, line 63 at node_modules/ytdl-core/lib/utils.js
{ start: '/', end: '/', startPrefix: /(^|[[{:;,/])\s?$/ },
By the way, this solved also the speed download rate. No need to downgrade now

@aymenitc
Copy link

This works and it is fast

@github-actions
Copy link

🎉 This issue has been resolved in version 4.11.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants