Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status code 403? 🐛 #1658

Open
ErnDevDDLC opened this issue Jul 12, 2024 · 4 comments
Open

Status code 403? 🐛 #1658

ErnDevDDLC opened this issue Jul 12, 2024 · 4 comments

Comments

@ErnDevDDLC
Copy link

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:

  1. Try playing any song /play, /search or /playlist, whichever
  2. See the command console

Expected behavior
The song playing

Environment (add if possible)

  • Node.js version: Node V21
  • DerionHost Hosting

Additional information & screenshots
Screenshot_2024-07-11-23-23-12-936_com android chrome
Screenshot_2024-07-11-23-23-20-837_com android chrome
Screenshot_2024-07-11-23-24-18-095_com android chrome

@IIyn
Copy link

IIyn commented Jul 13, 2024

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;
    }

@ErnDevDDLC
Copy link
Author

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.

@emlazzarin
Copy link

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  | }

@emlazzarin
Copy link

Nevermind, this is being addressed in #1645. This issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants