ciderapp / Cider-2

Primary public repository for Cider 2.x
https://cider.sh
189 stars 3 forks source link

RPC timeouts when attempting to get lyrics for certain songs #826

Open evaqum opened 3 weeks ago

evaqum commented 3 weeks ago

Preflight Checklist

Download Source

Itch

Operating System

Windows 10

Commit Hash

7b04e2c902aa2dab4065c276beb3302b22385240

Connect Instance ID

No response

Build Timestamp

10/29/2024, 6:16:42 AM

Describe the Bug

Trying to get lyrics for songs with beat-by-beat lyrics via the RPC never yields a proper response, resulting in a timeout.

After some research I found that this is an issue with CiderApp.lyrics.getLyrics internal implementation, at some point in which a cyclic reference is made in the words (the whole words, ex. "funny"), which consist of multiple words (parts of the word, ex. "fun" and "ny"). The client (Cider App) cannot serialize those lyrics and never sends a response.

Steps to Reproduce

Reproduce API Timeout

  1. Make sure the api is up (/api/v1/playback/active)
  2. Try to fetch lyrics for any song with beat-by-beat lyrics (/api/v1/lyrics/{songId}) For example, 1766332769, 1604645502
  3. Never get a response

Other lyrics should still work

Getting badly parsed lyrics

  1. Access the DevTools Console in Cider client
  2. Get lyrics for any beat-by-beat song by calling await CiderApp.lyrics.getLyrics({ id: songId, type: 'songs' }) IDs: 1766332769, 1604645502 or other
  3. Verify that cyclic references are indeed present Lines that have words with them: 1, 8, 22, 25 (zero-indexed) for 1766332769 24, 27 (zero-indexed) for 1604645502

Anything else?

Badly parsed lyrics example ![image](https://github.com/user-attachments/assets/bb7391b4-1d44-4e93-982c-c7a4606baf29) ![image](https://github.com/user-attachments/assets/3c1f6668-1d62-49e6-be5f-8fc559b0eb70)
github-actions[bot] commented 3 weeks ago

Hello @evaqum :wave:

We really appreciate you taking the time to report this issue, please double check your issue to make sure you are clear and concise in your description. This will help us to help you as quickly as possible.

We'd like to ask you be patient and we will get back to you as soon as we can.

In the meantime, take a look at our FAQs which may answer your question.

Thanks again and we hope you enjoy the app! :smiley:

cider-collective[bot] commented 5 days ago

This issue is stale. If this issue is still occurring and you are on a supported version, please leave any comment (e.g. "bump") within the next 7 days and the issue will remain open. If you have any new or additional information that may help us resolve your issue, please include it with your comment.