Closed GreepTheSheep closed 2 years ago
I'm having the same problem as well. Receiving the same error as above. Everything worked fine yesterday.
Experiencing same issue, getting identical stack trace as well.
Okay I am trying to figure out the problem but this is my first time working with the source code of this project and with the youtube cipher algorithm so it's taking a while anyways I've narrowed the problem down to a problem with evaluating nTransformScript because the code returned from youtube is for some reason broken, that's the conclusion I reached
Still having same problem
this solved it for me https://github.com/fent/node-ytdl-core/issues/1108#issuecomment-1212500413
If you need to use it rn and don't want to/can't tinker inside module
downgrade to version 4.10.0
npm command:
npm i ytld-core@4.10.0
only versions 4.10.1+ gave me this error during testing
I also had the issue on version 4.10.0, and 4.9.? (I can't remember the last digit)
apparently I screwed up the downgrade when testing the different versions
this solved it for me #1108 (comment)
Not sure if that's the proper solution or not but it does work
Can reproduce: with almost all videos that I test with:
Trace: evalmachine.<anonymous>:11
"mfZru","cfYAzm",1897615910,414154674,"IluoVc5",null,1,"XsmT",-659785013,577478260,-419211961,1087899650,/,,[/,913,/](,)};Wka(ncode);
^
SyntaxError: Invalid regular expression: missing /
same problem with any video
"mfZru","cfYAzm",1897615910,414154674,"IluoVc5",null,1,"XsmT",-659785013,577478260,-419211961,1087899650,/,,[/,913,/](,)};Wka(ncode);
^
SyntaxError: Invalid regular expression: missing /
at new Script (node:vm:100:7)
at Object.exports.decipherFormats (C:\DiscordBots\Botik_v2.0\node_modules\ytdl-core\lib\sig.js:116:51)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
at async exports.getInfo (C:\DiscordBots\Botik_v2.0\node_modules\ytdl-core\lib\info.js:401:17)
Node.js v17.5.0```
@austinharms I went into package.json changed the version to "ytdl-core": "4.10.0"
deleted my node modules and ran yarn (yarn for me)
I'm back!
Holy shit I was about to wipe my system because this week I had some pc malware issues I solved. But when in doubt CHECK the GITHUB! I was that close....thanks to everyone for the comments...
I skew front-end but hoping devs solve the issue!
But if we know 4.10.0 works, then we know that the PR that came after introduced a bug....so whats the PR for 4.10.1?
@dsnsgithub on 4.10.0 its slow but downloading but will test audio when its up
@dskaiser82 Thank you, your fix works. ytdl-core@4.10.0 seems to be working while ytdl-core@4.11.0 seems to have a problem with dependences.
@dsnsgithub Good! Yean I have audio working fine too on the video below....but did take a longer than normal....I want to test another vid to see if speeds can be faster....but for now I'll take this band aid fix
Yeah I think this version is slower than before, but I do like to do highest Audio, Highest Video
Last week it was closing braces in strings. To confuse parsers. This week YouTube have thrown some regex into their code spaghetti.
Can anyone please attach base.js file that has this issue because I can't reproduce this on my end.
@WaqasIbrahim sent via email
I've got the same issue +1
Needs exports.cutAfterJSON in util.js to skip over regex.
When it encounters
/,,[/,913,/](,)}/
as an array value in base.js it sees the } as the end of the n code function that is being parsed. So evaluation breaks.
I just tested ncode extraction on a file @gatecrasher777 sent. The solution I suggested in the closed issue: https://github.com/fent/node-ytdl-core/issues/1108#issuecomment-1212500413 still works.
I just tested ncode extraction on a file @gatecrasher777 sent. The solution I suggested in the closed issue: #1108 (comment) still works.
this fix is working for me 100%
downgrading the version decreases the singnificat download spped, how can i solve that ?
For some reason, I kept getting HTTPError [FetchError]: request to https://discord.com/api/v7/channels/[channelid]/messages failed, reason: read ECONNRESET
in the new update, if it is of any help. Downgrading to ytdl-core@4.10.0 fixed it for me.
@arinmodi Thats the state I chose, degraded version but MUCH slower download speeds.....no PR's in yet for the fix right?
Made a fork of the temporary fix here: https://github.com/GreepTheSheep/node-ytdl-core
You can add it on your package.json with npm npm i ytdl-core@https://github.com/GreepTheSheep/node-ytdl-core
@GreepTheSheep Good stuff! I took the fix one step further and did a Pull Request so we can get this fix in. GreepTheSheep this PR is just that one commit u had for the fork
PR waiting for approval....anyone know who has PR approval/merge rights? PR: https://github.com/fent/node-ytdl-core/pull/1111
same problem with any videos, I have the latest version of ytdl-core
PR waiting for approval....anyone know who has PR approval/merge rights? PR: #1111
@TimeForANinja
downgrading to 4.10.0 solved the problem for me! Waiting for a new version...
Let me know if I can throw a few bucks the maintainers' way, they're doing God's work.
This error message just sudenly changed... yesterday it was the invalid regex, now it's something new:
evalmachine.<anonymous>:24
c[72],c[6]),(0,c[85])(c[11]),(0,c[41])(c[39],c[28],(0,c[66])()),(0,c[78])(c[Math.pow(6,2)+122+-119],c[new Date("Wednesday December 31 1969 19:00:1
4 CDT")/1E3])}catch(d){(0<c[0]||(((0,c[80])(c[60],c[88]),c[80])(c[21],c[88]),0))&&(0,c[17])((0,c[70])(c[6]),c[78],c[88],c[12])}try{2<c[91]&&(1<c[5
3]?(0,c[17])((0,c[80])(c[82],c[6]),c[78],c[39],c[5]):((0,c[45])(c[49],c[88]),c[78])(c[88],c[86])),(0,c[17])((0,c[85])(c[31]),c[41],c[88],c[75],(0,
c[35])())}catch(d){}};Wka(ncode);
^
SyntaxError: Missing catch or finally after try
at new Script (node:vm:100:7)
at Object.exports.decipherFormats (D:\JS\revolt butler\node_modules\ytdl-core\lib\sig.js:116:51)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
at async exports.getInfo (D:\JS\revolt butler\node_modules\ytdl-core\lib\info.js:401:17)
PR: https://github.com/fent/node-ytdl-core/pull/1111
We have some approvals but this is the blocker: "First-time contributors need a maintainer to approve running workflows. Learn more. 1 successful check"
Who is a maintainer?
This error message just sudenly changed... yesterday it was the invalid regex, now it's something new:
evalmachine.<anonymous>:24 c[72],c[6]),(0,c[85])(c[11]),(0,c[41])(c[39],c[28],(0,c[66])()),(0,c[78])(c[Math.pow(6,2)+122+-119],c[new Date("Wednesday December 31 1969 19:00:1 4 CDT")/1E3])}catch(d){(0<c[0]||(((0,c[80])(c[60],c[88]),c[80])(c[21],c[88]),0))&&(0,c[17])((0,c[70])(c[6]),c[78],c[88],c[12])}try{2<c[91]&&(1<c[5 3]?(0,c[17])((0,c[80])(c[82],c[6]),c[78],c[39],c[5]):((0,c[45])(c[49],c[88]),c[78])(c[88],c[86])),(0,c[17])((0,c[85])(c[31]),c[41],c[88],c[75],(0, c[35])())}catch(d){}};Wka(ncode); ^ SyntaxError: Missing catch or finally after try at new Script (node:vm:100:7) at Object.exports.decipherFormats (D:\JS\revolt butler\node_modules\ytdl-core\lib\sig.js:116:51) at runMicrotasks (<anonymous>) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Promise.all (index 0) at async exports.getInfo (D:\JS\revolt butler\node_modules\ytdl-core\lib\info.js:401:17)
Wanted to add that this can too be fixed by downgrading to 4.10.0
Downgrading to 4.10.0 will mean the N transform gracefully fails. Everything will work, but downloads will be throttled.
:tada: This issue has been resolved in version 4.11.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
They're at it again, it stopped working just today.
Today I'm get the same error again
:
Invalid regular expression: missing /
Trace: evalmachine.<anonymous>:13
-1929233002,b,/,][};Xka(ncode);
^
SyntaxError: Invalid regular expression: missing /
at new Script (node:vm:100:7)
at Object.exports.decipherFormats (C:\hi-there-github\node_modules\ytdl-core\lib\sig.js:116:51)
Same here receiving since about yesterday 10pm UK time:
Invalid regular expression: missing /
Found a fix: #1111
Same solution as the previous regex errors.
yes the error come's back
and downgrading to 4.10.0 solved the problem, again
Is it throttled though?
Since 1 or 2 hours, all videos passed on ytdl-core return this "Invalid regular expression" error
Stack trace:
ytdl-core version: 4.11.0
Edit: Temporary fix linked here: https://github.com/fent/node-ytdl-core/issues/1110#issuecomment-1219856316