zekroTJA / yuri2

Faster, harder, louder! The best Discord sound board in whole North Korea - with Web Interface!
Apache License 2.0
9 stars 5 forks source link

2020/05/20 23:54:09 ▶ ERRO 009 PLAYER :: Ready#Init :: strconv.Atoi: parsing "": invalid syntax #13

Open jusplainmike opened 4 years ago

jusplainmike commented 4 years ago

2020/05/20 23:54:09 ▶ ERRO 009 PLAYER :: Ready#Init :: strconv.Atoi: parsing "": invalid syntax

The bot is joining my channel muted and when I try and play from webui it says its can't find a node.

2020/05/21 00:08:41 ▶ ERRO 011 PLAYER :: VoiceServerUpdate#BestNode :: No nodes present

zekroTJA commented 4 years ago

I've looked into the code and I aactually had the concern that the Lavaplayer API has changed again (which once happened before and caused exceptions with yuri). I've upgraded our own Lavalink instance and tested around with our yuri2 instance, but I could not reproduce the error.

This is the image hash of the used Lavalink (fredboat/lavalink:master) instance:

sha256:8e21add319415de240a357bfda0afdd21282ed2c4def8266760b34bdb91af189

I've found some lines in the code where the mentioned strconv.Atoi function is implemented, but no one of these actually should cause the error.

Can you maybe explain when exactly the issue occurs? Can you reproduce it reliably? When yes, how? Which version of Lavaplayer are you hosting? How does you hosting environemnt look like (Docker? Linux? Windows? ...).

Would be nice if you can give me these information so I can dig deeper into the problem.

jusplainmike commented 4 years ago

5177daeedc1b69a5870fc4373ccefebaa16904c906bbd071d3cbbe8a9ef7dc33 Lavalink.jar This is the 3.3.1 Release from the Github. https://github.com/Frederikam/Lavalink/releases

michael@narphaven:~/soundboard/yuri2$ java --version openjdk 13.0.3 2020-04-14 OpenJDK Runtime Environment (build 13.0.3+3-Ubuntu-1ubuntu2) OpenJDK 64-Bit Server VM (build 13.0.3+3-Ubuntu-1ubuntu2, mixed mode, sharing)

I installed and tried lavalink with the java version used in the docker image, the same results. michael@narphaven:~/soundboard/yuri2$ java --version openjdk 13.0.3 2020-04-14 OpenJDK Runtime Environment Zulu13.31+11-CA (build 13.0.3+3-MTS) OpenJDK 64-Bit Server VM Zulu13.31+11-CA (build 13.0.3+3-MTS, mixed mode, sharing)

root@narphaven:/home/michael/soundboard/yuri2# java -jar Lavalink.jar 2020-05-26 00:36:17.571 INFO 68157 --- [ main] lavalink.server.Launcher :

   .   _                  _ _       _    __ _ _
  /\\ | | __ ___   ____ _| (_)_ __ | | __\ \ \ \
 ( ( )| |/ _` \ \ / / _` | | | '_ \| |/ / \ \ \ \
  \\/ | | (_| |\ V / (_| | | | | | |   <   ) ) ) )
   '  |_|\__,_| \_/ \__,_|_|_|_| |_|_|\_\ / / / /
=========================================/_/_/_/

    Version:        8e7316ba9ea85a6cd2562e35cf9e16d6c0241f70-SNAPSHOT
    Build:          1051
    Build time:     18.05.2020 13:06:43 UTC
    Branch          master
    Commit:         8e7316b
    Commit time:    18.05.2020 13:01:10 UTC
    JVM:            13.0.3
    Lavaplayer      1.3.38

2020-05-26 00:36:18.067 INFO 68157 --- [ main] lavalink.server.Launcher : Starting Launcher on narphaven with PID 68157 (/home/michael/soundboard/yuri2/Lavalink.jar started by root in /home/michael/soundboard/yuri2) 2020-05-26 00:36:18.074 INFO 68157 --- [ main] lavalink.server.Launcher : No active profile set, falling back to default profiles: default 2020-05-26 00:36:18.557 WARN 68157 --- [kground-preinit] o.s.h.c.j.Jackson2ObjectMapperBuilder : For Jackson Kotlin classes support please add "com.fasterxml.jackson.module:jackson-module-kotlin" to the classpath 2020-05-26 00:36:23.065 WARN 68157 --- [ main] io.undertow.websockets.jsr : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used 2020-05-26 00:36:23.157 INFO 68157 --- [ main] io.undertow.servlet : Initializing Spring embedded WebApplicationContext 2020-05-26 00:36:23.158 INFO 68157 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 4826 ms 2020-05-26 00:36:23.558 INFO 68157 --- [ main] l.server.metrics.PrometheusMetrics : Prometheus metrics set up 2020-05-26 00:36:24.362 WARN 68157 --- [ main] l.server.config.SentryConfiguration : Turning off sentry 2020-05-26 00:36:24.381 INFO 68157 --- [ main] l.s.c.AudioSendFactoryConfiguration : OS: Linux, Arch: amd64 2020-05-26 00:36:24.383 INFO 68157 --- [ main] l.s.c.AudioSendFactoryConfiguration : JDA-NAS supported system detected. Enabled native audio sending. 2020-05-26 00:36:24.385 INFO 68157 --- [ main] l.s.c.AudioSendFactoryConfiguration : Setting buffer to 400ms 2020-05-26 00:36:24.388 INFO 68157 --- [ main] l.s.c.AudioSendFactoryConfiguration : Setting playlist load limit to 6 2020-05-26 00:36:25.580 INFO 68157 --- [ main] c.s.d.l.tools.GarbageCollectionMonitor : GC monitoring enabled, reporting results every 2 minutes. 2020-05-26 00:36:27.009 INFO 68157 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' 2020-05-26 00:36:28.300 INFO 68157 --- [ main] org.xnio : XNIO version 3.3.8.Final 2020-05-26 00:36:28.341 INFO 68157 --- [ main] org.xnio.nio : XNIO NIO Implementation Version 3.3.8.Final WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.xnio.nio.NioXnio$2 (jar:file:/home/michael/soundboard/yuri2/Lavalink.jar!/BOOT-INF/lib/xnio-nio-3.3.8.Final.jar!/) to constructor sun.nio.ch.EPollSelectorProvider() WARNING: Please consider reporting this to the maintainers of org.xnio.nio.NioXnio$2 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 2020-05-26 00:36:28.550 INFO 68157 --- [ main] o.s.b.w.e.u.UndertowServletWebServer : Undertow started on port(s) 2333 (http) with context path '' 2020-05-26 00:36:28.575 INFO 68157 --- [ main] lavalink.server.Launcher : Started Launcher in 13.779 seconds (JVM running for 15.693)

The issue occurs right when I start yuri2.

michael@narphaven:~/soundboard/yuri2$ ./yuri_2.1.0-linux-amd64 2020/05/25 22:25:33 ▶ DEBU 001 &{Discord:0xc00005e5c0 Lavalink:0xc00005e600 Database:map[dsn:file:yuri.db.sqlite3] API:0xc0001197a0 Misc:0xc000022f70} 2020/05/25 22:25:33 ▶ INFO 002 CONFIG :: initialized 2020/05/25 22:25:33 ▶ INFO 003 DATABASE :: initialized 2020/05/25 22:25:33 ▶ INFO 004 DBOT :: initialized 2020/05/25 22:25:34 ▶ INFO 005 DBOT :: connection established 2020/05/25 22:25:34 ▶ INFO 007 API :: initialized 2020/05/25 22:25:34 ▶ INFO 006 session ready 2020/05/25 22:25:34 ▶ INFO 008 Invite: https://discordapp.com/api/oauth2/authorize?client_id=_removed_&scope=bot&permissions=126032 2020/05/25 22:25:34 ▶ ERRO 009 PLAYER :: Ready#Init :: strconv.Atoi: parsing "": invalid syntax

When I hit join the bot enters my channel but muted and I get this error.

2020/05/25 23:54:10 ▶ DEBU 010 API :: PLAYER HANDLER :: voice joined event 2020/05/25 23:54:10 ▶ ERRO 011 PLAYER :: VoiceServerUpdate#BestNode :: No nodes present

zekroTJA commented 4 years ago

Tank you verry much.

I've tested around a bit and I got the same issue. The problem was caused by the gavalink package (wrapper for the Lavalink API). I've fixed the issue a while ago with this pull request and then changed the dependency to the original one instead of my fork, but on build it might have downloaded the version of the v.1.0.0 tag instead of the latest commit which includes my fix.

TL;DR: I've now hard-locked the gavalink dependency to the latest working commit which should fix the issue. This should also fix the No nodes present issue. At least I could not reproduce it anymore.

To be completely sure the issue is fixed, could you please download the build artifact from this CI job and test if the issue consists: https://github.com/zekroTJA/yuri2/actions/runs/115712833

jusplainmike commented 4 years ago

I no longer get the PLAYER error. My bot boots up without error and I can see all my audio files but when I click on a sound I get this message in my lavalink console.

2020-05-27 01:31:02.129 INFO 80082 --- [ XNIO-1 I/O-2] lavalink.server.io.SocketServer : {"op":"voiceUpdate","guildId":"413248209285021696","sessionId":"2046651f5f6dcbf12bccc74cb4d3d381","event":{"guild_id":"413248209285021696","endpoint":"us-south518.discord.media:80","token":"c58b3aa2c343f16b"}} 2020-05-27 01:31:15.996 INFO 80082 --- [ XNIO-1 task-6] l.server.player.AudioLoaderRestHandler : GET /loadtracks 2020-05-27 01:31:15.998 INFO 80082 --- [ader-2-thread-1] lavalink.server.player.AudioLoader : No matches found

The bot joins muted as well.

Here is the console output of yuri.

2020/05/27 01:28:17 ▶ DEBU 001 &{Discord:0xc000060900 Lavalink:0xc000060940 Database:map[dsn:file:yuri.db.sqlite3] API:0xc0000f24d0 Misc:0xc0000251e0} 2020/05/27 01:28:17 ▶ INFO 002 CONFIG :: initialized 2020/05/27 01:28:17 ▶ INFO 003 DATABASE :: initialized 2020/05/27 01:28:17 ▶ INFO 004 DBOT :: initialized 2020/05/27 01:28:18 ▶ INFO 005 DBOT :: connection established 2020/05/27 01:28:18 ▶ INFO 007 API :: initialized 2020/05/27 01:28:18 ▶ INFO 006 session ready 2020/05/27 01:28:18 ▶ INFO 008 Invite: https://discordapp.com/api/oauth2/authorize?client_id=449022299555889152&scope=bot&permissions=126032 (gavalink) node ws://localhost:2333 opened 2020/05/27 01:28:18 ▶ INFO 009 PLAYER :: loaded 193 sounds from /home/michael/soundboard/DiscordSoundboard/bin/sounds/All 2020/05/27 01:28:29 ▶ DEBU 010 API :: PLAYER HANDLER :: voice joined event 2020/05/27 01:28:29 ▶ DEBU 011 PLAYER :: created player for guild 413248209285021696 2020/05/27 01:28:57 ▶ INFO 012 PLAYER :: loaded 193 sounds from /home/michael/soundboard/DiscordSoundboard/bin/sounds/All 2020/05/27 01:29:49 ▶ DEBU 013 API :: PLAYER HANDLER :: volume changed event 2020/05/27 01:29:50 ▶ DEBU 014 API :: PLAYER HANDLER :: volume changed event 2020/05/27 01:29:58 ▶ DEBU 015 API :: PLAYER HANDLER :: voice left event 2020/05/27 01:30:07 ▶ DEBU 016 API :: PLAYER HANDLER :: voice joined event 2020/05/27 01:30:07 ▶ DEBU 017 PLAYER :: using player for guild 413248209285021696 2020/05/27 01:30:59 ▶ DEBU 018 API :: PLAYER HANDLER :: voice left event 2020/05/27 01:31:02 ▶ DEBU 019 API :: PLAYER HANDLER :: voice joined event 2020/05/27 01:31:02 ▶ DEBU 020 PLAYER :: using player for guild 413248209285021696

jusplainmike commented 4 years ago

Also the WebUI is completely different then the one in this Yuri2 github. Are the features still available for adding your own favorites?

This new UI doesn't have the options for chaining sounds or adding favorites.

This is the error I get in the webui when I click a sound. image

Sikksens commented 4 years ago

Also the WebUI is completely different then the one in this Yuri2 github. Are the features still available for adding your own favorites?

This new UI doesn't have the options for chaining sounds or adding favorites.

This is the error I get in the webui when I click a sound. image

Getting this same error with all sound files, Lavalink is showing INFO 1049 --- [ XNIO-1 task-5] l.server.player.AudioLoaderRestHandler : GET /loadtracks INFO 1049 --- [ader-2-thread-1] lavalink.server.player.AudioLoader : No matches found