chr233 / ASFEnhance

ASF 扩展命令插件 / External commands for ASF
GNU Affero General Public License v3.0
512 stars 41 forks source link

ASF V6.0.5.2插件运行报错 #302

Closed Gensokyo1995 closed 3 months ago

Gensokyo1995 commented 3 months ago

Describe the bug / Bug 描述 Describe what the bug is ASF V6.0.5.2版本 插件运行报错

Error Log / 错误日志 ASFenhance 遇到错误, 日志如下

2024-08-02 20:47:35|ArchiSteamFarm-17340|INFO|ASF|OnASFInit()

█████╗ ███████╗███████╗███████╗███╗ ██╗██╗ ██╗ █████╗ ███╗ ██╗ ██████╗███████╗ ██╔══██╗██╔════╝██╔════╝██╔════╝████╗ ██║██║ ██║██╔══██╗████╗ ██║██╔════╝██╔════╝ ███████║███████╗█████╗ █████╗ ██╔██╗ ██║███████║███████║██╔██╗ ██║██║ █████╗
██╔══██║╚════██║██╔══╝ ██╔══╝ ██║╚██╗██║██╔══██║██╔══██║██║╚██╗██║██║ ██╔══╝
██║ ██║███████║██║ ███████╗██║ ╚████║██║ ██║██║ ██║██║ ╚████║╚██████╗███████╗ ╚═╝ ╚═╝╚══════╝╚═╝ ╚══════╝╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝╚══════╝

ASFEnhance 版本 2.1.12.0 插件作者: Chr_, 联系方式: chr@chrxw.com 爱发电: https://afdian.net/@chr233

已加载 1 个外部模块

1: [AAM] ASF Achievemenevement Manager Ex 1.1.0.1

2024-08-02 20:47:35|ArchiSteamFarm-17340|ERROR|ASF|OnASFInit() System.InvalidOperationException: Reflection-based serialization has been disabled for this application. Either use the source generator APIs or explicitly configure the 'JsonSerializerOptions.TypeInfoResolver' property. at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_JsonSerializerIsReflectionDisabled() at System.Text.Json.JsonSerializerOptions.ConfigureForJsonSerializer() at System.Text.Json.JsonSerializerOptions.MakeReadOnly(Boolean) at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions, Type) at System.Text.Json.JsonSerializer.GetTypeInfoT at System.Text.Json.JsonSerializer.Deserialize[TValue](JsonElement, JsonSerializerOptions ) at ASFEnhance.ASFEnhance.OnASFInit(IReadOnlyDictionary`2 additionalConfigProperties)

chr233 commented 3 months ago

换6.0.4.4,只适配稳定版

Gensokyo1995 commented 3 months ago

换6.0.4.4,只适配稳定版

ASF已更新V6.0.5.2 image

Botan626 commented 3 months ago

not fixed in ASFEnhance 2.2.0.0 with ASF 6.0.5.2

2024-08-03 13:07:41|ArchiSteamFarm-15652|INFO|ASF|UpdateASF() Local version: 6.0.5.2 | Remote version: 6.0.5.2
2024-08-03 13:07:41|ArchiSteamFarm-15652|INFO|ASF|UpdatePlugins() Checking for plugin updates...
2024-08-03 13:07:41|ArchiSteamFarm-15652|INFO|ASF|UpdatePlugin() Checking update for ASFEnhance plugin...
2024-08-03 13:07:42|ArchiSteamFarm-15652|INFO|ASF|GetTargetReleaseURL() No update available for ASFEnhance plugin: 2.2.0.0 ≥ 2.2.0.0.
2024-08-03 13:07:42|ArchiSteamFarm-15652|INFO|ASF|Load() Loading STD global cache...
2024-08-03 13:07:42|ArchiSteamFarm-15652|INFO|ASF|OnASFInit()
==========================================================================
 █████╗ ███████╗███████╗███████╗███╗   ██╗██╗  ██╗ █████╗ ███╗   ██╗ ██████╗███████╗
██╔══██╗██╔════╝██╔════╝██╔════╝████╗  ██║██║  ██║██╔══██╗████╗  ██║██╔════╝██╔════╝
███████║███████╗█████╗  █████╗  ██╔██╗ ██║███████║███████║██╔██╗ ██║██║     █████╗
██╔══██║╚════██║██╔══╝  ██╔══╝  ██║╚██╗██║██╔══██║██╔══██║██║╚██╗██║██║     ██╔══╝
██║  ██║███████║██║     ███████╗██║ ╚████║██║  ██║██║  ██║██║ ╚████║╚██████╗███████╗
╚═╝  ╚═╝╚══════╝╚═╝     ╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝ ╚═════╝╚══════╝
==========================================================================
ASFEnhance Version 2.2.0.0
Developed by Chr_, email chr@chrxw.com
Donate: https://afdian.com/@chr233
==========================================================================
Submodule not loaded
==========================================================================

2024-08-03 13:07:42|ArchiSteamFarm-15652|INFO|ASF|Load() Validating STD global cache integrity...
2024-08-03 13:07:42|ArchiSteamFarm-15652|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-08-03 13:07:42|ArchiSteamFarm-15652|ERROR|ASF|OnASFInit() System.InvalidOperationException: Reflection-based serialization has been disabled for this application. Either use the source generator APIs or explicitly configure the 'JsonSerializerOptions.TypeInfoResolver' property.
   at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_JsonSerializerIsReflectionDisabled()
   at System.Text.Json.JsonSerializerOptions.ConfigureForJsonSerializer()
   at System.Text.Json.JsonSerializerOptions.MakeReadOnly(Boolean)
   at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions, Type)
   at System.Text.Json.JsonSerializer.GetTypeInfo[T](JsonSerializerOptions)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](JsonElement, JsonSerializerOptions )
   at ASFEnhance.ASFEnhance.OnASFInit(IReadOnlyDictionary`2 additionalConfigProperties)

What submodule is not loaded?

JustArchi commented 3 months ago

@chr233 replacing your custom JsonSerializer calls with ASF helpers from https://github.com/JustArchiNET/ArchiSteamFarm/blob/main/ArchiSteamFarm/Helpers/Json/JsonUtilities.cs should do the trick.

JsonSerializer.Serialize -> obj.ToJsonText() JsonSerializer.Deserialize -> text.ToJsonObject<T>()

chr233 commented 3 months ago

thank you

Gensokyo1995 commented 3 months ago

测试了下ASFEnhance没报错了,我还使用了ASFAchievementManagerEx插件,这个还在报错

chr233 commented 3 months ago

测试了下ASFEnhance没报错了,我还使用了ASFAchievementManagerEx插件,这个还在报错

有空更新,最近比较忙