freyacodes / ukulele

Simple self-contained Discord music bot
MIT License
157 stars 75 forks source link

Migration to JDA:v5.0.0-beta #69

Open jocull opened 1 year ago

jocull commented 1 year ago

As requested in #65

I followed the migration guide here https://jda.wiki/introduction/migration-v4-v5/ I hope I did this right ๐Ÿ™‚

Frozen-byte commented 6 months ago

Would you mind releasing a docker for this? I would love to test it then ๐Ÿ‘๐Ÿป

jocull commented 5 months ago

Hey @Frozen-byte ๐Ÿ‘‹ ๐Ÿ˜„ Please try https://github.com/jocull/ukulele/pkgs/container/ukulele/192687440?tag=jda-5 I hope I did this right!

Frozen-byte commented 5 months ago

Hey @Frozen-byte ๐Ÿ‘‹ ๐Ÿ˜„ Please try https://github.com/jocull/ukulele/pkgs/container/ukulele/192687440?tag=jda-5 I hope I did this right!

Works perfectly, thank you! Will test it further this week and report back if any odd behavior was noticed.

jocull commented 5 months ago

The image for this was updated to address new issue https://github.com/freyacodes/ukulele/issues/73#issuecomment-2030886146

See https://github.com/jocull/ukulele/pkgs/container/ukulele/199356264?tag=jda-5

Frozen-byte commented 4 months ago

Sadly today it got borked again, look like alphabet getting serious :/ image: ghcr.io/jocull/ukulele:jda-5

Message:

ukulele-1  | 2024-04-29 17:04:36.399 ERROR 1 --- [ader-2-thread-1] dev.arbjerg.ukulele.command.PlayCommand  : Handled exception occurred
ukulele-1  | 
ukulele-1  | com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Video returned by YouTube isn't what was requested
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeTrackDetailsLoader.load(DefaultYoutubeTrackDetailsLoader.java:59) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeTrackDetailsLoader.loadDetails(DefaultYoutubeTrackDetailsLoader.java:36) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadTrackWithVideoId(YoutubeAudioSourceManager.java:230) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager$LoadingRoutes.track(YoutubeAudioSourceManager.java:254) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager$LoadingRoutes.track(YoutubeAudioSourceManager.java:250) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeLinkRouter.routeFromUrlWithVideoId(DefaultYoutubeLinkRouter.java:103) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeLinkRouter.routeFromMainDomain(DefaultYoutubeLinkRouter.java:68) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeLinkRouter.route(DefaultYoutubeLinkRouter.java:46) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItemOnce(YoutubeAudioSourceManager.java:218) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItem(YoutubeAudioSourceManager.java:149) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:412) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:394) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.loadItemSync(DefaultAudioPlayerManager.java:156) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$loadItem$0(DefaultAudioPlayerManager.java:175) ~[lavaplayer-19e815bd83.jar!/:na]
ukulele-1  |    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
ukulele-1  |    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
ukulele-1  |    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
ukulele-1  |    at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]
ukulele-1  | Caused by: java.lang.IllegalStateException: 
jocull commented 4 months ago

Some of the included libraries in this project have shifted around. I do have an updated branch that was working, but have not used it in a few days. I can attempt to validate and push updates again.

jocull commented 4 months ago

Hi @Frozen-byte - I've updated the branch and Docker image. You can give the updates a try and see if they make an improvement for you ๐Ÿ˜ƒ

Frozen-byte commented 3 months ago

I am sorry for the late testing, was on vacation. Works like a charm, I had one minor caching issue and needed to docker down the container instead of just pulling the new image.

huntastikus commented 1 month ago

@jocull I am getting com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Sign in to confirm youโ€™re not a bot

jocull commented 1 month ago

@jocull I am getting com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Sign in to confirm youโ€™re not a bot

There are some upstream PRs Iโ€™m trying to monitor for this, but unsure of a solution currently. Thanks for the report, I will update when thereโ€™s something more clear ๐Ÿ™

Frozen-byte commented 1 month ago

@jocull I am getting com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Sign in to confirm youโ€™re not a bot

There are some upstream PRs Iโ€™m trying to monitor for this, but unsure of a solution currently. Thanks for the report, I will update when thereโ€™s something more clear ๐Ÿ™

is there something we can help with? I have this problem, too.

jocull commented 1 month ago

@huntastikus @Frozen-byte the branch and docker image are updated with a newer version. It seems to work for me, but don't know if it will solve your specific issue. Let me know your results please ๐Ÿ˜„

If this doesn't work, then I believe this upstream work is likely relevant: https://github.com/lavalink-devs/youtube-source/pull/33

kiloforce commented 4 weeks ago

image: ghcr.io/jocull/ukulele:jda-5

Back work working again, thanks @jocull !

kiloforce commented 4 weeks ago

@jocull looks like you have had this PR up since April with no movement. It looks like none of the other PRs have had any movement since early 2022? Have you considered maybe upgrading your fork to a more full featured version? Maybe one with an updated README / Wiki with instructions for bringing up Ukulele with your Docker?

huntastikus commented 4 weeks ago

I am not sure how to apply the upstream work to this package. @kiloforce how did you get it to work?

kiloforce commented 3 weeks ago

I am not sure how to apply the upstream work to this package. @kiloforce how did you get it to work?

# original configuration
git clone https://github.com/freyacodes/ukulele.git
cd ukulele
git checkout master
git pull
cp ukulele.example.yml ukulele.yml
# configure ukulele.yml
mkdir db && chown -R 999 db/

---
# edit docker-compose.yml and change:
# image: ghcr.io/freyacodes/ukulele:master
image: ghcr.io/jocull/ukulele:jda-5
---

# routinely update jda-5 docker image:
docker rm -f ukulele_ukulele_1
docker pull ghcr.io/jocull/ukulele:jda-5
docker-compose up -d

# follow the logs to make sure it is happy:
docker logs -f ukulele_ukulele_1
Frozen-byte commented 3 weeks ago

@huntastikus @Frozen-byte the branch and docker image are updated with a newer version. It seems to work for me, but don't know if it will solve your specific issue. Let me know your results please ๐Ÿ˜„

If this doesn't work, then I believe this upstream work is likely relevant: lavalink-devs/youtube-source#33

Since my server is in the banned IP-Range of google, it won't work until https://github.com/lavalink-devs/youtube-source/pull/33 hits this repository I think. Lavalink should provide this fix in the next version, and I will happily test it when it arrives ukulele, too!