Skip to content
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

Failed to find any playable formats by Promise.allSettled #274

@ductridev

Description

@ductridev

Describe the bug and how to reproduce it

I have to open another issue related to #273 since it looks like not from syntax. But it is related to how Promise.allSettled & Promise.all handle the reject.

I have many responses when using Promise.allSettled:

{
    status: 'rejected',
    reason: UnrecoverableError: Sign in to confirm you’re not a bot
        at exports.playError (/home/container/node_modules/@distube/ytdl-core/lib/utils.js:168:12)
        at playerAPI (/home/container/node_modules/@distube/ytdl-core/lib/info.js:433:25)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async fetchWebEmbeddedPlayer (/home/container/node_modules/@distube/ytdl-core/lib/info.js:397:10)
        at async Promise.allSettled (index 0)
        at async exports.getInfo (/home/container/node_modules/@distube/ytdl-core/lib/info.js:257:25)
  }

Then I think the problem is it should be Promise.all so will throw an error when rejected, and then will try sig.decipherFormats after catching the reject. That's my thought, maybe I'm wrong, but at least it works lol. Happy to hear your guys' opinions.

Environment

  • @distube/ytdl-core version: 4.16.12
  • Node.js version: v20.18.0
  • Operating system: Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions