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

Crashing due to strings not meeting minimum length #123

Open
noahshoap opened this issue Jan 21, 2025 · 1 comment
Open

Crashing due to strings not meeting minimum length #123

noahshoap opened this issue Jan 21, 2025 · 1 comment

Comments

@noahshoap
Copy link

There is a scenario where strings, such as:

  • artist name
  • album name
  • song name

may not meet the minimum length required by the Discord API (2 chars).

In this instance, the program:

  • crashes
  • seems to cease working until manually restarted
  • (and a song without these issues is played)

I discovered this when listening to the song X on the album X by Ken Carson, which has this issue in both the song name and the album name.

Here's the stderr output for this when playing that song:

Error: (4000) child "activity" fails because [child "details" fails because ["details" length must be at least 2 characters long]]
    at DiscordIPC.#read (https://deno.land/x/discord_rpc@0.3.2/src/conn.ts:180:11)
    at eventLoopTick (ext:core/01_core.js:175:7)
    at async https://deno.land/x/discord_rpc@0.3.2/src/conn.ts:49:11

Additionally, I tested this with an artist with a single character name, M, and here are the logs for that:

Error: (4000) child "activity" fails because [child "state" fails because ["state" length must be at least 2 characters long]]
    at DiscordIPC.#read (https://deno.land/x/discord_rpc@0.3.2/src/conn.ts:180:11)
    at eventLoopTick (ext:core/01_core.js:175:7)
    at async https://deno.land/x/discord_rpc@0.3.2/src/conn.ts:49:11
@ooheunda
Copy link

ooheunda commented Feb 8, 2025

Same here. I encountered this when playing XXXTENTACION's '?' Album with this log:

Error: (4000) child "activity" fails because [child "assets" fails because [child "large_text" fails because ["large_text" length must be at least 2 characters long]]]
    at DiscordIPC.#read (https://deno.land/x/discord_rpc@0.3.2/src/conn.ts:180:11)
    at eventLoopTick (ext:core/01_core.js:175:7)
    at async https://deno.land/x/discord_rpc@0.3.2/src/conn.ts:49:11

it happened at the same location.

hope your PR gets merged soon!

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

2 participants