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

青龙获取环境变量列表时response的position转数字类型异常 #364

Closed
Ice-Cream-MY opened this issue Dec 13, 2022 · 1 comment
Labels
bug Something isn't working done done

Comments

@Ice-Cream-MY
Copy link

版本号:(请贴出你的版本号,请确认是否已通过升级到最新版来解决当前问题?)
运行环境:(请贴出运行环境,比如是Actions或docker或本地?是Win还是Linux?)

问题描述:(提issue前请先确认没有其他人已提过相同的议题,请清晰的描述所您所遇到的问题。)

日志信息:(如果可以,请贴出Debug级别的日志信息,以便更高效的确定和解决问题。)
[14:29:21 INF] 我数到10,动作快点
[14:29:21 INF] [1]等待扫描...
[14:29:32 INF] 扫描成功!
[14:29:32 INF] --------结束--------

[14:29:32 INF] ---开始 添加ck到青龙环境变量 ---
[14:29:32 ERR] [REQUEST]
GET /api/envs?searchValue=Ray_BiliBiliCookies__ HTTP/1.1
Host: localhost:5600
Authorization: Bearer eyJhbGciOiJIUzM(省略)ryc62jh61
Accept: application/json; q=0.001, application/xml; q=0.001

[RESPONSE]
HTTP/1.1 200 OK
X-Powered-By: Express
Access-Control-Allow-Origin: *
ETag: W/"453-sSl5gK+RhHditaJrMBtIZf+VJEQ"
Date: Tue, 13 Dec 2022 06:29:32 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Content-Type: application/json; charset=utf-8
Content-Length: 1107

{"code":200,"data":[{"id":83,"value":"895(省略)pv6x","timestamp":"Thu Dec 08 2022 19:24:28 GMT+0800 (中国标准时间)","status":0,"position":2.7105054309427105e-10,"name":"Ray_BiliBiliCookies__1","remarks":null,"createdAt":"2022-12-08T11:24:28.739Z","updatedAt":"2022-12-08T11:24:28.739Z"}]}

[EXCEPTION]
System.Text.Json.JsonException: The JSON value could not be converted to System.Int64. Path: $.data[0].position | LineNumber: 0 | BytePositionInLine: 979.
---> System.FormatException: Either the JSON value is not in a supported format, or is out of bounds for an Int64.
at System.Text.Json.Utf8JsonReader.GetInt64()
at System.Text.Json.Serialization.Converters.Int64Converter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonCollectionConverter2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) --- End of inner exception stack trace --- at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, Utf8JsonReader& reader, Exception ex) at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.Serialization.JsonConverter1.ReadCoreAsObject(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable1 actualByteCount) at System.Text.Json.JsonSerializer.Deserialize(ReadOnlySpan1 utf8Json, Type returnType, JsonSerializerOptions options)
at WebApiClientCore.ApiResponseContextExtensions.JsonDeserializeAsync(ApiResponseContext context, Type objType)
at WebApiClientCore.Attributes.JsonReturnAttribute.SetResultAsync(ApiResponseContext context)
at WebApiClientCore.Attributes.ApiReturnAttribute.OnResponseAsync(ApiResponseContext context)
at WebApiClientCore.Implementations.ApiRequestExecuter.HandleResponseAsync(ApiResponseContext context)

[ELAPSED] 00:00:00.0573711
[14:29:32 ERR] 程序发生异常:One or more errors occurred. (The JSON value could not be converted to System.Int64. Path: $.data[0].position | LineNumber: 0 | BytePositionInLine: 979.)
[14:29:32 ERR] 程序发生异常:One or more errors occurred. (The JSON value could not be converted to System.Int64. Path: $.data[0].position | LineNumber: 0 | BytePositionInLine: 979.)
[14:29:32 ERR] 程序异常终止,原因:One or more errors occurred. (The JSON value could not be converted to System.Int64. Path: $.data[0].position | LineNumber: 0 | BytePositionInLine: 979.)
[14:29:32 INF] 运行环境:Development
[14:29:32 INF] 应用目录:/ql/data/repo/RayWangQvQ_BiliBiliToolPro/src/Ray.BiliBiliTool.Console/bin/Debug/net6.0/

[14:29:32 INF] 运行结束
[14:29:32 FTL] Host terminated unexpectedly!
System.AggregateException: One or more errors occurred. (The JSON value could not be converted to System.Int64. Path: $.data[0].position | LineNumber: 0 | BytePositionInLine: 979.)
---> System.Net.Http.HttpRequestException: The JSON value could not be converted to System.Int64. Path: $.data[0].position | LineNumber: 0 | BytePositionInLine: 979.
---> System.Text.Json.JsonException: The JSON value could not be converted to System.Int64. Path: $.data[0].position | LineNumber: 0 | BytePositionInLine: 979.
---> System.FormatException: Either the JSON value is not in a supported format, or is out of bounds for an Int64.
at System.Text.Json.Utf8JsonReader.GetInt64()
at System.Text.Json.Serialization.Converters.Int64Converter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonCollectionConverter2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) --- End of inner exception stack trace --- at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, Utf8JsonReader& reader, Exception ex) at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.Serialization.JsonConverter1.ReadCoreAsObject(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable1 actualByteCount) at System.Text.Json.JsonSerializer.Deserialize(ReadOnlySpan1 utf8Json, Type returnType, JsonSerializerOptions options)
at WebApiClientCore.ApiResponseContextExtensions.JsonDeserializeAsync(ApiResponseContext context, Type objType)
at WebApiClientCore.Attributes.JsonReturnAttribute.SetResultAsync(ApiResponseContext context)
at WebApiClientCore.Attributes.ApiReturnAttribute.OnResponseAsync(ApiResponseContext context)
at WebApiClientCore.Implementations.ApiRequestExecuter.HandleResponseAsync(ApiResponseContext context)
at WebApiClientCore.Implementations.DefaultApiActionInvoker1.InvokeAsync(ApiRequestContext request) at WebApiClientCore.Implementations.DefaultApiActionInvoker1.InvokeAsync(HttpClientContext context, Object[] arguments)
--- End of inner exception stack trace ---
at WebApiClientCore.Implementations.DefaultApiActionInvoker1.InvokeAsync(HttpClientContext context, Object[] arguments) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Ray.BiliBiliTool.Application.LoginTaskAppService.AddOrUpdateCkToQingLong(BiliCookie ckInfo)
at Ray.BiliBiliTool.Application.LoginTaskAppService.DoTask()
at Ray.BiliBiliTool.Console.BiliBiliToolHostedService.DoTasks(String[] tasks) in /ql/data/repo/RayWangQvQ_BiliBiliToolPro/src/Ray.BiliBiliTool.Console/BiliBiliToolHostedService.cs:line 168
at Ray.BiliBiliTool.Console.BiliBiliToolHostedService.StartAsync(CancellationToken cancellationToken) in /ql/data/repo/RayWangQvQ_BiliBiliToolPro/src/Ray.BiliBiliTool.Console/BiliBiliToolHostedService.cs:line 64
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at Ray.BiliBiliTool.Console.Program.Main(String[] args) in /ql/data/repo/RayWangQvQ_BiliBiliToolPro/src/Ray.BiliBiliTool.Console/Program.cs:line 27

@RayWangQvQ RayWangQvQ added the bug Something isn't working label Dec 13, 2022
@RayWangQvQ
Copy link
Owner

已修复

@RayWangQvQ RayWangQvQ added the done done label Dec 13, 2022
@RayWangQvQ RayWangQvQ changed the title 青龙登录异常,错误如下 青龙获取环境变量列表时response的position转数字类型异常 Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done done
Projects
None yet
Development

No branches or pull requests

2 participants