{"record":{"id":"0697d5b1225f1c8b","repo":"JustArchiNET/ArchiSteamFarm","slug":"received-unknown-value-for-0-please-report-this","errorCode":null,"errorMessage":"Received unknown value for {0}, please report this: {1}","messagePattern":"Received unknown value for (.+?), please report this: (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"warning","filePath":"ArchiSteamFarm/Steam/Bot.cs","lineNumber":498,"sourceCode":"\t}\n\n\t[PublicAPI]\n\tpublic EAccess GetAccess(ulong steamID) {\n\t\tif ((steamID == 0) || !new SteamID(steamID).IsIndividualAccount) {\n\t\t\tthrow new ArgumentOutOfRangeException(nameof(steamID));\n\t\t}\n\n\t\tif (ASF.IsOwner(steamID)) {\n\t\t\treturn EAccess.Owner;\n\t\t}\n\n\t\tif (BotConfig.SteamUserPermissions.TryGetValue(steamID, out BotConfig.EAccess permission)) {\n\t\t\treturn permission switch {\n\t\t\t\tBotConfig.EAccess.None => EAccess.None,\n\t\t\t\tBotConfig.EAccess.FamilySharing => EAccess.FamilySharing,\n\t\t\t\tBotConfig.EAccess.Operator => EAccess.Operator,\n\t\t\t\tBotConfig.EAccess.Master => EAccess.Master,\n\t\t\t\t_ => throw new InvalidOperationException(Strings.FormatWarningUnknownValuePleaseReport(nameof(permission), permission))\n\t\t\t};\n\t\t}\n\n\t\treturn SteamFamilySharingIDs.Contains(steamID) ? EAccess.FamilySharing : EAccess.None;\n\t}\n\n\t[PublicAPI]\n\tpublic static Bot? GetBot(string botName) {\n\t\tArgumentException.ThrowIfNullOrEmpty(botName);\n\n\t\tif (Bots == null) {\n\t\t\tthrow new InvalidOperationException(nameof(Bots));\n\t\t}\n\n\t\tif (Bots.TryGetValue(botName, out Bot? targetBot)) {\n\t\t\treturn targetBot;\n\t\t}\n","sourceCodeStart":480,"sourceCodeEnd":516,"githubUrl":"https://github.com/JustArchiNET/ArchiSteamFarm/blob/fe57c4129f4ce02d452318cabc525eb49a087255/ArchiSteamFarm/Steam/Bot.cs#L480-L516","documentation":"Thrown in Bot.GetAccessPermissions when a value read from BotConfig.SteamUserPermissions does not match any known BotConfig.EAccess case (None/FamilySharing/Operator/Master). The default arm of the switch reports it as an unknown value, signalling corruption or a forward-incompatible enum value. It is explicitly a 'please report' error, meaning ASF expects it to be unreachable under normal use.","triggerScenarios":"SteamUserPermissions dictionary (from bot config) contains an EAccess byte value outside {0,10,50,100} (the enum's defined members). Because EAccess is backed by byte, any literal number 0–255 can round-trip from JSON; an unmapped number hits the default case.","commonSituations":"Hand-editing bot JSON and typing an invalid access number (e.g. 30 or 255) under SteamUserPermissions; a config produced by a newer ASF version that added an access level the running build does not recognize; a third-party tool writing config with an out-of-range value.","solutions":["Open the bot's JSON and fix the offending SteamUserPermissions entry to a valid access value (0=None, 1=FamilySharing, 2=Operator, 3=Master per the enum or its documented numeric mapping).","Re-enter Steam user permissions through ASF's command/UI rather than manual editing.","Align ASF versions if the config came from a newer build that introduced a new EAccess member.","Report upstream with the value if it came from a legitimately produced config (the message asks for this)."],"exampleFix":"// before (bot JSON, invalid numeric access)\n\"SteamUserPermissions\": { \"76561198000000000\": 30 }\n// after\n\"SteamUserPermissions\": { \"76561198000000000\": 3 }","handlingStrategy":"validation","validationCode":"// Validate access values before relying on the switch.\nforeach (var kv in botConfig.SteamUserPermissions) {\n    if (!Enum.IsDefined(typeof(BotConfig.EAccess), kv.Value))\n        throw new InvalidOperationException($\"Unknown EAccess {kv.Value} for {kv.Key}\");\n}","typeGuard":"static bool IsKnownAccess(BotConfig.EAccess a) =>\n    a is BotConfig.EAccess.None or BotConfig.EAccess.FamilySharing\n       or BotConfig.EAccess.Operator or BotConfig.EAccess.Master;","tryCatchPattern":"try { EAccess access = bot.GetAccessPermissions(steamID); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"please report\")) {\n    // log the offending value and treat as EAccess.None\n}","preventionTips":["Set SteamUserPermissions only via ASF commands, not raw JSON edits.","Diff bot configs after upgrades to catch stray numeric values.","Keep the ASF runtime and config producer on the same version."],"tags":["steam","configuration","enum","bot-permissions","validation"],"backgroundTag":null,"analyzedSha":"fe57c4129f4ce02d452318cabc525eb49a087255","analyzedAt":"2026-08-13T17:26:20.146Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}