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

Known issue: 404 Not found. #774

Closed
wolf-yuan-6115 opened this issue Jun 22, 2021 · 39 comments
Closed

Known issue: 404 Not found. #774

wolf-yuan-6115 opened this issue Jun 22, 2021 · 39 comments

Comments

@wolf-yuan-6115
Copy link
Contributor

wolf-yuan-6115 commented Jun 22, 2021

If you seen Error: 404 Not found in your console, this is not an error!

This is a problem with ytdl-core or YouTube API. This error will occur in these case:

  • Video not found
  • Play an ended live stream (New)

There is no solutions at this moment, please don't open issue like this.

Update:
ytdl-core already fixed this bug, just install ytdl-core master branch, this patch is not pushed to npm yet.

Another update:
There is a method to fix this issue, please see #774 (comment)

Feel free to commit on this issue if you have any solution.

Also see:

@SrIzan10
Copy link

Thank you!

@SrIzan10
Copy link

But how, exactly?

@Murky088
Copy link

Can anyone please guide me how to do this..... I have literally no idea what to do to fix it.....

@kimjunsung04
Copy link
Contributor

If you add the code below to ytdl-cord, it works normally.

fent/node-ytdl-core@d1f5357

@wolf-yuan-6115
Copy link
Contributor Author

If you add the code below to ytdl-cord, it works normally.

fent/node-ytdl-core@d1f5357

That method won't return video length :/

@renanluiz
Copy link

If you add the code below to ytdl-cord, it works normally.

fent/node-ytdl-core@d1f5357

That works great for me.. the only downside is that i cant change it on repl.it since modules are protected :/

@wolf-yuan-6115
Copy link
Contributor Author

If you add the code below to ytdl-cord, it works normally.

fent/node-ytdl-core@d1f5357

That works great for me.. the only downside is that i cant change it on repl.it since modules are protected :/

You can use shell and enter these command to edit it:
nano node_modules/ytdl-core/lib/info.js

@wolf-yuan-6115
Copy link
Contributor Author

I'm a noob when it comes to installing custom packages. Can someone show me where to change values?

node_modules/ytdl-core/lib/info.js line 327 add these script:

url.searchParams.set('c', 'TVHTML5');
url.searchParams.set('cver', '7.20190319');

@kimjunsung04
Copy link
Contributor

@wolf-yuan-6115

duration: songInfo.videoDetails.lengthSeconds

duration: songInfo.videoDetails.lengthSeconds

If you modify the above two lines as follows, you can see that it returns normally.
This method is temporary and subject to change during the official release.

duration: songInfo.player_response.videoDetails.lengthSeconds

@wolf-yuan-6115
Copy link
Contributor Author

@wolf-yuan-6115

duration: songInfo.videoDetails.lengthSeconds

duration: songInfo.videoDetails.lengthSeconds

If you modify the above two lines as follows, you can see that it returns normally.
This method is temporary and subject to change during the official release.

duration: songInfo.player_response.videoDetails.lengthSeconds

Oof, thanks you!

@wolf-yuan-6115 wolf-yuan-6115 mentioned this issue Jun 23, 2021
@ni5arga
Copy link

ni5arga commented Jun 23, 2021

I'm a noob when it comes to installing custom packages. Can someone show me where to change values?

node_modules/ytdl-core/lib/info.js line 327 add these script:

url.searchParams.set('c', 'TVHTML5');
url.searchParams.set('cver', '7.20190319');

I don't see that folder.

@SrIzan10
Copy link

What are you using?

@ni5arga
Copy link

ni5arga commented Jun 23, 2021

What are you using?

I have used Railway.app to deploy the bot

@ni5arga
Copy link

ni5arga commented Jun 23, 2021

I am getting the same 404 Not Found error

@SrIzan10
Copy link

Do you have bash/console access?

@ni5arga
Copy link

ni5arga commented Jun 23, 2021

Do you have bash/console access?

No but I can view deploy logs.

@SrIzan10
Copy link

Sorry but I can't help you then.

@ashhwxn
Copy link

ashhwxn commented Jun 23, 2021

If you're facing this issue this must be probably in repl. Whatever you try you won't be able to resolve it in repl it's because it has a error in the node_module folder which will not be available in your repl project.

The only way you can resolve this is by using anyother IDE (ie: Visual Studio Code)
download github desktop and clone this project then open it in Visual Studio Code
edit the config file and go into

node_modules/ytdl-core/lib/info.js
scroll through the code until it reaches 327 below that paste the following script:

url.searchParams.set('c', 'TVHTML5');
url.searchParams.set('cver', '7.20190319');

Also check whether you have updated ytdl if not it will show you this error here type it out in terminal/console

npm install ytdl-core@latest

@wolf-yuan-6115 @eritislami pin this if possib;e
thank me later :)

@renanluiz
Copy link

Can i edit the file and then reupload it to repl?

@Marshxan
Copy link

@wolf-yuan-6115

duration: songInfo.videoDetails.lengthSeconds

duration: songInfo.videoDetails.lengthSeconds

If you modify the above two lines as follows, you can see that it returns normally.
This method is temporary and subject to change during the official release.

duration: songInfo.player_response.videoDetails.lengthSeconds

i changed it and it still does not work

@kimjunsung04
Copy link
Contributor

@wolf-yuan-6115

duration: songInfo.videoDetails.lengthSeconds

duration: songInfo.videoDetails.lengthSeconds

If you modify the above two lines as follows, you can see that it returns normally.
This method is temporary and subject to change during the official release.

duration: songInfo.player_response.videoDetails.lengthSeconds

i changed it and it still does not work

Did you change the ytdl-cord too?

@renanluiz
Copy link

@wolf-yuan-6115

duration: songInfo.videoDetails.lengthSeconds

duration: songInfo.videoDetails.lengthSeconds

If you modify the above two lines as follows, you can see that it returns normally.
This method is temporary and subject to change during the official release.

duration: songInfo.player_response.videoDetails.lengthSeconds

i changed it and it still does not work

Same for me.. The only way i could get this to work was by modifying the module. But like i mentioned before, that is not an option since repl.it doesnt allow me to do that.

@renanluiz
Copy link

I got it to work on my repl 🥳 I figured out i cant edit a file using shell, but i can move and rename. I edited the info.js file using vscode, uploaded to my repl, renamed the original info.js to info.example and then moved the new one to the folder.

@wolf-yuan-6115
Copy link
Contributor Author

wolf-yuan-6115 commented Jun 23, 2021

For who can't modify node_modules;

Remove ytdl-core and install wolf-ytdl instead, you can also run these script:

npm uninstall ytdl-core
npm i wolf-ytdl

Update:

You may need to change ytdl-core to wolf-ytdl in commands, I recommended to modify node_modules if you can do it.

@Marshxan
Copy link

can i just wait a couple of days for it to update its self or do have to change stuff

@Marshxan
Copy link

For who can't modify node_modules;

Remove ytdl-core and install wolf-ytdl instead, you can also run these script:

npm uninstall ytdl-core
npm i wolf-ytdl

Update:

You may need to change ytdl-core to wolf-ytdl in commands, I recommended to modify node_modules if you can do it.

wold-ytdl works but no sound comes out

@wolf-yuan-6115
Copy link
Contributor Author

For who can't modify node_modules;
Remove ytdl-core and install wolf-ytdl instead, you can also run these script:

npm uninstall ytdl-core
npm i wolf-ytdl

Update:
You may need to change ytdl-core to wolf-ytdl in commands, I recommended to modify node_modules if you can do it.

wold-ytdl works but no sound comes out

Hmm, i will re-check some code

@wolf-yuan-6115
Copy link
Contributor Author

wolf-yuan-6115 commented Jun 24, 2021 via email

@Marshxan
Copy link

Marshxan commented Jun 24, 2021

It works for me...

On Thu, Jun 24, 2021 at 1:48 AM Marshxan @.***> wrote: For who can't modify node_modules; Remove ytdl-core and install wolf-ytdl instead, you can also run these script: npm uninstall ytdl-core npm i wolf-ytdl Update: You may need to change ytdl-core to wolf-ytdl in commands, I recommended to modify node_modules if you can do it. wold-ytdl works but no sound comes out — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#774 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4MEDC6NJGIQEUNMRXBUWDTUIM5BANCNFSM47DO2CDQ .

can you add me on discord Marshxan0001 and help me

@Marshxan
Copy link

It works for me...

On Thu, Jun 24, 2021 at 1:48 AM Marshxan @.***> wrote: For who can't modify node_modules; Remove ytdl-core and install wolf-ytdl instead, you can also run these script: npm uninstall ytdl-core npm i wolf-ytdl Update: You may need to change ytdl-core to wolf-ytdl in commands, I recommended to modify node_modules if you can do it. wold-ytdl works but no sound comes out — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#774 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4MEDC6NJGIQEUNMRXBUWDTUIM5BANCNFSM47DO2CDQ .

do you think I can just wait a week or two and it will fix by its self

@SrIzan10
Copy link

It works for me...

On Thu, Jun 24, 2021 at 1:48 AM Marshxan @.***> wrote: For who can't modify node_modules; Remove ytdl-core and install wolf-ytdl instead, you can also run these script: npm uninstall ytdl-core npm i wolf-ytdl Update: You may need to change ytdl-core to wolf-ytdl in commands, I recommended to modify node_modules if you can do it. wold-ytdl works but no sound comes out — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#774 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4MEDC6NJGIQEUNMRXBUWDTUIM5BANCNFSM47DO2CDQ .

do you think I can just wait a week or two and it will fix by its self

No, probably they google changed their API, so... yeah...

@wolf-yuan-6115
Copy link
Contributor Author

It works for me...

On Thu, Jun 24, 2021 at 1:48 AM Marshxan @.***> wrote: For who can't modify node_modules; Remove ytdl-core and install wolf-ytdl instead, you can also run these script: npm uninstall ytdl-core npm i wolf-ytdl Update: You may need to change ytdl-core to wolf-ytdl in commands, I recommended to modify node_modules if you can do it. wold-ytdl works but no sound comes out — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#774 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4MEDC6NJGIQEUNMRXBUWDTUIM5BANCNFSM47DO2CDQ .

do you think I can just wait a week or two and it will fix by its self

No, probably they google changed their API, so... yeah...

Seems fent need to code a API change alert lol

@Perdition0
Copy link

You can use this thing to solve it temporarily
npm i git://github.com/fent/node-ytdl-core.git#d1f535712410eebd79a7468abd07d94f8c4ebe5a

@Marshxan
Copy link

It works for me...

On Thu, Jun 24, 2021 at 1:48 AM Marshxan @.***> wrote: For who can't modify node_modules; Remove ytdl-core and install wolf-ytdl instead, you can also run these script: npm uninstall ytdl-core npm i wolf-ytdl Update: You may need to change ytdl-core to wolf-ytdl in commands, I recommended to modify node_modules if you can do it. wold-ytdl works but no sound comes out — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#774 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4MEDC6NJGIQEUNMRXBUWDTUIM5BANCNFSM47DO2CDQ .

do you think I can just wait a week or two and it will fix by its self

No, probably they google changed their API, so... yeah...

so how would i get the bot working again im not the best at coding and i want it to work ;)

@modee0011
Copy link

i have tyr ervrything on replit
but it dose not work

@MuhaGX
Copy link

MuhaGX commented Jun 26, 2021

how to fix it

@eritislami
Copy link
Owner

4b4a2e8

get newest commit & npm install

@SrIzan10
Copy link

Wow, it just worked. Thank you!

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

13 participants