evobot
evobot copied to clipboard
Bug: SyntaxError when trying to send a YouTube link to the bot
Describe the bug
When I try to bring the bot in a voicecall with !p [youtube link]
, the bot sends a message saying an error happened during the execution of the command. Looking at the logs, these errors come up:
Aug 11 22:18:27 [server] npm[6010]: evalmachine.<anonymous>:339
Aug 11 22:18:27 [server] npm[6010]: rma=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,bu(d),h;}a=c.getResponseHeader("Content-Type")||"";f&&0<=a.indexOf("json")&&(")]};Yka(ncode);
Aug 11 22:18:27 [server] npm[6010]:
^^^^^^^^^^^^^^^^
Aug 11 22:18:27 [server] npm[6010]: SyntaxError: Invalid or unexpected token
Aug 11 22:18:27 [server] npm[6010]: at new Script (node:vm:100:7)
Aug 11 22:18:27 [server] npm[6010]: at Object.exports.decipherFormats (/home/user/evobot/node_modules/ytdl-core/lib/sig.js:116:51)
Aug 11 22:18:27 [server] npm[6010]: at processTicksAndRejections (node:internal/process/task_queues:95:5)
Aug 11 22:18:27 [server] npm[6010]: at async Promise.all (index 0)
Aug 11 22:18:27 [server] npm[6010]: at async exports.getInfo (/home/user/evobot/node_modules/ytdl-core/lib/info.js:401:17)
How To Reproduce Steps to reproduce the behavior:
- Send a youtube link to the bot.
- Bot throws an error and doesn't play the video.
Expected behavior The bot should play the video.
Environment (add if possible)
- Node.js version: 18.7.0
- Evobot version: commit 3a83f3d
Can confirm I am also affected by this error.
rma=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,bu(d),h;}a=c.getResponseHeader("Content-Type")||"";f&&0<=a.indexOf("json")&&(")]};Yka(ncode);
2022-08-11T20:50:15.815774+00:00 app[worker.1]: ^^^^^^^^^^^^^^^^
2022-08-11T20:50:15.815774+00:00 app[worker.1]:
2022-08-11T20:50:15.815775+00:00 app[worker.1]: SyntaxError: Invalid or unexpected token
2022-08-11T20:50:15.815775+00:00 app[worker.1]: at new Script (node:vm:100:7)
i dont know where to add the API
Resolved for me now. Could have been a short YouTube issue with YTDL.
There was an issue with ytdl-core name resolution yesterday around noon. Fortunately, the problem was resolved a few hours ago
Same problem today, tried the last version of evobot and same...
36ef0c282b6557f338843f3c79ee9e6a90205f3a
Reinstall your npm packages to get the fix