TS3AudioBot
TS3AudioBot copied to clipboard
Problem
16:45:17.9570| INFO [============ TS3AudioBot started =============]
16:45:17.9926| INFO [=== Date/Time: Thursday, 10 May 2018 16:45:17
16:45:18.1021| INFO [=== Version: 0.9.0-unstable.35/develop/b529f8eb
16:45:18.1030| INFO [=== Platform: Linux <?> (64bit)
16:45:18.1030| INFO [=== Runtime: Mono (5.12.0.226 (tarball Thu May 3 10:03:41 UTC 2018))
16:45:18.1078|FATAL Critical program failure!.
16:45:18.1120| INFO TS3AudioBot shutting down.
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libopus
at (wrapper managed-to-native) TS3Client.Audio.Opus.NativeMethods.opus_get_version_string()
at TS3Client.Audio.Opus.NativeMethods.get_Info () [0x00000] in
sudo apt-get install libopus-dev
I've got a idea. What about adding a code for Linux users that would give users ability to install opus library when error is thrown? You would at least get less redundant issues.
I also thought about that, but that would require to either run the bot as root or request root permissions after launch. Also there are tons of different package manager, supporting them all would be a lot of work.
I was thinking about something like sudo mono TS3AudioBot.exe --setup which would try to automate as much as possible and try to find common pitfalls.
When a known start-up error occours, it would print a ERROR log and promt the user to execute the above.
I'd try to optimize it for a few selected platforms like Ubuntu (apt/apt-get), Arch (pacman) (and maybe Debian (also apt/apt-get), but Debian often is like reeeaaally outdated and annoying to deal with).
Alternatively you could also detect the os and print an error like opus is missing, please run `sudo apt-get install libopus-dev` .
More general, it may be helpful to print all suggestions (like upgrade mono) in red or so to minimize the chance that people overlook it ;)