question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bot gets stuck if video is not available

See original GitHub issue

If you have a playlist with an unavailable video, an unhandled promise rejection occurs and the bot gets stuck. If the music is skipped, everything goes back to normal.

Here is an example: Screenshot_11

After the current music ends, this happens:

Screenshot_12

I’m using the docker version, got it yesterday (d5bc0089b5bc). This is what is in the console:

# docker-compose up
Starting muse_muse_1 ... done
Attaching to muse_muse_1
muse_1  | yarn run v1.22.5
muse_1  | $ node dist/index.js
muse_1  | Ready! Invite the bot with https://discordapp.com/oauth2/authorize?client_id=383336399572828172&scope=bot&permissions=36760640
muse_1  | WARNING: ytdl-core is out of date! Update with "npm install ytdl-core@latest".
muse_1  | Error: Output stream closed
muse_1  |     at Timeout._onTimeout (/usr/app/node_modules/fluent-ffmpeg/lib/processor.js:491:25)
muse_1  |     at listOnTimeout (internal/timers.js:557:17)
muse_1  |     at processTimers (internal/timers.js:500:7)
muse_1  | Error: Output stream closed
muse_1  |     at Timeout._onTimeout (/usr/app/node_modules/fluent-ffmpeg/lib/processor.js:491:25)
muse_1  |     at listOnTimeout (internal/timers.js:557:17)
muse_1  |     at processTimers (internal/timers.js:500:7)
muse_1  | (node:27) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
muse_1  | (Use `node --trace-warnings ...` to show where the warning was created)
muse_1  | (node:27) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 disconnect listeners added to [VoiceConnection]. Use emitter.setMaxListeners() to increase limit
muse_1  | Error: Output stream closed
muse_1  |     at Timeout._onTimeout (/usr/app/node_modules/fluent-ffmpeg/lib/processor.js:491:25)
muse_1  |     at listOnTimeout (internal/timers.js:557:17)
muse_1  |     at processTimers (internal/timers.js:500:7)
muse_1  | (node:27) UnhandledPromiseRejectionWarning: Error: Status code: 410
muse_1  |     at ClientRequest.<anonymous> (/usr/app/node_modules/miniget/dist/index.js:210:27)
muse_1  |     at Object.onceWrapper (events.js:520:26)
muse_1  |     at ClientRequest.emit (events.js:400:28)
muse_1  |     at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
muse_1  |     at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
muse_1  |     at TLSSocket.socketOnData (_http_client.js:515:22)
muse_1  |     at TLSSocket.emit (events.js:400:28)
muse_1  |     at addChunk (internal/streams/readable.js:290:12)
muse_1  |     at readableAddChunk (internal/streams/readable.js:265:9)
muse_1  |     at TLSSocket.Readable.push (internal/streams/readable.js:204:10)
muse_1  |     at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
muse_1  | (node:27) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
muse_1  | (node:27) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
muse_1  | Error: Output stream closed
muse_1  |     at Timeout._onTimeout (/usr/app/node_modules/fluent-ffmpeg/lib/processor.js:491:25)
muse_1  |     at listOnTimeout (internal/timers.js:557:17)
muse_1  |     at processTimers (internal/timers.js:500:7)
muse_1  | (node:27) UnhandledPromiseRejectionWarning: Error: Status code: 410
muse_1  |     at ClientRequest.<anonymous> (/usr/app/node_modules/miniget/dist/index.js:210:27)
muse_1  |     at Object.onceWrapper (events.js:520:26)
muse_1  |     at ClientRequest.emit (events.js:400:28)
muse_1  |     at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
muse_1  |     at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
muse_1  |     at TLSSocket.socketOnData (_http_client.js:515:22)
muse_1  |     at TLSSocket.emit (events.js:400:28)
muse_1  |     at addChunk (internal/streams/readable.js:290:12)
muse_1  |     at readableAddChunk (internal/streams/readable.js:265:9)
muse_1  |     at TLSSocket.Readable.push (internal/streams/readable.js:204:10)
muse_1  |     at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
muse_1  | (node:27) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

The error happened two times.

Great bot BTW 😄 Now that Google is killing almost all the other music bots, selfhosting will become more and more common IMHO.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Hellysonrpcommented, Sep 20, 2021

It’s working. Thank you for your time 😄

1reaction
codethewebcommented, Sep 18, 2021

This should now be fixed, please test it out when you get a chance and see if it’s working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix a Stuck YouTube upload. Fixing a frozen YouTube ...
Whats shaking homies today I just got a quick video for you guys where I show what to do if your YouTube upload...
Read more >
Discord bot cannot play youtube video for more than ~60sec
The bot correctly searches youtube with the query and finds the youtube video, starts playing it, but for some reason, after ~60 sec...
Read more >
Solved: Bot in iFrame stuck in infinite loading loop, does...
Bot in iFrame stuck in infinite loading loop, does not complete loading · 1- Open your bot in the PVA studio · 2-...
Read more >
YouTube TV Freezing: How to Fix in seconds
If your Wi-Fi is not working correctly or the TV is not getting enough Wi-Fi signals, the YouTube TV will not work correctly....
Read more >
Why Are My YouTube Video Views Stuck at 320, 301, 300 ...
If your video counter is currently stuck, you will be glad to know that your video can still go viral on YouTube. Your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found