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

SyntaxError: Invalid or unexpected token #1251

Open
tnluan opened this issue Sep 7, 2023 · 8 comments
Open

SyntaxError: Invalid or unexpected token #1251

tnluan opened this issue Sep 7, 2023 · 8 comments

Comments

@tnluan
Copy link

tnluan commented Sep 7, 2023

2023-09-07 03:22 +00:00:
2023-09-07 03:22 +00:00: SyntaxError: Invalid or unexpected token
2023-09-07 03:22 +00:00: at new Script (vm.js:102:7)
2023-09-07 03:22 +00:00: at exports.decipherFormats (/root/api/source/node_modules/ytdl-core/lib/sig.js:116:51)
2023-09-07 03:22 +00:00: at runMicrotasks ()
2023-09-07 03:22 +00:00: at processTicksAndRejections (internal/process/task_queues.js:95:5)
2023-09-07 03:22 +00:00: at async /root/api/source/server/boot/root.js:25:20
2023-09-07 03:22 +00:00: evalmachine.:426
2023-09-07 03:22 +00:00: Ama=function(a,b,c,d){var e=null;switch(b){case "JSON":try{var f=c.responseText}catch(h){throw d=Error("Error reading responseText"),d.params=a,oC(d),h;}a=c.getResponseHeader("Content-Type")||"";f&&0<=a.indexOf("json")&&(")]};Ila(ncode);
2023-09-07 03:22 +00:00: ^^^^^^^^^^^^^^^^
2023-09-07 03:22 +00:00:

@eduardommelo
Copy link

eduardommelo commented Sep 7, 2023

I solve the problem by updating the sig.js code by this Pr that I had already done https://github.com/khlevon/node-ytdl-core/blob/fix/youtube-issue-2/lib/sig.js

PR #1217

@Garima-sharma814
Copy link

Garima-sharma814 commented Sep 7, 2023

I fixed this issue by downgrading to 4.10.0 by using npm i ytdl-core@4.10.0

@helloworld9912
Copy link

helloworld9912 commented Sep 7, 2023

I fixed this issue by downgrading to 4.10.0 by using npm i ytdl-core@4.10.0

Worked for me too ! waiting the PR to be approved

@priyam-raj
Copy link

ytdl-core@4.10.0

This worked for me.

@ashwaniappsq
Copy link

ashwaniappsq commented Sep 8, 2023

I fixed this issue by downgrading to 4.10.0 by using npm i ytdl-core@4.10.0

This worked for me. but download speed is very low

@luccabassoli
Copy link

I fixed this issue by downgrading to 4.10.0 by using npm i ytdl-core@4.10.0

This worked for me.

It didn't work for me either.

@fpsone
Copy link

fpsone commented Sep 25, 2023

This worked for me. but download speed is very low

This solution should solve your download bottleneck problem: #1252 (comment)

@timfong888
Copy link

Thanks @Garima-sharma814 it seems to be working (I am hitting a timeout but that could be due to the workload)....

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

No branches or pull requests

9 participants