kwsch / SysBot.NET

sys-botbase client for remote control automation of Nintendo Switch consoles.
https://projectpokemon.org/home/files/file/4207-sysbot-automatic-build/
GNU Affero General Public License v3.0
462 stars 270 forks source link

Sysbot doesn't run but instead hangs while trying to start the bots #192

Closed xtheredshirtx closed 8 months ago

xtheredshirtx commented 8 months ago

When you click "Start All" the bot doesn't do anything. You can't close sysbot program, change tabs, or see any logs to troubleshoot the issue.

I have to use the task manager to end task to get sysbot to close.

No logs to share as nothing is created.

This is after latest update that was created 4 hours ago.

Aaron456781 commented 8 months ago

same happened to me, try deleting the old config file and use a new one as that fixed it for me thats assuming you are using an old one

xtheredshirtx commented 8 months ago

same happened to me, try deleting the old config file and use a new one as that fixed it for me thats assuming you are using an old one

Tried this but sadly I get stuck at the exact same spot.

xtheredshirtx commented 8 months ago

Update, it only works if I use Discord. If I add my Twitch channel it doesn't work and just hangs there.

Lusamine commented 8 months ago

Read the text logs to see what is happening when you connect to Twitch. Latest commit should fix the logs issue when it's published as a single file.

xtheredshirtx commented 8 months ago

No logs are created and all it says is

Form: Starting all bots. Pokemonpool: Surprise trading will fail, failed to load any compatible files. Hub: Nothing to distribute for empty trade queues!

And thats it. Sysbot then doesn't allow you to close it, switch tabs, minimize itself unless you end task.

If I remove the oauth for the twitch bot then it runs like normal for Discord trading.

This is after I deleted the config file, then started the sysbot, made the changes needed to run like before.

Lusamine commented 8 months ago

Again, latest commit should fix the text logs. Please update and start over in a new folder.

xtheredshirtx commented 8 months ago

Again, using latest commit, new folder, same issue.

Lusamine commented 8 months ago

I cannot solve the issue with no logs and no way to replicate.

xtheredshirtx commented 8 months ago

Tried on 2 different computers and same issue. Downloaded latest from https://projectpokemon.org/home/files/file/4207-sysbotnet-automatic-build/

Not really sure what else I can provide to get it sorted.

xtheredshirtx commented 8 months ago

Ok I rebuilt it with VS. This is what the log says.

2023-12-21 10:02:13.8450|INFO|SysBot.Base.LogUtil|Form Starting all bots... 2023-12-21 10:02:13.9197|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Connecting to: wss://irc-ws.chat.twitch.tv:443 2023-12-21 10:02:14.3057|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Should be connected! 2023-12-21 10:02:14.3177|INFO|SysBot.Base.LogUtil|PokemonPool Surprise trading will fail; failed to load any compatible files. 2023-12-21 10:02:14.3177|ERROR|SysBot.Base.LogUtil|Hub Nothing to distribute for Empty Trade Queues! 2023-12-21 10:02:14.3177|INFO|SysBot.Base.LogUtil|10.0.0.160 Connecting to device... 2023-12-21 10:02:14.3241|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Joining channel: xTheRedShirtx 2023-12-21 10:02:14.3477|INFO|SysBot.Base.LogUtil|Echo Exception: TwitchLib.Client.Exceptions.BadStateException: Must be connected to at least one channel. at TwitchLib.Client.TwitchClient.GetJoinedChannel(String channel) at TwitchLib.Client.TwitchClient.SendMessage(String channel, String message, Boolean dryRun) at SysBot.Pokemon.Twitch.TwitchBot1.<.ctor>b__7_6(String msg) in C:\Users\theco\source\repos\SysBot.NET\SysBot.Pokemon.Twitch\TwitchBot.cs:line 78 at SysBot.Base.EchoUtil.Echo(String message) in C:\Users\theco\source\repos\SysBot.NET\SysBot.Base\Util\EchoUtil.cs:line 16 occurred while trying to echo: All bots have been issued a command to Start. to the forwarder: System.Action1[System.String] 2023-12-21 10:02:14.5157|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: :tmi.twitch.tv 001 morpeko_bot :Welcome, GLHF! 2023-12-21 10:02:14.5157|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: :tmi.twitch.tv 002 morpeko_bot :Your host is tmi.twitch.tv 2023-12-21 10:02:14.5157|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: :tmi.twitch.tv 003 morpeko_bot :This server is rather new 2023-12-21 10:02:14.5157|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: :tmi.twitch.tv 004 morpeko_bot :- 2023-12-21 10:02:14.5157|INFO|SysBot.Base.LogUtil|[morpeko_bot] - Connected as morpeko_bot 2023-12-21 10:02:14.5157|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: :tmi.twitch.tv 375 morpeko_bot :- 2023-12-21 10:02:14.5157|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: :tmi.twitch.tv 372 morpeko_bot :You are in a maze of twisty passages, all alike. 2023-12-21 10:02:14.5157|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: :tmi.twitch.tv 376 morpeko_bot :> 2023-12-21 10:02:14.5848|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: :tmi.twitch.tv CAP ACK :twitch.tv/membership 2023-12-21 10:02:14.6347|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: :tmi.twitch.tv CAP ACK :twitch.tv/commands 2023-12-21 10:02:14.6870|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: :tmi.twitch.tv CAP * ACK :twitch.tv/tags 2023-12-21 10:02:14.7679|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: :morpeko_bot!morpeko_bot@morpeko_bot.tmi.twitch.tv JOIN #xtheredshirtx 2023-12-21 10:02:14.7679|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: :morpeko_bot.tmi.twitch.tv 353 morpeko_bot = #xtheredshirtx :morpeko_bot 2023-12-21 10:02:14.7679|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: :morpeko_bot.tmi.twitch.tv 366 morpeko_bot #xtheredshirtx :End of /NAMES list 2023-12-21 10:02:14.7679|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Finished channel joining queue. 2023-12-21 10:02:14.7679|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: @badge-info=subscriber/13;badges=moderator/1,subscriber/12;color=;display-name=morpeko_bot;emote-sets=0,300725393,302012827,304027143,349607735,371425007,445748491,445950856,537206155,564265402,592920959,610186276,015635c3-289f-4658-bfb8-7f428819ddcf,4f26e10e-db86-4fba-9796-97e3e95fdd97,4f26e10e-db86-4fba-9796-97e3e95fdd97,736457dd-1114-4f35-b768-0eeccbeecd30;mod=1;subscriber=1;user-type=mod :tmi.twitch.tv USERSTATE #xtheredshirtx 2023-12-21 10:02:14.7679|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Received: @emote-only=0;followers-only=-1;r9k=0;room-id=110059306;slow=0;subs-only=0 :tmi.twitch.tv ROOMSTATE #xtheredshirtx 2023-12-21 10:02:14.7679|INFO|SysBot.Base.LogUtil|morpeko_bot Joined xtheredshirtx 2023-12-21 10:02:15.3253|INFO|SysBot.Base.LogUtil|[morpeko_bot] -[morpeko_bot] Finished channel joining queue.

Lusamine commented 8 months ago

I believe my latest commit fixes the logging issue with the single-file publish.

I similarly get a hang but it is when a connection fails and throws an exception. We're currently looking into this problem.

xtheredshirtx commented 8 months ago

Thanks. Let me know if I need to provide you anything else.

Lusamine commented 8 months ago

https://github.com/kwsch/SysBot.NET/commit/9374e32f5532d34730c03177aeb615fd4efebad1 should fix the issue.