HughJeffner / FFRK-LabMem

Highly customizable FFRK Labyrinth Bot
MIT License
10 stars 4 forks source link

LabMem Crashes Upon Starting FFRK with Nox Since Maintenance/FFRK Update #209

Closed ddambro closed 2 years ago

ddambro commented 2 years ago

This started happening after maintenance/the latest app update (8.4.5); It was working fine the night before. Reverting FFRK to 8.2.0 didn't help neither did reconfiguring the proxy. I can start LabMem fine, but as soon as I open FFRK or get to a screen where LabMem would want to do something I get the following exceptions:

11:49:00 FFRK-LabMem v7.7.2-beta
11:49:00 Checking for newer releases...
11:49:03 Starting proxy server on 192.168.1.94:8081 https:True
11:49:03 Setting up Lab with config: .\Config\lab.full.json
11:49:03 Connected to shamu (star2ltexx SM_G965N)
11:49:03 Device available: 127.0.0.1:62027
11:49:03 Device changed: Online:127.0.0.1:62027
11:49:03 Detecting proxy settings...
11:49:05 Proxy settings OK (trouble loading?, try changing port)
11:49:05 Setting up frame capture
11:49:09 Could not verify minicap install, switching to ADB frame capture
11:49:09 Setting up input
11:49:09 Enabled Lab
11:49:09 Trying to auto-start
Press 'D' to Disable, 'E' to Enable, 'C' for Config, 'S' for Stats, 'Ctrl+X' to Exit
Type ? for help
11:49:12 Could not auto-start
11:49:12 SharpAdbClient.Exceptions.ShellCommandUnresponsiveException: The shell command has become unresponsive ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at SharpAdbClient.Logs.ShellStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.Stream.<>c.<BeginReadInternal>b__39_0(Object <p0>)
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.IO.Stream.EndRead(IAsyncResult asyncResult)
   at System.IO.Stream.<>c.<BeginEndReadAsync>b__43_1(Stream stream, IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.IO.StreamReader.<ReadBufferAsync>d__97.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.IO.StreamReader.<ReadLineAsyncInternal>d__60.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at SharpAdbClient.AdbClient.<ExecuteRemoteCommandAsync>d__35.MoveNext()
   --- End of inner exception stack trace ---
   at SharpAdbClient.AdbClient.<ExecuteRemoteCommandAsync>d__35.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FFRK_Machines.Services.Adb.CaptureManager.<<Setup>b__8_0>d.MoveNext() in C:\usr\hughjeffner\FFRK-LabMem\FFRK-Machines\Services\Adb\CaptureManager.cs:line 73
11:49:12 Minicap service has shut down, please restart the bot to recover.
11:49:12 SharpAdbClient.Exceptions.ShellCommandUnresponsiveException: The shell command has become unresponsive ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at SharpAdbClient.Logs.ShellStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.Stream.<>c.<BeginReadInternal>b__39_0(Object <p0>)
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.IO.Stream.EndRead(IAsyncResult asyncResult)
   at System.IO.Stream.<>c.<BeginEndReadAsync>b__43_1(Stream stream, IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.IO.StreamReader.<ReadBufferAsync>d__97.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.IO.StreamReader.<ReadLineAsyncInternal>d__60.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at SharpAdbClient.AdbClient.<ExecuteRemoteCommandAsync>d__35.MoveNext()
   --- End of inner exception stack trace ---
   at SharpAdbClient.AdbClient.<ExecuteRemoteCommandAsync>d__35.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FFRK_Machines.Services.Adb.InputManager.<<Setup>b__9_0>d.MoveNext() in C:\usr\hughjeffner\FFRK-LabMem\FFRK-Machines\Services\Adb\InputManager.cs:line 73
11:49:12 Minitouch service has shut down, please restart the bot to recover.
11:49:15 Device unavailable: 127.0.0.1:62027
11:49:15 Disabled Lab

I don't have any other emulators set up at the moment to test, but that's probably my next debugging step.

HughJeffner commented 2 years ago

Take a look at this: https://github.com/HughJeffner/FFRK-LabMem/wiki/Common-Issues-FAQ#adb-connects-normally-when-the-bot-loads-but-suddenly-disconnects

I think it's a mismatch between the adb.exe version the bot uses and the one bundled with Nox

ddambro commented 2 years ago

That did the trick! I didn't put 2 and 2 together about ADB being the issue here and the timing coinciding with the app update probably further confused things, but it makes perfect sense in retrospect. Thanks for the quick response!

HughJeffner commented 2 years ago

No problem.

Unfortunately, for now, you will have to repeat this process every time you update the bot as the installer will overwrite adb.exe. I suppose if you update Nox it could cause this as well.

ddambro commented 2 years ago

The Nox version is actually behind the LabMem version, but there's a newer release of Nox available so I'll try updating to see if that aligns them (once I burn down some stamina!).