AudioPlayerError: Status code 403 randomly thrown
- Dominant language
- JavaScript
- Stars
- 4.7k
- Forks
- 852
- PR merge metrics
- No merged PRs in 30d
Description
- Are you on the latest version of ytdl-core?
- ytdl-core version 4.9.2
Include the following if your issue is a bug
- Audioplayer randomly throws error 403.
- Cannot figure out any consistency in the cause of this error.
Was supposed to be fixed with #1022 but still occurring to me with that exact release version.
Here's the error for one example.
`AudioPlayerError: Status code: 403
at ClientRequest. (/root/nova.js/node_modules/miniget/src/index.ts:255:19)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:513:28)
at ClientRequest.emit (node:domain:489:12)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:674:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
at HTTPParser.execute ()
at TLSSocket.socketOnData (node:_http_client:521:22)
at TLSSocket.emit (node:events:513:28)
at TLSSocket.emit (node:domain:489:12) {
resource: AudioResource {
playStream: Encoder {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 6,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: true,
encoder: null,
_options: [Object],
_required: 3840,
_buffer: null,
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: null
},
edges: [ [Object], [Object], [Object] ],
metadata: Song {
url: 'https://youtube.com/watch?v=Cv6tuzHUuuk',
title: 'The Bangles - Walk Like an Egyptian (Official Video)',
duration: 203
},
volume: VolumeTransformer {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: true,
_readInt: [Function (anonymous)],
_writeInt: [Function (anonymous)],
_bits: 16,
_bytes: 2,
_extremum: 32768,
volume: 1,
_chunk: null,
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: null
},
encoder: Encoder {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 6,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: true,
encoder: null,
_options: [Object],
_required: 3840,
_buffer: null,
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: null
},
audioPlayer: AudioPlayer {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
_state: [Object],
subscribers: [Array],
behaviors: [Object],
debug: [Function (anonymous)],
[Symbol(kCapture)]: false
},
playbackDuration: 0,
started: false,
silencePaddingFrames: 5,
silenceRemaining: -1
}
}`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by attempting to reproduce the reported 403 with ytdl-core 4.9.2 and the sample YouTube URL. The only code location mentioned is node_modules/miniget/src/index.ts:255; the issue names no project file or test, and done would require identifying a consistent cause and verifying that the intermittent AudioPlayerError no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100