fent / fent/node-ytdl-core

Error in audio stream for xxxx: MinigetError: Status code: 403

Open
#1,267 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.7k
Forks
852
PR merge metrics
No merged PRs in 30d

Description

### Before creating an issue, please try the following

- Are you on the latest version of ytdl-core?
- To check, run `npm ls ytdl-core`
- If you're using a bot or application that depends on ytdl-core, look at the bottom of the readme on how to update the library
- Otherwise, if you're directly importing ytdl-core, to install the latest version, run `npm install ytdl-core@latest`
- Search the list of issues for a possible duplicate.
- If there is a duplicate issue thread, but it's closed, only post in it if it's been active in the past month. Otherwise, creating a new issue thread is fine.
- If your question is about using the library for a specific use case, check out the [examples folder](https://github.com/fent/node-ytdl-core/tree/master/example).

### Otherwise, feel free to open an issue
ytdl-core@4.11.5

DEFAULT 2023-12-16T18:36:01.748133Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] Error in audio stream for jzh3KGq4tqg: MinigetError: Status code: 403
DEFAULT 2023-12-16T18:36:01.748156Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at ClientRequest. (/workspace/node_modules/miniget/dist/index.js:206:27)
DEFAULT 2023-12-16T18:36:01.748163Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at Object.onceWrapper (node:events:632:26)
DEFAULT 2023-12-16T18:36:01.748169Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at ClientRequest.emit (node:events:517:28)
DEFAULT 2023-12-16T18:36:01.748176Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at ClientRequest.emit (node:domain:552:15)
DEFAULT 2023-12-16T18:36:01.748184Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:700:27)
DEFAULT 2023-12-16T18:36:01.748190Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
DEFAULT 2023-12-16T18:36:01.748197Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at TLSSocket.socketOnData (node:_http_client:541:22)
DEFAULT 2023-12-16T18:36:01.748202Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at TLSSocket.emit (node:events:517:28)
DEFAULT 2023-12-16T18:36:01.748210Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at TLSSocket.emit (node:domain:552:15)
DEFAULT 2023-12-16T18:36:01.748216Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at addChunk (node:internal/streams/readable:335:12) {
DEFAULT 2023-12-16T18:36:01.748222Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] statusCode: 403

```
// const audioStream = ytdl(videoUrl, { quality: lowestQualityFormat.itag });
const audioStream = ytdl(videoUrl, { quality: lowestQualityFormat.itag, requestOptions: { agent: agent } });

const firebaseStream = file.createWriteStream({
metadata: {
contentType: lowestQualityFormat.mimeType,
},
});
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by checking the reported ytdl-core version with `npm ls ytdl-core`, then inspect the audio request at the `ytdl(videoUrl, ...)` call and the Miniget stack location `node_modules/miniget/dist/index.js`. Reproduce the request for video `jzh3KGq4tqg` and determine whether the 403 is caused by the request options or an upstream change; done means the audio stream succeeds or the failure is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.