AmandaDiscord / Volcano

A light-weight LavaLink compatible replacement
MIT License
71 stars 15 forks source link

Having two or more players playing a Radiocast or Icecast related stream causes Volcano to crash #22

Closed aarhuuus closed 2 years ago

aarhuuus commented 2 years ago

This has been discovered by playing two or more Radiocast or Icecast related stream, server has been allocated 2GB or memory via Docker container. 1 player sometimes causes Volcano to crash and sometimes it doesn't and would play music normally. Spawning another player would crash Volcano.

Version used: Volcano 1.1.6 with Node.JS 16 LTS (and 17)

Error Logs:

node:internal/errors:465
    ErrorCaptureStackTrace(err);
    ^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:372:5)
    at validateString (node:internal/validators:120:11)
    at Object.dirname (node:path:1276:5)
    at new Frame (/home/container/node_modules/backtracker/dist/Frame.js:18:35)
    at Function.process (/home/container/node_modules/backtracker/dist/index.js:47:34)
    at Function.get stack [as stack] (/home/container/node_modules/backtracker/dist/index.js:27:28)
    at Object.getPrefix (file:///home/container/dist/util/Logger.js:39:35)
    at info (file:///home/container/dist/util/Logger.js:48:38)
    at Server.serverHandler (file:///home/container/dist/index.js:420:13)
    at runMicrotasks (<anonymous>) {
  code: 'ERR_INVALID_ARG_TYPE'
}
PapiOphidian commented 2 years ago

BackTracker is causing some issues, so I will fix BackTracker and then see what the issue is regarding SHOUTCast and ICECast

aarhuuus commented 2 years ago

It seems like this issue only affects SHOUTcast and ICEcast since YouTube streams work fine. Changing title...

PapiOphidian commented 2 years ago

Can you give me tracks you tried to play

aarhuuus commented 2 years ago

These are foreign radio stations grabbed via the radio-browser API.

PapiOphidian commented 2 years ago

These stations seem to work fine for me with no errors. The error stack you provided is coming from Volcano's Logger.error which isn't being called here image

PapiOphidian commented 2 years ago

I've compiled a developer release you may try which includes the up to date package.json. You'd just have to npm install Volcano-1.1.7-dev-1.zip

aarhuuus commented 2 years ago

It seems that this issue is fixed with the applied developer build but there's an error (but it doesn't really affect the performance of Volcano).

2022-08-15 18:33:04.252 ERROR 62 --- [      main] worker.js:481:12  : "Cannot create property 'audioPlayer' on boolean 'true'
TypeError: Cannot create property 'audioPlayer' on boolean 'true'
    at AudioPlayer.play (file:///home/container/node_modules/@discordjs/voice/dist/index.mjs:907:26)
    at Queue.play (file:///home/container/dist/worker.js:253:21)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)"
PapiOphidian commented 2 years ago

Yup. I can see that error as well and working on it

PapiOphidian commented 2 years ago

Looks like the 2nd URL is missing response headers and Volcano makes a fuss about that. Working on fixing

PapiOphidian commented 2 years ago

Fixed in dev. Going to be publishing soon