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

Invalid status code for access token tv response: 400 #69

Closed
austin3410 opened this issue Feb 9, 2024 · 22 comments · Fixed by #70
Closed

Invalid status code for access token tv response: 400 #69

austin3410 opened this issue Feb 9, 2024 · 22 comments · Fixed by #70
Labels
bug Something isn't working

Comments

@austin3410
Copy link

I'm running into this error on my Lavalink server. I started by submitting a form post on the Lavalink Discord but was directed here as a possible bug report.

Background:
Developing a Discord bot using the Wavelink library to communicate with my Lavalink server. The bot and Lavalink server are being hosted within the same Ubuntu environment.

Sometimes when autoplay is set to enabled. Lavalink can't find related tracks to the one that was playing.

I'm not sure but I believe it has to do with the initial track, or the search term that was used to play the initial track. I also see in the logs that it fails to update my YouTube access token but there are times when autoplay still works with this error. I don't have MFA enabled on this YouTube account.

Lavalink version: 4.0.3
Wavelink version: 3.2.0

I'm happy to provide any other information.

Lavalink log file:
spring.log

application.yml file:

server: # REST and WS server
  port: 2333
  address: 127.0.0.1
  http2:
    enabled: true # Whether to enable HTTP/2 support
plugins:
#  name: # Name of the plugin
#    some_key: some_value # Some key-value pair for the plugin
#    another_key: another_value
lavalink:
  plugins:
#    - dependency: "com.github.example:example-plugin:1.0.0" # required, the coordinates of your plugin
#      repository: "https://maven.example.com/releases" # optional, defaults to the Lavalink releases repository by default
#      snapshot: false # optional, defaults to false, used to tell Lavalink to use the snapshot repository instead of the release repository
#  pluginsDir: "./plugins" # optional, defaults to "./plugins"
#  defaultPluginRepository: "https://maven.lavalink.dev/releases" # optional, defaults to the Lavalink release repository
#  defaultPluginSnapshotRepository: "https://maven.lavalink.dev/snapshots" # optional, defaults to the Lavalink snapshot repository
  server:
    password: "youshallnotpass124"
    sources:
      youtube: true
      bandcamp: true
      soundcloud: true
      twitch: false
      vimeo: true
      http: true
      local: false
    filters: # All filters are enabled by default
      volume: true
      equalizer: true
      karaoke: true
      timescale: true
      tremolo: true
      vibrato: true
      distortion: true
      rotation: true
      channelMix: true
      lowPass: true
    bufferDurationMs: 400 # The duration of the NAS buffer. Higher values fare better against longer GC pauses. Duration <= 0 to disable JDA-NAS. Minimum of 40ms, lower values may introduce pauses.
    frameBufferDurationMs: 5000 # How many milliseconds of audio to keep buffered
    opusEncodingQuality: 10 # Opus encoder quality. Valid values range from 0 to 10, where 10 is best quality but is the most expensive on the CPU.
    resamplingQuality: LOW # Quality of resampling operations. Valid values are LOW, MEDIUM and HIGH, where HIGH uses the most CPU.
    trackStuckThresholdMs: 10000 # The threshold for how long a track can be stuck. A track is stuck if does not return any audio data.
    useSeekGhosting: true # Seek ghosting is the effect where whilst a seek is in progress, the audio buffer is read from until empty, or until seek is ready.
    youtubePlaylistLoadLimit: 6 # Number of pages at 100 each
    playerUpdateInterval: 5 # How frequently to send player updates to clients, in seconds
    youtubeSearchEnabled: true
    soundcloudSearchEnabled: true
    gc-warnings: true
    #ratelimit:
      #ipBlocks: ["1.0.0.0/8", "..."] # list of ip blocks
      #excludedIps: ["...", "..."] # ips which should be explicit excluded from usage by lavalink
      #strategy: "RotateOnBan" # RotateOnBan | LoadBalance | NanoSwitch | RotatingNanoSwitch
      #searchTriggersFail: true # Whether a search 429 should trigger marking the ip as failing
      #retryLimit: -1 # -1 = use default lavaplayer value | 0 = infinity | >0 = retry will happen this numbers times
    youtubeConfig: # Required for avoiding all age restrictions by YouTube, some restricted videos still can be played without.
      email: "<myuser>" # Email of Google account
      password: "<mypass>" # Password of Google account
    #httpConfig: # Useful for blocking bad-actors from ip-grabbing your music node and attacking it, this way only the http proxy will be attacked
      #proxyHost: "localhost" # Hostname of the proxy, (ip or domain)
      #proxyPort: 3128 # Proxy port, 3128 is the default for squidProxy
      #proxyUser: "" # Optional user for basic authentication fields, leave blank if you don't use basic auth
      #proxyPassword: "" # Password for basic authentication

metrics:
  prometheus:
    enabled: false
    endpoint: /metrics

sentry:
  dsn: ""
  environment: ""
#  tags:
#    some_key: some_value
#    another_key: another_value

logging:
  file:
    path: ./logs/

  level:
    root: INFO
    lavalink: DEBUG
    lavalink.server.io.SocketContext: TRACE

  request:
    enabled: true
    includeClientInfo: true
    includeHeaders: false
    includeQueryString: true
    includePayload: true
    maxPayloadLength: 10000


  logback:
    rollingpolicy:
      max-file-size: 10GB
      max-history: 30
@aikaterna
Copy link
Contributor

It looks like the url you are requesting in the log, watch?v=aWiHyDAqCCI8&list=RDaWiHyDAqCCI, has an extra "8" in the video id, which causes a redirect when you visit it. It seems like you want watch?v=aWiHyDAqCCI&list=RDaWiHyDAqCCI instead.

@austin3410
Copy link
Author

It looks like the url you are requesting in the log, watch?v=aWiHyDAqCCI8&list=RDaWiHyDAqCCI, has an extra "8" in the video id, which causes a redirect when you visit it. It seems like you want watch?v=aWiHyDAqCCI&list=RDaWiHyDAqCCI instead.

Is this in my ability to fix? I'm not doing any sort of URL manipulation on my side.

@topi314 topi314 changed the title ERROR Could not find tracks for mix Invalid status code for access token tv response: 400 Feb 17, 2024
@chianti-ga
Copy link

Having the same sort of problem for a discord bot

@topi314 topi314 linked a pull request Feb 18, 2024 that will close this issue
@topi314 topi314 added the bug Something isn't working label Feb 18, 2024
@topi314
Copy link
Member

topi314 commented Feb 18, 2024

this could potentially fixed by #70

@topi314 topi314 reopened this Feb 18, 2024
@topi314
Copy link
Member

topi314 commented Feb 18, 2024

@austin3410 @SKitou can you see if this lavalink build fixes the issue? lavalink-devs/Lavalink@9a6c9d4

@kyleyannelli
Copy link

@topi314 Can confirm 727959e9f621fc457b3a5adafcfffb55fdeaa538-SNAPSHOT seems to solve the issue with my project.

@austin3410
Copy link
Author

@austin3410 @SKitou can you see if this lavalink build fixes the issue? lavalink-devs/Lavalink@9a6c9d4

I'd also like to see if this build fixes my issue but I'm not familiar enough with GitHub to know how to download that specific build. I'm using the .jar file from the master release. Do I have to compile my own .jar in this case?

@topi314
Copy link
Member

topi314 commented Feb 21, 2024

Click on the commit
Click on the green checkmark
There will be a download link

@austin3410
Copy link
Author

Thank you!

@austin3410
Copy link
Author

austin3410 commented Feb 21, 2024

@austin3410 @SKitou can you see if this lavalink build fixes the issue? lavalink-devs/Lavalink@9a6c9d4

My problems are still occurring with the snapshot build. Same errors as previous.

@JustRed23
Copy link

Having the same issues, status code 400 on ytsearch

@Alokura
Copy link

Alokura commented Feb 27, 2024

Having the same, Invalid status code for video page response: 400

@thaddeuskkr
Copy link

pulled docker tag fix-yt-400 and it seems to fix

ZeNyfh added a commit to ZeNyfh/gigavibe-java-edition that referenced this issue Feb 29, 2024
I am now using the build someone mentioned in the comments of lavalink-devs/lavaplayer#69 instead of the latest snapshot, this should hopefully solve the issue.
MagicTeaMC added a commit to MagicTeaMC/Orange-Dog that referenced this issue Mar 2, 2024
@crackedpotato007

This comment was marked as off-topic.

@topi314

This comment was marked as off-topic.

@Perdition0
Copy link

I have this problem and I'm using this version

pulled docker tag fix-yt-400 and it seems to fix

@lavalink-devs lavalink-devs deleted a comment from saher228 Mar 9, 2024
@lavalink-devs lavalink-devs deleted a comment from Perdition0 Mar 9, 2024
@lavalink-devs lavalink-devs deleted a comment from Mantouisyummy Mar 9, 2024
@lucawen
Copy link

lucawen commented Mar 9, 2024

It was fixed with fix-yt-400 docker tag. Do you have any updates on when this will be merged at main docker tag? Thanks for all the support.

@hellblazer24
Copy link

I can confirm using branch fix-yt-400 fixes the issues. Perhaps the 2.0.1 lavaplayer is outdated due to Youtube making some changes to their backends.

@Mortezanavidi
Copy link

branch fix-yt-400 has problems with lavasrc 4.0.1

@hellblazer24
Copy link

branch fix-yt-400 has problems with lavasrc 4.0.1

Make sure you use lavasrc-plugin-4.0.1.jar

@Mortezanavidi
Copy link

branch fix-yt-400 has problems with lavasrc 4.0.1

Make sure you use lavasrc-plugin-4.0.1.jar

as i mentioned, i am using specifically that version of plugin for fix-yt-400, it works fine with lavalink v4

@topi314
Copy link
Member

topi314 commented Mar 10, 2024

this should now be fixed in https://github.com/lavalink-devs/lavaplayer/releases/tag/2.1.1 and https://github.com/lavalink-devs/lavaplayer/releases/tag/1.5.3

I'm locking this issue, please open a new issue when you encounter new errors

@topi314 topi314 closed this as completed Mar 10, 2024
@lavalink-devs lavalink-devs locked as resolved and limited conversation to collaborators Mar 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.