BeyondDimension / BeyondDimension/SteamTools

🐛[BUG] 如果asf的IPC服务启动失败那么会导致无法新增bot

Open
#1,182 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
26.8k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### 🐛 描述(Description)

asf控制台提示无法启动IPC服务,而steam++新增bot需要打开IPC成功启动

### 📷 复现步骤(Steps to Reproduce)

1、转到自动挂卡
2、开启ASF
3、ASF控制台在“正在启动 IPC 服务……”后报错
4、steam++认为web控制台未启动,提示“请等待IPC启动中”,无法新增bot

### 📄 [异常/日志]信息([Exception/Log] Information)

ASF控制台从启动到结束的所有日志:
2022-03-29 10:19:41|Steam++-13932|INFO|ASF|RegisterBots() 正在初始化 SteamDirectory……
2022-03-29 10:19:49|Steam++-13932|INFO|ASF|RegisterBots() 成功!
2022-03-29 10:19:49|Steam++-13932|WARN|ASF|RegisterBots() 没有配置任何机器人,您是否忘记配置 ASF 了?如果您不明白发生了什么,请阅读 Wiki 上的“安装指南”。
2022-03-29 10:48:26|Steam++-13932|INFO|ASF|ExecuteCommand() 。。
2022-03-29 10:48:26|Steam++-13932|WARN|ASF|ExecuteCommand() 没有配置任何机器人,您是否忘记配置 ASF 了?如果您不明白发生了什么,请阅读 Wiki 上的“安装指南”。
2022-03-29 11:43:16|Steam++-13932|FATAL|ASF|OnUnobservedTaskException() System.Net.Sockets.SocketException (995): 由于线程退出或应用程序请求,已中止 I/O 操作。
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Threading.Tasks.ValueTask.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)
2022-03-29 15:37:00|Steam++-13932|INFO|ASF|Start() 正在启动 IPC 服务……
2022-03-29 15:37:06|Steam++-13932|ERROR|ASF|Start() System.IO.IOException: Failed to bind to address http://localhost:6242.
---> System.AggregateException: One or more errors occurred. (以一种访问权限不允许的方式做了一个访问套接字的尝试。) (以一种访问权限不允许的方式做了一个访问套接字的尝试。)
---> System.Net.Sockets.SocketException (10013): 以一种访问权限不允许的方式做了一个访问套接字的尝试。
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass30_0`1.<g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
---> (Inner Exception #1) System.Net.Sockets.SocketException (10013): 以一种访问权限不允许的方式做了一个访问套接字的尝试。
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass30_0`1.<g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)<---

--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable`1 listenOptions, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at ArchiSteamFarm.IPC.ArchiKestrel.Start()
2022-03-29 15:37:07|Steam++-13932|INFO|ASF|RegisterBots() 正在初始化 SteamDirectory……
2022-03-29 15:37:11|Steam++-13932|INFO|ASF|RegisterBots() 成功!
2022-03-29 15:37:11|Steam++-13932|WARN|ASF|RegisterBots() 没有配置任何机器人,您是否忘记配置 ASF

### 🚑 基本信息(Basic Information)

- 程序版本(Program Version): 2.6.4
- 系统版本号(OS Version): Windows 10.19043.1586
- 是否为应用商店版本(Whether it is a Store version): 是

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the ArchiSteamFarm.IPC.ArchiKestrel.Start() stack-trace entry point and trace how the IPC service state is exposed to Steam++'s bot-creation flow. Reproduce the bind failure on Windows 10 with the reported version and verify that bot creation no longer remains blocked when IPC startup fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.