SwarmUI icon indicating copy to clipboard operation
SwarmUI copied to clipboard

Error handling API request error...

Open mondermurshed opened this issue 1 year ago • 3 comments

Your question

After running "launch-windows.bat" file and after pressing the "Yes, i'm sure (install now)" button from the Swarm UI installer, i got this annoying error "

[Error] [WebAPI] Error handling API request '/API/InstallConfirmWS': Internal exception: System.OperationCanceledException: The operation was canceled. at System.Threading.CancellationToken.ThrowOperationCanceledException() at System.Threading.CancellationToken.ThrowIfCancellationRequested() at System.IO.Pipelines.Pipe.GetReadAsyncResult() at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1UpgradeMessageBody.ReadAsyncInternalAwaited(ValueTask1 readTask, CancellationToken cancellationToken) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.ReadAsyncInternal(Memory1 destination, CancellationToken cancellationToken) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.IO.Stream.ReadAtLeastAsyncCore(Memory1 buffer, Int32 minimumBytes, Boolean throwOnEndOfStream, CancellationToken cancellationToken) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token) at System.Net.WebSockets.ManagedWebSocket.EnsureBufferContainsAsync(Int32 minimumRequiredBytes, CancellationToken cancellationToken) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TResult](Memory1 payloadBuffer, CancellationToken cancellationToken) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Threading.Tasks.ValueTask`1.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state) --- End of stack trace from previous location --- at SwarmUI.Utils.Utilities.ReceiveData(WebSocket socket, Int32 maxBytes, CancellationToken limit) in G:\SwarmUI\src\Utils\Utilities.cs:line 290 at SwarmUI.Utils.Utilities.ReceiveData(WebSocket socket, TimeSpan maxDuration, Int32 maxBytes) in G:\SwarmUI\src\Utils\Utilities.cs:line 305 at SwarmUI.Utils.Utilities.ReceiveJson(WebSocket socket, TimeSpan maxDuration, Int32 maxBytes, Boolean nullOnEmpty) in G:\SwarmUI\src\Utils\Utilities.cs:line 322 at SwarmUI.WebAPI.API.HandleAsyncRequest(HttpContext context) in G:\SwarmUI\src\WebAPI\API.cs:line 53 21:22:01.322 [Error] [WebAPI] Error handling API request '/API/InstallConfirmWS': Internal exception while handling prior exception closure: System.Net.WebSockets.WebSocketException (0x80004005): The WebSocket is in an invalid state ('Aborted') for this operation. Valid states are: 'Open, CloseReceived, CloseSent' at System.Net.WebSockets.WebSocketValidate.ThrowIfInvalidState(WebSocketState currentState, Boolean isDisposed, WebSocketState[] validStates) at System.Net.WebSockets.ManagedWebSocket.CloseAsync(WebSocketCloseStatus closeStatus, String statusDescription, CancellationToken cancellationToken) --- End of stack trace from previous location --- at SwarmUI.WebAPI.API.HandleAsyncRequest(HttpContext context) in G:\SwarmUI\src\WebAPI\API.cs:line 165"

What should i do ??? please help.

Logs

No response

Other

No response

mondermurshed avatar Jun 07 '25 18:06 mondermurshed

This looks like it may be a browser issue? Your browser failed to properly open a websocket to the server. What browser are you using?

mcmonkey4eva avatar Jun 07 '25 18:06 mcmonkey4eva

Yes, it was a browser issue. I was using Mozilla Firefox. Thank you so much for your support!!

mondermurshed avatar Jun 07 '25 20:06 mondermurshed

ftr Firefox in general should work, so check if an extension or something was the cause

mcmonkey4eva avatar Jun 07 '25 21:06 mcmonkey4eva