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

/search sometimes fails for a track that /play can play just fine #45

Closed
jareddantis opened this issue Oct 4, 2023 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@jareddantis
Copy link
Collaborator

Example track: spotify:track:0UV5zxRMz6AO4ZwUOZNIKI (Dr. Dog - Where'd All The Time Go?)

Steps to reproduce:

  1. Confirm playback works by issuing /play whered all the time go?
  2. Stop playback
  3. Try to search for the same track by /search search_type:track query:whered all the time go
  4. Choose the result from Dr. Dog in the Shame, Shame album
  5. Observe that the bot connects to voice but doesn't play music
Relevant error logs
2023-10-04 23:29:49.055 [INFO] Initialized queue manager for guild *** (queue.py:37)
2023-10-04 23:29:49.055 [INFO] Using node `sydney-prod' for *** (jockey.py:59)
2023-10-04 23:29:49.957 [INFO] Found cached Lavalink track for Spotify ID 0UV5zxRMz6AO4ZwUOZNIKI (jockey_helpers.py:116)
Ignoring exception in view <SpotifyDropdownView timeout=None children=1> for item <SpotifyDropdown placeholder='Choose track...' min_values=1 max_values=1 options=[<SelectOption label="Where'd All the Time Go? (3 min 54 sec)" value='0UV5zxRMz6AO4ZwUOZNIKI' description='Dr. Dog - Shame, Shame (Deluxe Edition) ' emoji=None default=False>, <SelectOption label="Where'd All the Time Go (4 min 1 sec)" value='6gvUAc9EaArZs1Hv8h6uxw' description="Bird and Byron - Where'd All the Time Go " emoji=None default=False>, <SelectOption label="where'd all the time go? (slowed + reverb) (5 min 7 sec)" value='1sZY1n1TvYw7uP4Ky7J3kd' description="ghostly echoes - where'd all the time go? " emoji=None default=False>, <SelectOption label="Where'd All the Time Go? (5 min 7 sec)" value='0haFdX7U92RF98NjvnucHz' description='John Vincent III - Oil ' emoji=None default=False>, <SelectOption label='Where Did The Party Go (4 min 3 sec)' value='66324Jt0mZdXaM7f8uUitE' description='Fall Out Boy - Save Rock And Roll ' emoji=None default=False>, <SelectOption label="where'd all the time go? (sped up) (2 min 53 sec)" value='1y98BxONMKWQFEpuLwEyQu' description="accelerate - where'd all the time go? " emoji=None default=False>, <SelectOption label="where did you go? but it's the slowed & reverb (1 min 52 sec)" value='1Pwh4vY5YfOc4tWYzUdOYK' description='MADEBYGODES - where did you go? ' emoji=None default=False>, <SelectOption label="Where'd All the Time Go (3 min 12 sec)" value='17T507wOcKhimJwVCpGoTR' description='Lynfield College Music - 10MUA 2022 ' emoji=None default=False>, <SelectOption label="where did you go? but it's nightcore (1 min 16 sec)" value='6pSbjsTtRgbdfTX2uCy2r8' description='MADEBYGODES - where did you go? (remixes) ' emoji=None default=False>, <SelectOption label='Last Man in the World (2 min 42 sec)' value='69YOn8zDCuOldm2xUpynsE' description='The Band CAMINO - The Dark ' emoji=None default=False>] disabled=False>:
Traceback (most recent call last):
  File "/opt/venv/lib/python3.11/site-packages/nextcord/ui/view.py", line 375, in _scheduled_task
    await item.callback(interaction)
  File "/opt/app/views/spotify_dropdown.py", line 91, in callback
    await self._cog.play(interaction, query=entity_url)
  File "/opt/app/cogs/player/__init__.py", line 297, in play
    track_name = await jockey.play_impl(query, itx.user.id)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app/cogs/player/jockey.py", line 399, in play_impl
    if not await self._play(new_tracks[0]):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app/cogs/player/jockey.py", line 199, in _play
    await self.play(item.lavalink_track, volume=self.volume)
  File "/opt/venv/lib/python3.11/site-packages/mafic/player.py", line 700, in play
    return await self.update(
           ^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/mafic/player.py", line 629, in update
    raise PlayerNotConnected
mafic.errors.PlayerNotConnected: The player is not connected to a voice channel.
@jareddantis jareddantis added the bug Something isn't working label Oct 4, 2023
@jareddantis
Copy link
Collaborator Author

Seems to only happen when running Blanco using the Docker image. Deployments from the raw Python source look to be OK. Will investigate further.

@jareddantis
Copy link
Collaborator Author

jareddantis commented Oct 18, 2023

Looks to be caused by Player.connected not being set to True in time for play(), which is already due to be fixed in Mafic (ooliver1/mafic#99).

6f55781 gets around this by waiting a maximum of 10 seconds for the player to connect before retrying play(). Should be fixed in 0.5.2.

@jareddantis
Copy link
Collaborator Author

Can't seem to reproduce anymore with 0.5.2, closing for now 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant