JustArchiNET / ArchiSteamFarm

C# application with primary purpose of farming Steam cards from multiple accounts simultaneously.
Apache License 2.0
11.09k stars 1.04k forks source link

ArchiSteamFarm@.service prevents successful connections #3014

Closed Gilrain closed 11 months ago

Gilrain commented 11 months ago

Checklist

ASF version

Latest pre-release

ASF variant

linux-x64

Bug description

After upgrading to 5.4.10.2, ArchiSteamFarm@.service can no longer connect to api.steampowered.com and gets into an infinite login loop. Manually starting ArchiSteamFarm.dll works as expected.

Expected behavior

Successful connections to the steam accounts using the service file.

Actual behavior

Connections are initiated but never completed due to a System.Net.Http.HttpRequestException immediatly followed by a System.Net.Sockets.SocketException

Steps to reproduce

Start asf using with ArchiSteamFarm@.service

Possible reason/solution

Adding AF_UNIX to the RestrictAddressFamilies in the service file solves the problem and logins can complete. This allow asf to use unix sockets which appear to be needed as of 5.4.10.

Can you help us with this bug report?

Yes, I can code the solution myself and send a pull request

Full log.txt recorded during reproducing the problem

2023-09-26 16:01:43|dotnet-77147|INFO|ASF|InitCore() ArchiSteamFarm-custom V5.4.10.2 (source/9c7066b5-9a48-47f1-b3a6-01035f32d1a5 | .NET 7.0.11; arch-x64; Linux 6.5.4-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 21 Sep 2023 11:06:39 +0000)
2023-09-26 16:01:43|dotnet-77147|INFO|ASF|InitCore() Copyright © 2015-2023 JustArchiNET
2023-09-26 16:01:44|dotnet-77147|INFO|ASF|Start() Starting IPC server...
2023-09-26 16:01:44|dotnet-77147|INFO|Microsoft.Hosting.Lifetime|Now listening on: http://[::1]:1242
2023-09-26 16:01:44|dotnet-77147|INFO|Microsoft.Hosting.Lifetime|Application started. Press Ctrl+C to shut down.
2023-09-26 16:01:44|dotnet-77147|INFO|Microsoft.Hosting.Lifetime|Hosting environment: Production
2023-09-26 16:01:44|dotnet-77147|INFO|Microsoft.Hosting.Lifetime|Content root path: /usr/lib/asf/
2023-09-26 16:01:44|dotnet-77147|INFO|ASF|Start() IPC server ready!
2023-09-26 16:01:44|dotnet-77147|INFO|bot1|Start() Starting...
2023-09-26 16:01:44|dotnet-77147|INFO|bot2|Start() Starting...
2023-09-26 16:01:44|dotnet-77147|INFO|bot1|Connect() Connecting...
2023-09-26 16:01:44|dotnet-77147|INFO|bot1|OnConnected() Connected to Steam!
2023-09-26 16:01:44|dotnet-77147|INFO|bot1|OnConnected() Logging in...
2023-09-26 16:01:45|dotnet-77147|INFO|bot1|OnLoggedOn() Successfully logged on as bot1_steamid.
2023-09-26 16:01:45|dotnet-77147|INFO|bot1|Init() Logging in to ISteamUserAuth...
2023-09-26 16:01:50|dotnet-77147|INFO|bot1|IsAnythingToFarm() Checking first badge page...
2023-09-26 16:01:51|dotnet-77147|WARN|bot1|Init() System.Net.Http.HttpRequestException: Resource temporarily unavailable (api.steampowered.com:443)
 ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
   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.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at SteamKit2.WebAPI.AsyncInterface.CallAsyncInternal(HttpMethod method, String func, Int32 version, Dictionary`2 args, String expectedFormat)
   at SteamKit2.WebAPI.AsyncInterface.CallAsync(HttpMethod method, String func, Int32 version, Dictionary`2 args)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.<>c__DisplayClass76_0.<<Init>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.WebLimitRequest[T](Uri service, Func`1 function)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.Init(UInt64 steamID, EUniverse universe, String webAPIUserNonce, String parentalCode)
2023-09-26 16:01:51|dotnet-77147|INFO|bot1|Init() Logging in to ISteamUserAuth...
2023-09-26 16:01:54|dotnet-77147|INFO|bot2|Connect() Connecting...
2023-09-26 16:01:54|dotnet-77147|INFO|bot2|OnConnected() Connected to Steam!
2023-09-26 16:01:54|dotnet-77147|INFO|bot2|OnConnected() Logging in...
2023-09-26 16:01:55|dotnet-77147|INFO|bot2|OnLoggedOn() Successfully logged on as bot2_steamid.
2023-09-26 16:01:55|dotnet-77147|INFO|bot2|Init() Logging in to ISteamUserAuth...
2023-09-26 16:01:57|dotnet-77147|WARN|bot1|Init() System.Net.Http.HttpRequestException: Resource temporarily unavailable (api.steampowered.com:443)
 ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
   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.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at SteamKit2.WebAPI.AsyncInterface.CallAsyncInternal(HttpMethod method, String func, Int32 version, Dictionary`2 args, String expectedFormat)
   at SteamKit2.WebAPI.AsyncInterface.CallAsync(HttpMethod method, String func, Int32 version, Dictionary`2 args)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.<>c__DisplayClass76_0.<<Init>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.WebLimitRequest[T](Uri service, Func`1 function)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.Init(UInt64 steamID, EUniverse universe, String webAPIUserNonce, String parentalCode)
2023-09-26 16:02:00|dotnet-77147|INFO|bot2|IsAnythingToFarm() Checking first badge page...
2023-09-26 16:02:03|dotnet-77147|WARN|bot2|Init() System.Net.Http.HttpRequestException: Resource temporarily unavailable (api.steampowered.com:443)
 ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
   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.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at SteamKit2.WebAPI.AsyncInterface.CallAsyncInternal(HttpMethod method, String func, Int32 version, Dictionary`2 args, String expectedFormat)
   at SteamKit2.WebAPI.AsyncInterface.CallAsync(HttpMethod method, String func, Int32 version, Dictionary`2 args)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.<>c__DisplayClass76_0.<<Init>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.WebLimitRequest[T](Uri service, Func`1 function)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.Init(UInt64 steamID, EUniverse universe, String webAPIUserNonce, String parentalCode)
2023-09-26 16:02:04|dotnet-77147|INFO|bot2|Init() Logging in to ISteamUserAuth...
2023-09-26 16:02:04|dotnet-77147|INFO|bot1|Connect() Connecting...
2023-09-26 16:02:04|dotnet-77147|INFO|bot1|OnDisconnected() Disconnected from Steam!
2023-09-26 16:02:04|dotnet-77147|INFO|bot1|OnConnected() Connected to Steam!
2023-09-26 16:02:04|dotnet-77147|INFO|bot1|OnConnected() Logging in...
2023-09-26 16:02:05|dotnet-77147|INFO|bot1|OnLoggedOn() Successfully logged on as bot1_steamid.
2023-09-26 16:02:05|dotnet-77147|INFO|bot1|Init() Logging in to ISteamUserAuth...
2023-09-26 16:02:10|dotnet-77147|WARN|bot2|Init() System.Net.Http.HttpRequestException: Resource temporarily unavailable (api.steampowered.com:443)
 ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
   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.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at SteamKit2.WebAPI.AsyncInterface.CallAsyncInternal(HttpMethod method, String func, Int32 version, Dictionary`2 args, String expectedFormat)
   at SteamKit2.WebAPI.AsyncInterface.CallAsync(HttpMethod method, String func, Int32 version, Dictionary`2 args)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.<>c__DisplayClass76_0.<<Init>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.WebLimitRequest[T](Uri service, Func`1 function)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.Init(UInt64 steamID, EUniverse universe, String webAPIUserNonce, String parentalCode)
2023-09-26 16:02:14|dotnet-77147|INFO|bot2|Connect() Connecting...
2023-09-26 16:02:14|dotnet-77147|INFO|bot2|OnDisconnected() Disconnected from Steam!
2023-09-26 16:02:14|dotnet-77147|INFO|bot2|OnConnected() Connected to Steam!
2023-09-26 16:02:14|dotnet-77147|INFO|bot2|OnConnected() Logging in...
2023-09-26 16:02:15|dotnet-77147|INFO|bot2|OnLoggedOn() Successfully logged on as bot2_steamid.
2023-09-26 16:02:15|dotnet-77147|INFO|bot2|Init() Logging in to ISteamUserAuth...
2023-09-26 16:02:16|dotnet-77147|WARN|bot1|Init() System.Net.Http.HttpRequestException: Resource temporarily unavailable (api.steampowered.com:443)
 ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
   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.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at SteamKit2.WebAPI.AsyncInterface.CallAsyncInternal(HttpMethod method, String func, Int32 version, Dictionary`2 args, String expectedFormat)
   at SteamKit2.WebAPI.AsyncInterface.CallAsync(HttpMethod method, String func, Int32 version, Dictionary`2 args)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.<>c__DisplayClass76_0.<<Init>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.WebLimitRequest[T](Uri service, Func`1 function)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.Init(UInt64 steamID, EUniverse universe, String webAPIUserNonce, String parentalCode)
2023-09-26 16:02:16|dotnet-77147|INFO|bot1|Init() Logging in to ISteamUserAuth...
2023-09-26 16:02:22|dotnet-77147|WARN|bot2|Init() System.Net.Http.HttpRequestException: Resource temporarily unavailable (api.steampowered.com:443)
 ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
   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.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at SteamKit2.WebAPI.AsyncInterface.CallAsyncInternal(HttpMethod method, String func, Int32 version, Dictionary`2 args, String expectedFormat)
   at SteamKit2.WebAPI.AsyncInterface.CallAsync(HttpMethod method, String func, Int32 version, Dictionary`2 args)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.<>c__DisplayClass76_0.<<Init>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.WebLimitRequest[T](Uri service, Func`1 function)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.Init(UInt64 steamID, EUniverse universe, String webAPIUserNonce, String parentalCode)
2023-09-26 16:02:22|dotnet-77147|INFO|bot2|Init() Logging in to ISteamUserAuth...
2023-09-26 16:02:28|dotnet-77147|WARN|bot1|Init() System.Net.Http.HttpRequestException: Resource temporarily unavailable (api.steampowered.com:443)
 ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
   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.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at SteamKit2.WebAPI.AsyncInterface.CallAsyncInternal(HttpMethod method, String func, Int32 version, Dictionary`2 args, String expectedFormat)
   at SteamKit2.WebAPI.AsyncInterface.CallAsync(HttpMethod method, String func, Int32 version, Dictionary`2 args)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.<>c__DisplayClass76_0.<<Init>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.WebLimitRequest[T](Uri service, Func`1 function)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.Init(UInt64 steamID, EUniverse universe, String webAPIUserNonce, String parentalCode)
2023-09-26 16:02:28|dotnet-77147|INFO|bot1|Connect() Connecting...
2023-09-26 16:02:28|dotnet-77147|INFO|bot1|OnDisconnected() Disconnected from Steam!
2023-09-26 16:02:28|dotnet-77147|INFO|bot1|OnConnected() Connected to Steam!
2023-09-26 16:02:28|dotnet-77147|INFO|bot1|OnConnected() Logging in...
2023-09-26 16:02:29|dotnet-77147|INFO|bot1|OnLoggedOn() Successfully logged on as bot1_steamid.
2023-09-26 16:02:29|dotnet-77147|INFO|bot1|Init() Logging in to ISteamUserAuth...
2023-09-26 16:02:34|dotnet-77147|WARN|bot2|Init() System.Net.Http.HttpRequestException: Resource temporarily unavailable (api.steampowered.com:443)
 ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
   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.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at SteamKit2.WebAPI.AsyncInterface.CallAsyncInternal(HttpMethod method, String func, Int32 version, Dictionary`2 args, String expectedFormat)
   at SteamKit2.WebAPI.AsyncInterface.CallAsync(HttpMethod method, String func, Int32 version, Dictionary`2 args)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.<>c__DisplayClass76_0.<<Init>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.WebLimitRequest[T](Uri service, Func`1 function)
   at ArchiSteamFarm.Steam.Integration.ArchiWebHandler.Init(UInt64 steamID, EUniverse universe, String webAPIUserNonce, String parentalCode)
2023-09-26 16:02:38|dotnet-77147|INFO|bot2|Connect() Connecting...
2023-09-26 16:02:38|dotnet-77147|INFO|bot2|OnDisconnected() Disconnected from Steam!
[…]

Global ASF.json config file

No response

BotName.json config of all affected bot instances

No response

Additional info

No response

JustArchi commented 11 months ago

I can't reproduce this on my Debian with systemd 254.1. Everything works like before with the service file.

Can you check if adding AF_NETLINK instead of AF_UNIX works for you? This will be required starting from .NET 8, perhaps it'll also fix the issue "by the way" for you @Gilrain

JustArchi commented 11 months ago

https://github.com/JustArchiNET/ArchiSteamFarm/pull/3005/commits/3f43ea320236105fb775368d47bd702af4a5ddec

JustArchi commented 11 months ago

BTW I also had some login issues today, but unrelated to this, I'm wondering if this isn't purely a coincidence from Steam side. Please check if AF_NETLINK instead of AF_UNIX works for you, and then if removing both still causes the problems, systemd is pretty unified so I'd expect my debian to suffer from the same issue if that was something global.

Abrynos commented 11 months ago

Just chiming in to tell you I was unable to reproduce it either.

Gilrain commented 11 months ago

AF_NETLINK throws the same exceptions. Steam would be pretty selective since logins never failed when manually launching the binary. Must be specific to either systemd 254.4 or arch. If no one can reproduce this, I'll just patch the aur/asf package.

JustArchi commented 11 months ago

I don't buy it, distro patches shouldn't be required to run ASF and ASF should come with the default setting that "just works" for majority if not all of the people, and eventual stuff that I'd disagree with would be only if arch did something completely different than every other distro and cost of supporting it would be unrealistically high compared to everybody else.

Since those are security options, and you found out at least one situation where our security settings are too closed, I'm going to relax it since there is no reason for our security settings to break some valid and popular setup. I'll add a fix myself :+1:

JustArchi commented 11 months ago

Done, systemd unit which comes with 5.4.10.3 should no longer cause you issues as it includes AF_UNIX, and I also added AF_NETLINK while doing that.

Naturally it'll be needed to reload systemd for changes to happen, so users after upgrade are advised to either reboot the machine, or systemctl daemon-reload && systemctl restart 'ArchiSteamFarm@*'. That's required only if the above problem affects your setup, since otherwise nothing changes for majority of people.

Gilrain commented 11 months ago

Thank you for being so open minded. Keep up the good work.