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

Major bug in sig.js - ncode & decipher #1197

Closed
milanbabiclibrafire opened this issue Apr 5, 2023 · 41 comments · Fixed by vphoebe/beatnik#42 · May be fixed by adityapanchal10/vinylizer#38 or adityapanchal10/vinylizer#45
Closed

Major bug in sig.js - ncode & decipher #1197

milanbabiclibrafire opened this issue Apr 5, 2023 · 41 comments · Fixed by vphoebe/beatnik#42 · May be fixed by adityapanchal10/vinylizer#38 or adityapanchal10/vinylizer#45
Labels

Comments

@milanbabiclibrafire
Copy link

"ytdl-core": "^4.11.3"

error:

  • ... [])||(0,c[2])((0,c[45])((0,c[25])(c[21],c[55],(0,c[11] ... c[28])(c[56],c[50])};lma(ncode);
  • SyntaxError: Missing catch or finally after try
  • at new Script (node:vm:100:7)
  • at Object.exports.decipherFormats (/app/node_modules/ytdl-core/lib/sig.js:116:51)

This happens a lot!

@milanbabiclibrafire milanbabiclibrafire changed the title Non recoverable bug in sig.js - ncode & decipher Major bug in sig.js - ncode & decipher Apr 5, 2023
@piotrek-szczygiel
Copy link

Same error today, yesterday everything was working fine.

@ShantanuNair
Copy link

Also affected, starting today.

@javadjh
Copy link

javadjh commented Apr 5, 2023

i have same problem :
0|app | evalmachine.:25
0|app | [])||(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);
0|app |
^
0|app | SyntaxError: Missing catch or finally after try
0|app | at new Script (node:vm:100:7)
0|app | at Object.exports.decipherFormats (/root/youtube-downloader/backend/node_modules/ytdl-core/lib/sig.js:116:51)
0|app | at runMicrotasks ()
0|app | at processTicksAndRejections (node:internal/process/task_queues:96:5)
0|app | at async Promise.all (index 0)
0|app | at async exports.getInfo (/root/youtube-downloader/backend/node_modules/ytdl-core/lib/info.js:401:17)

@zniazi
Copy link

zniazi commented Apr 5, 2023

Same problem:

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 Object.exports.decipherFormats (/home/zniazi/programs/youtube/node_modules/ytdl-core/lib/sig.js:116:51)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
at async exports.getInfo (/home/zniazi/programs/youtube/node_modules/ytdl-core/lib/info.js:401:17)
Emitted 'error' event on PassThrough instance at:
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Yesterday was working fine

@moodejb123
Copy link

Yup same issue happening to me

@KonerDev
Copy link

KonerDev commented Apr 5, 2023

I've been having the exact same problem for a few hours!

@ShantanuNair
Copy link

ShantanuNair commented Apr 5, 2023

Anyone find a version to downgrade to that works?

EDIT:
I created my own fork (in case the repo/branch went down) with @khlevon's changes applied. In my package.json I have:

"ytdl-core": "https://github.com/ShantanuNair/node-ytdl-core#v4.11.3-patch.1"

which is the exact same as @khlevon's "ytdl-core": "https://github.com/khlevon/node-ytdl-core.git#v4.11.3-patch.1"

Working branches if you want to downgrade instead of use the patch on v4.11.3:

@cchen028
Copy link

cchen028 commented Apr 5, 2023

4.9.1 verison still work for getting youtube info.

@ShantanuNair
Copy link

ShantanuNair commented Apr 5, 2023

@cchen028 Any reason you avoided 4.10.0? It seems to be working for me, for downloads as well (albeit very slowly).

@javadjh
Copy link

javadjh commented Apr 5, 2023

4.9.1 verison still work for getting youtube info.

Thanks :) , worked for me

@aymenitc
Copy link

aymenitc commented Apr 5, 2023

4.10.0 is very slow waiting for update

@0x5am5
Copy link

0x5am5 commented Apr 5, 2023

Same issue. Downgrade works.

@parsaatef
Copy link

parsaatef commented Apr 5, 2023

Same issue. Downgrade didn't work for me

@parsaatef
Copy link

Can you also share your node version?

@SerenityInAllThings
Copy link

SerenityInAllThings commented Apr 5, 2023

Downgrading also did not work for me. Got this error:

Error: Cannot play audio as no valid encryption package is installed.
- Install sodium, libsodium-wrappers, or tweetnacl.
- Use the generateDependencyReport() function for more information.
at Object.fallbackError (/app/node_modules/@discordjs/voice/dist/index.js:215:9)
at Networking.encryptOpusPacket (/app/node_modules/@discordjs/voice/dist/index.js:712:17)
at Networking.createAudioPacket (/app/node_modules/@discordjs/voice/dist/index.js:702:69)
at Networking.prepareAudioPacket (/app/node_modules/@discordjs/voice/dist/index.js:648:33)
at VoiceConnection.prepareAudioPacket (/app/node_modules/@discordjs/voice/dist/index.js:1461:29)
at AudioPlayer._preparePacket (/app/node_modules/@discordjs/voice/dist/index.js:1030:18)
at AudioPlayer._stepPrepare (/app/node_modules/@discordjs/voice/dist/index.js:1011:14)
at prepareNextAudioFrame (/app/node_modules/@discordjs/voice/dist/index.js:136:29)
at audioCycleStep (/app/node_modules/@discordjs/voice/dist/index.js:125:3)
at Timeout._onTimeout (/app/node_modules/@discordjs/voice/dist/index.js:132:45)

ytdl-core@4.10.0
Node 18

I was previously using ytdl-core@4.11.2 and everything was fine yesterday

@ttrreevvoorr
Copy link

ttrreevvoorr commented Apr 5, 2023

I am using node version v16.17.0 and I downgraded ytdl-core to ^4.9.1 and the error stopped (my application works again)

FWIW, everything was fine up until this morning, and I was using 4.11.x as well.

@rfcrocha
Copy link

rfcrocha commented Apr 5, 2023

i'm also having the issue and i can work around it with v4.9.1 and 4.10.0. One thing to add - this problem actually started yesterday for me although it was only a problem 10% of the time. Today it doesn't work at all with v=>4.11

@parsaatef
Copy link

it's wired. it didn't work for me even with Node v16.17.0 and downgraded ytdl-core to ^4.9.1

@devAshutoshkarn
Copy link

I have also face this issue today.

@0x5am5
Copy link

0x5am5 commented Apr 5, 2023

downgrade to 4.9.1 on node 19.6.1 worked for me

@Amatog94
Copy link

Amatog94 commented Apr 5, 2023

I get the same error since yesterday I think

@dim4ik1106
Copy link

I get the same error since yesterday I think, but downgrade helped

@TheGauntt
Copy link

Works (albeit slowly) with downgrade

@milanbabiclibrafire
Copy link
Author

milanbabiclibrafire commented Apr 6, 2023

v4.10.0 for download video worked for some time. Now stopped working. @ShantanuNair - could you confirm this? (as you suggested working downgraded version)

  • Edit: still works, but glacier slow! -> 6mins video downloaded in 30mins

@khlevon
Copy link
Contributor

khlevon commented Apr 6, 2023

Hi guys, I found and fixed the problem. To test it, you can change the package source in your package.json to this until the maintainer merges my PR.
PR: #1203

"ytdl-core": "git+ssh://git@github.com:khlevon/node-ytdl-core.git#v4.11.3-patch.1"

ray-1337 added a commit to ray-1337/discord-music-bot that referenced this issue Apr 6, 2023
@nezort11
Copy link

nezort11 commented Apr 6, 2023

This worked for me:

"ytdl-core": "https://github.com/khlevon/node-ytdl-core.git#v4.11.3-patch.1"

@sajjadmrx
Copy link

this version worked:

npm i ytdl-core@4.9.1

@HerickSz
Copy link

HerickSz commented Apr 7, 2023

this error is in the lib.
try to get the lib in ytdl-core and replace.
link -> https://github.com/ShantanuNair/node-ytdl-core#v4.11.3-patch.1

@ahmedkh19
Copy link

Anyone find a version to downgrade to that works?

EDIT: I created my own fork (in case the repo/branch went down) with @khlevon's changes applied. In my package.json I have:

"ytdl-core": "https://github.com/ShantanuNair/node-ytdl-core#v4.11.3-patch.1"

which is the exact same as @khlevon's "ytdl-core": "https://github.com/khlevon/node-ytdl-core.git#v4.11.3-patch.1"

Working branches if you want to downgrade instead of use the patch on v4.11.3:

Thanks! your patch is working very well

@sum117
Copy link

sum117 commented Apr 11, 2023

The easiest solution seems to be downgrading to 4.9.1 atm. We should wait for new updates! Thanks for your patch too @khlevon , very well done!

@github-actions
Copy link

🎉 This issue has been resolved in version 4.11.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@dim4ik1106
Copy link

Im still facing this issue, even with path from @khlevon and with v4.11.4
evalmachine.:24
c[74]),c[64])((0,c[25])(c[24],c[41]),c[35],c[33+Math.pow(8,3)%229],c[92]),c[70])(c[87],c[27])}try{8>=c[92]&&(0,c[15])((0,c[35])(c[36],c[20]),c[11],c[29])}catch(d){(0,c[60])(c[92],c[93])}try{1>c[45]?((0,c[60])(c[2],c[93]),c[60])(c[91],c[93]):((0,c[88])(c[93],c[86]),c[11])(c[57])}catch(d){(0,c[85])((0,c[80])(),c[56],c[0])}};qma(ncode);
^

SyntaxError: Missing catch or finally after try
at new Script (node:vm:100:7)
at exports.decipherFormats (/Users/kashenko/Sites/SpeechToTextApp/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 (/Users/kashenko/Sites/SpeechToTextApp/node_modules/ytdl-core/lib/info.js:402:19)
/Users/kashenko/Sites/SpeechToTextApp/node_modules/ytdl-core/lib/format-utils.js:168
throw Error(No such format found: ${quality});
^

Error: No such format found: highestaudio
at exports.chooseFormat (/Users/kashenko/Sites/SpeechToTextApp/node_modules/ytdl-core/lib/format-utils.js:168:11)
at downloadFromInfoCallback (/Users/kashenko/Sites/SpeechToTextApp/node_modules/ytdl-core/lib/index.js:86:26)
at /Users/kashenko/Sites/SpeechToTextApp/node_modules/ytdl-core/lib/index.js:20:5
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on PassThrough instance at:
at downloadFromInfoCallback (/Users/kashenko/Sites/SpeechToTextApp/node_modules/ytdl-core/lib/index.js:88:12)
at /Users/kashenko/Sites/SpeechToTextApp/node_modules/ytdl-core/lib/index.js:20:5
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v19.0.0

@TheGauntt
Copy link

TheGauntt commented Apr 26, 2023

Working with ytdl-core@4.10.0

Seeing the same with 4.11.4
SyntaxError: Missing catch or finally after try

@TheGauntt
Copy link

@dim4ik1106 Tracked here BTW - #1216

@dim4ik1106
Copy link

@dim4ik1106 Tracked here BTW - #1216

thx

@cybervaldez
Copy link

Seeing the same issue on 4.11.5

@fpsone
Copy link

fpsone commented Jul 31, 2023

#1197 (comment)

I'm using @distube/ytdl-core@4.11.7 and it works smoothly. This fork is optimized for distube package (discord.js music bot) so it works well with hls stream and opus stream. I haven't tested with other itag formats but it seems working normally.

I still using this fork and it works normally. Btw, at the present, the latest version is @distube/ytdl-core@4.11.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment