jagrosh / jagrosh/MusicBot

[Bug Report] Search breaks with long input

Open
#1,271 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.8k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

### Bug Description

Executing search with long input (example in steps) throws exception.
![image](https://user-images.githubusercontent.com/77748206/212560828-9cc019fe-99c8-4bac-8102-4608a909ad56.png)

### Steps to Reproduce
Input in text file because GitHub removes some chars
1. [input_search.txt](https://github.com/jagrosh/MusicBot/files/10420962/input_search.txt)

### Expected Result

Bot prints the top YouTube results (dividing message in 2 seperate messsages as in play command).

### Debug Output

```
System Properties:
java.version = 17.0.4.1
java.vm.name = OpenJDK 64-Bit Server VM
java.vm.specification.version = 17
java.runtime.name = OpenJDK Runtime Environment
java.runtime.version = 17.0.4.1+1
java.specification.version = 17
os.arch = amd64
os.name = Windows 10

JMusicBot Information:
Version = 0.3.8
Owner = 689431450508066911
Prefix = !
AltPrefix = null
MaxSeconds = 0
NPImages = false
SongInStatus = false
StayInChannel = false
UseEval = false
UpdateAlerts = true

Dependency Information:
JDA Version = 4.4.0_352
JDA-Utilities Version = 3.0.5
Lavaplayer Version = 1.3.78

Runtime Information:
Total Memory = 37
Used Memory = 16

Discord Information:
ID = 1029868760045207602
Guilds = 2
Users = 4
```

### Additional Info

Play command works without problems with the same input.

### Checklist

- [X] I have looked for information about this [within the documentation](https://jmusicbot.com/)
- [X] I have searched for similar issues [on the issues page](https://github.com/jagrosh/MusicBot/issues?q=is%3Aissue)
- [X] I am running the latest version of the bot: ![Release](https://img.shields.io/github/release/jagrosh/MusicBot.svg)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the search command with the attached input_search.txt file, then compare its handling with the play command, which reportedly accepts the same input. The fix is done when the bot returns the top YouTube results in two messages without throwing an exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.