Status code 403? 🐛
Describe the bug
Basically when trying to play a song, it does not play and this appears on the console: AudioPlayer Error: Status code: 403
How To Reproduce Steps to reproduce the behavior:
- Try playing any song /play, /search or /playlist, whichever
- See the command console
Expected behavior The song playing
Environment (add if possible)
- Node.js version: Node V21
- DerionHost Hosting
Additional information & screenshots
I think I found where it fails In structs/MusicQueue.ts at processQueue() :
try {
const resource = await next.makeResource();
this.resource = resource!;
this.player.play(this.resource); // -- AudioPlayerError: Status code: 403 --
this.resource.volume?.setVolumeLogarithmic(this.volume / 100);
} catch (error) {
console.error(error);
return this.processQueue();
} finally {
this.queueLock = false;
}
I think I found where it fails In structs/MusicQueue.ts at processQueue() :
try { const resource = await next.makeResource(); this.resource = resource!; this.player.play(this.resource); // -- AudioPlayerError: Status code: 403 -- this.resource.volume?.setVolumeLogarithmic(this.volume / 100); } catch (error) { console.error(error); return this.processQueue(); } finally { this.queueLock = false; }
The thing is... Because the hosting does not support typescript I had to modify the code to javascript and I don't remember how I did it (it's been a while) And I can't find the 'processQueue()' line that you told me about.
I'm also having this issue. Note that this is the complete error log:
1|mixerbot | AudioPlayerError: Status code: 403
1|mixerbot | at ClientRequest.<anonymous> (/home/dweezil/code/evobot/node_modules/miniget/src/index.ts:255:19)
1|mixerbot | at Object.onceWrapper (node:events:628:26)
1|mixerbot | at ClientRequest.emit (node:events:513:28)
1|mixerbot | at ClientRequest.emit (node:domain:489:12)
1|mixerbot | at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:674:27)
1|mixerbot | at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
1|mixerbot | at TLSSocket.socketOnData (node:_http_client:521:22)
1|mixerbot | at TLSSocket.emit (node:events:513:28)
1|mixerbot | at TLSSocket.emit (node:domain:489:12)
1|mixerbot | at addChunk (node:internal/streams/readable:324:12) {
1|mixerbot | resource: AudioResource {
1|mixerbot | playStream: Encoder {
1|mixerbot | _readableState: [ReadableState],
1|mixerbot | _events: [Object: null prototype],
1|mixerbot | _eventsCount: 6,
1|mixerbot | _maxListeners: undefined,
1|mixerbot | _writableState: [WritableState],
1|mixerbot | allowHalfOpen: true,
1|mixerbot | encoder: null,
1|mixerbot | _options: [Object],
1|mixerbot | _required: 3840,
1|mixerbot | _buffer: null,
1|mixerbot | [Symbol(kCapture)]: false,
1|mixerbot | [Symbol(kCallback)]: null
1|mixerbot | },
1|mixerbot | edges: [ [Object], [Object], [Object] ],
1|mixerbot | metadata: Song {
1|mixerbot | url: 'https://youtube.com/watch?v=B_Bsb6YaTcs',
1|mixerbot | title: 'Phonk Techno Gaming by Infraction [No Copyright Music] / Freak',
1|mixerbot | duration: 157
1|mixerbot | },
1|mixerbot | volume: VolumeTransformer {
1|mixerbot | _readableState: [ReadableState],
1|mixerbot | _events: [Object: null prototype],
1|mixerbot | _eventsCount: 5,
1|mixerbot | _maxListeners: undefined,
1|mixerbot | _writableState: [WritableState],
1|mixerbot | allowHalfOpen: true,
1|mixerbot | _readInt: [Function (anonymous)],
1|mixerbot | _writeInt: [Function (anonymous)],
1|mixerbot | _bits: 16,
1|mixerbot | _bytes: 2,
1|mixerbot | _extremum: 32768,
1|mixerbot | volume: 1,
1|mixerbot | _chunk: null,
1|mixerbot | [Symbol(kCapture)]: false,
1|mixerbot | [Symbol(kCallback)]: null
1|mixerbot | },
1|mixerbot | encoder: Encoder {
1|mixerbot | _readableState: [ReadableState],
1|mixerbot | _events: [Object: null prototype],
1|mixerbot | _eventsCount: 6,
1|mixerbot | _maxListeners: undefined,
1|mixerbot | _writableState: [WritableState],
1|mixerbot | allowHalfOpen: true,
1|mixerbot | encoder: null,
1|mixerbot | _options: [Object],
1|mixerbot | _required: 3840,
1|mixerbot | _buffer: null,
1|mixerbot | [Symbol(kCapture)]: false,
1|mixerbot | [Symbol(kCallback)]: null
1|mixerbot | },
1|mixerbot | audioPlayer: AudioPlayer {
1|mixerbot | _events: [Object: null prototype],
1|mixerbot | _eventsCount: 2,
1|mixerbot | _maxListeners: undefined,
1|mixerbot | _state: [Object],
1|mixerbot | subscribers: [Array],
1|mixerbot | behaviors: [Object],
1|mixerbot | debug: [Function (anonymous)],
1|mixerbot | [Symbol(kCapture)]: false
1|mixerbot | },
1|mixerbot | playbackDuration: 0,
1|mixerbot | started: false,
1|mixerbot | silencePaddingFrames: 5,
1|mixerbot | silenceRemaining: -1
1|mixerbot | }
1|mixerbot | }
Nevermind, this is being addressed in https://github.com/eritislami/evobot/pull/1645. This issue can be closed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.