Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect default value for ShutdownIfPossible #3210

Closed
8 tasks done
xx55tt opened this issue May 31, 2024 · 2 comments
Closed
8 tasks done

Incorrect default value for ShutdownIfPossible #3210

xx55tt opened this issue May 31, 2024 · 2 comments
Labels
🐛 Bug Issues marked with this label indicate unintended program behaviour that needs correction. ✔️ Confirmed Issues marked with this label were acknowledged and confirmed by the developers. 🟡 Medium priority Issues marked with this label have a priority, unless there is something even more important.

Comments

@xx55tt
Copy link

xx55tt commented May 31, 2024

Checklist

ASF version

Latest stable release

ASF variant

generic (with latest .NET runtime)

Bug description

When using ASF without setting the ShutdownIfPossible option in the global config file, it shuts down after all bots have been stopped.

Expected behavior

ASF keeps running after stopping all bots, as described in the changelog.

Actual behavior

ASF shuts down.

Steps to reproduce

  1. Do not set the ShutdownIfPossible option in the global config file
  2. Stop all bots
  3. ASF shuts down

Possible reason/solution

The default value of the ShutdownIfPossible option is true instead of false, contradicting the wiki.

Can you help us with this bug report?

No, I don't have time, skills or willings for any of that

Full log.txt recorded during reproducing the problem

2024-05-31 20:04:54|dotnet-33853|INFO|ASF|InitCore() ArchiSteamFarm V6.0.2.6 (generic/1404ce0eae88451988ae6a5727eb0ce1 | .NET 8.0.5; arch-x64; Arch Linux) in [/home/***/.config/asf]
2024-05-31 20:04:54|dotnet-33853|INFO|ASF|InitCore() Copyright © 2015-2024 JustArchiNET
2024-05-31 20:04:54|dotnet-33853|INFO|ASF|InitPlugins() Initializing Plugins...
2024-05-31 20:04:54|dotnet-33853|INFO|ASF|InitPlugins() Loading MobileAuthenticatorPlugin V6.0.2.6...
2024-05-31 20:04:54|dotnet-33853|INFO|ASF|InitPlugins() MobileAuthenticatorPlugin has been loaded successfully!
2024-05-31 20:04:54|dotnet-33853|INFO|ASF|InitPlugins() Loading ItemsMatcherPlugin V6.0.2.6...
2024-05-31 20:04:54|dotnet-33853|INFO|ASF|InitPlugins() ItemsMatcherPlugin has been loaded successfully!
2024-05-31 20:04:54|dotnet-33853|INFO|ASF|InitPlugins() Loading SteamTokenDumperPlugin V6.0.2.6...
2024-05-31 20:04:54|dotnet-33853|INFO|ASF|InitPlugins() SteamTokenDumperPlugin has been loaded successfully!
2024-05-31 20:04:54|dotnet-33853|INFO|ASF|Load() Loading STD global cache...
2024-05-31 20:04:54|dotnet-33853|INFO|ASF|Load() Validating STD global cache integrity...
2024-05-31 20:04:54|dotnet-33853|INFO|ASF|OnASFInit() SteamTokenDumperPlugin is currently disabled according to your configuration. If you'd like to help SteamDB in data submission, please check out our wiki.
2024-05-31 20:04:54|dotnet-33853|INFO|ASF|Start() Starting IPC server...
2024-05-31 20:04:55|dotnet-33853|INFO|Microsoft.Hosting.Lifetime|Now listening on: http://127.0.0.1:27384
2024-05-31 20:04:55|dotnet-33853|INFO|Microsoft.Hosting.Lifetime|Now listening on: http://[::1]:27384
2024-05-31 20:04:55|dotnet-33853|INFO|Microsoft.Hosting.Lifetime|Application started. Press Ctrl+C to shut down.
2024-05-31 20:04:55|dotnet-33853|INFO|Microsoft.Hosting.Lifetime|Hosting environment: Production
2024-05-31 20:04:55|dotnet-33853|INFO|Microsoft.Hosting.Lifetime|Content root path: /usr/lib/asf/
2024-05-31 20:04:55|dotnet-33853|INFO|ASF|Start() IPC server ready!
2024-05-31 20:04:55|dotnet-33853|WARN|***|InitStart() Not starting this bot instance because it's disabled in config file!
2024-05-31 20:04:58|dotnet-33853|INFO|***|Start() Starting...
2024-05-31 20:04:58|dotnet-33853|INFO|***|Connect() Connecting...
2024-05-31 20:04:59|dotnet-33853|INFO|***|OnConnected() Connected to Steam!
2024-05-31 20:04:59|dotnet-33853|INFO|***|OnConnected() Logging in...
2024-05-31 20:04:59|dotnet-33853|INFO|***|OnLoggedOn() Successfully logged on as ***/***.
2024-05-31 20:04:59|dotnet-33853|INFO|***|Init() Success!
2024-05-31 20:05:00|dotnet-33853|INFO|***|IsAnythingToFarm() Checking first badge page...
2024-05-31 20:05:02|dotnet-33853|INFO|***|StartFarming() We don't have anything to farm on this account!
2024-05-31 20:05:03|dotnet-33853|INFO|***|Stop() Stopping...
2024-05-31 20:05:03|dotnet-33853|INFO|ASF|OnBotShutdown() No bots are running, exiting...
2024-05-31 20:05:03|dotnet-33853|INFO|***|OnDisconnected() Disconnected from Steam!
2024-05-31 20:05:08|dotnet-33853|INFO|Microsoft.Hosting.Lifetime|Application is shutting down...

Global ASF.json config file

{
  "AutoRestart": false,
  "CurrentCulture": "en",
  "SteamOwnerID": ***,
  "UpdateChannel": 0
}

BotName.json config of all affected bot instances

No response

Additional info

No response

@xx55tt xx55tt added 🐛 Bug Issues marked with this label indicate unintended program behaviour that needs correction. 👀 Evaluation Issues marked with this label are currently being evaluated if they're going to be considered. labels May 31, 2024
@JustArchi JustArchi added ✔️ Confirmed Issues marked with this label were acknowledged and confirmed by the developers. 🟡 Medium priority Issues marked with this label have a priority, unless there is something even more important. and removed 👀 Evaluation Issues marked with this label are currently being evaluated if they're going to be considered. labels May 31, 2024
@JustArchi
Copy link
Member

JustArchi commented May 31, 2024

Thanks for report! The default value was (by a mistake, like you spotted) set to true, I've just corrected that - fixed since V6.0.3.4 🏆

@JustArchi
Copy link
Member

JustArchi commented May 31, 2024

As a workaround, you can manually set "ShutdownIfPossible": false in the global ASF config before the next release, since the functionality works properly, just the default value is not what it should be. V6.0.3.4 will automatically remove it (if you have config auto-migrate enabled).

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2024
chen8945 pushed a commit to Ckid-Home/ArchiSteamFarm that referenced this issue Jul 31, 2024
* Make some inventory description properties public

* CI: Switch to using environment variables

* CI: Run qodana in different environment

* CI: Run first part of publish in test environment

* Monitoring: Bump OpenTelemetry dependencies, since the upstream issue is fixed

* Automatic translations update

* Update github/codeql-action action to v3.25.6

* Update swashbuckle-aspnetcore monorepo to v6.6.2

* Update dependency MSTest to v3.4.0

* Update ASF-ui digest to 63254c3

* CI: Divide environments further

* Bump

* Update ASF-ui digest to b1521b7

* Update ASF-ui digest to 491227c

* Update donation options

* Update ASF-ui digest to 8e361ae

* Automatic translations update

* Update dependency MSTest to v3.4.1

* Update dependency Microsoft.IdentityModel.JsonWebTokens to v7.6.0

* Update docker/login-action action to v3.2.0

* Monitor incoming trades (JustArchiNET#3201)

* Monitor incoming trades

* Apply feedback

* Misc.

* Misc

* Downgrade prometheus exporter again

* Add initial support for build attestations

* Fix observable counters

* Bump

* Update crowdin/github-action action to v2 (JustArchiNET#3209)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* CI: Misc

* CI: Misc

* Update ASF-ui digest to a72c668

* Update dependency MSTest to v3.4.2

* Update dependency MSTest to v3.4.3

* Update ASF-ui digest to 605cbf7

* Update ASF-ui digest to 7818887

* Update github/codeql-action action to v3.25.7

* Closes JustArchiNET#3210

* Bump

* Make ASF compatible with global invariant mode

Requires Humanizer update

* Use native Rfc2898DeriveBytes for Pbkdf2 instead of CryptSharp implementation

I've verified it generates the same results

* Bump

* Automatic translations update

* Update wiki digest to f05654b

* Update actions/attest-build-provenance action to v1.2.0

* Automatic translations update

* Update github/codeql-action action to v3.25.8

* Automatic translations update

* Update ASF-ui digest to 1e68294

* Automatic translations update

* Update dependency Humanizer to v3.0.0-beta.54

* Update ASF-ui digest to c5a2ac4

* Misc

Paused could be flipped in the meantime between starting the background check and finishing it, we can check it again after having games to farm.

* Bump

* Automatic translations update

* CI: Fix failure when in PR mode

* Update docker/build-push-action action to v5.4.0

* Automatic translations update

* Make PICS changes happen a bit more often

* Update ASF-ui digest to 185cc47

* Automatic translations update

* Update ASF-ui digest to 7efd77d

* Update actions/checkout action to v4.1.7

* Update github/codeql-action action to v3.25.9

* Update ASF-ui digest to 51952a3

* Update github/codeql-action action to v3.25.10

* Update actions/attest-build-provenance action to v1.3.1

* Update dependency OpenTelemetry.Extensions.Hosting to v1.9.0

* Update renovate.json5

* Automatic translations update

* Closes JustArchiNET#3221

* Update IBotTradeOffer2.cs

* Bump

* Update docker/build-push-action action to v6 (JustArchiNET#3222)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update actions/attest-build-provenance action to v1.3.2

* Update opentelemetry-dotnet-contrib monorepo to v1.9.0

* Update dependency Microsoft.IdentityModel.JsonWebTokens to v7.6.1

* Update ASF-ui digest to 1c49bcf

* Update dependency OpenTelemetry.Instrumentation.Runtime to v1.9.0

* Update docker/build-push-action action to v6.0.1

* Add support for selected bot groups

* Automatic translations update

* Update ASF-ui digest to 3ae4df4

* Update dependency Microsoft.IdentityModel.JsonWebTokens to v7.6.2

* Bump

* Update docker/build-push-action action to v6.0.2

* chore: blacklist summer sale 2024 appid (JustArchiNET#3226)

refers to https://steamcommunity.com/my/gamecards/2861690

* Bump

* Automatic translations update

* chore(deps): update docker/build-push-action action to v6.1.0

* Automatic translations update

* Automatic translations update

* Resolve selected .NET 9 analyzer warnings

* Move dockerfiles from legacy KV format

https://docs.docker.com/reference/build-checks/legacy-key-value-format/

* Misc

* Automatic translations update

* Add deprecation helper

* Bump

* chore(deps): update docker/build-push-action action to v6.2.0

* chore(deps): update github/codeql-action action to v3.25.11

* Automatic translations update

* chore(deps): update asf-ui digest to 91c39f3

* Automatic translations update

* Automatic translations update

* chore(deps): update asf-ui digest to 6a4b92a

* Automatic translations update

* chore(deps): update docker/build-push-action action to v6.3.0

* chore(deps): update jetbrains/qodana-action action to v2024.1.8

* Remove deprecated functionality, bump

* Automatic translations update

* chore(deps): update docker/setup-buildx-action action to v3.4.0

* chore(deps): update wiki digest to 743294a

* chore(deps): update actions/download-artifact action to v4.1.8

* chore(deps): update actions/upload-artifact action to v4.3.4

* Automatic translations update

* chore(deps): update asf-ui digest to cd60876

* chore(deps): update dependency jetbrains.annotations to v2024 (JustArchiNET#3243)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Automatic translations update

* Update prometheus exporter to fixed version

Apparently all of our issues should be resolved by now

* Bump

* chore(deps): update wiki digest to 469c6c7

* chore(deps): update wiki digest to 7539ff8

* Automatic translations update

* Cleanup main csproj file

* Misc

* Automatic translations update

* chore(deps): update actions/setup-dotnet action to v4.0.1

* Misc

* Update config.yml

* Fix ASF trying to create www folder if it doesn't exist yet

It seems that ASP.NET is trying to create initialized WebRootPath if it doesn't exist yet. This might be unwanted, as user might want to explicitly disable www directory while still having interest in IPC. On top of that, ASF will outright crash if creating such directory will be impossible, e.g. because of insufficient permission.

It makes sense for us to check first if the directory exists - if not, we can omit it entirely, so ASP.NET will default to NullFileProvider and simply respond 404 to everything unhandled from the code perspective.

@SuperSandro2000 will resolve NixOS/nixpkgs#312242 without a need of disabling IPC. In other words, you can use IPC with no www folder attached in order to still have ASF API and /swagger available. ASF will no longer crash in this scenario, it also won't try to create a directory on read-only filesystem.

* Misc

* chore(deps): update asf-ui digest to 29f16e8

* Automatic translations update

* chore(deps): update asf-ui digest to 329c79b

* chore(deps): update actions/attest-build-provenance action to v1.3.3

* Fix struct reordering (JustArchiNET#3247)

* chore(deps): update actions/setup-node action to v4.0.3

* chore(deps): update dependency microsoft.identitymodel.jsonwebtokens to v7.6.3

* Misc optimization

* Automatic translations update

* Misc

* chore(deps): update asf-ui digest to 3aab5a4

* Automatic translations update

* chore(deps): update asf-ui digest to 6df84ff

* chore(deps): update github/codeql-action action to v3.25.12

* chore(deps): update wiki digest to 0b5412c

* Automatic translations update

* Automatic translations update

* Misc

* Monitoring (JustArchiNET#3251)

* Add more plugin metrics

* Update dashboard to account for changed labels in upstream library and new plugin metrics

* Bring back deprecated function

* Bump

* Misc

* chore(deps): update docker/build-push-action action to v6.4.0

* Automatic translations update

* chore(deps): update asf-ui digest to bd5cdf0

* chore(deps): update dependency microsoft.identitymodel.jsonwebtokens to v8 (JustArchiNET#3252)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency mstest to v3.5.0

* chore(deps): update asf-ui digest to a1d6bea

* chore(deps): update docker/build-push-action action to v6.4.1

* chore(deps): update github/codeql-action action to v3.25.13

* Remove ConfigureAwaitChecker.Analyzer

Appropriate detecion is now available in Roslyn

* Misc

* chore(deps): update dependency steamkit2 to v3.0.0-alpha.2

* Misc SK2 improvements

* chore(deps): update docker/build-push-action action to v6.5.0

* chore(deps): update docker/login-action action to v3.3.0

* chore(deps): update docker/setup-buildx-action action to v3.5.0

* chore(deps): update dependency microsoft.identitymodel.jsonwebtokens to v8.0.1

* chore(deps): update crowdin/github-action action to v2.1.0

* Automatic translations update

* chore(deps): update asf-ui digest to 62a5689

* Automatic translations update

* chore(deps): update github/codeql-action action to v3.25.14

* Automatic translations update

* chore(deps): update asf-ui digest to 74f0f71

* Misc fix against case-sensitivity for 2fafinalized

* chore(deps): update crowdin/github-action action to v2.1.1

* chore(deps): update github/codeql-action action to v3.25.15

* Bump

* chore(deps): update asf-ui digest to a138b8c

* chore(deps): update wiki digest to d2c0479

* Automatic translations update

* chore(deps): update asf-ui digest to 07ceace

* chore(deps): update wiki digest to d8213b7

* chore(deps): update docker/setup-buildx-action action to v3.6.1

* Automatic translations update

* chore(deps): update asf-ui digest to 745b067

* chore(deps): update actions/attest-build-provenance action to v1.4.0

* Automatic translations update

---------

Co-authored-by: Łukasz Domeradzki <[email protected]>
Co-authored-by: ArchiBot <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Göls <[email protected]>
Co-authored-by: Jack Nolddor <[email protected]>
Co-authored-by: Vita Chumakova <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 Bug Issues marked with this label indicate unintended program behaviour that needs correction. ✔️ Confirmed Issues marked with this label were acknowledged and confirmed by the developers. 🟡 Medium priority Issues marked with this label have a priority, unless there is something even more important.
Projects
None yet
Development

No branches or pull requests

2 participants