yewnyx / SubLink

MIT License
15 stars 5 forks source link

Crash after Twitch authorization on v2.1.10 #8

Closed sentfromspacevr closed 10 months ago

sentfromspacevr commented 10 months ago
[20:31:29 Debug] Hosting starting
[20:31:30 Debug] Setting up OSCQuery on ports UDP:50717 TCP:55870
[20:31:30 Warning] [Twitch] Twitch access is not configured, requesting Twitch authorization
[20:31:30 Debug] Hosting started
[20:31:45 Information] [Twitch] Validated token for [redacted] with scopes: bits:read, channel:manage:polls, channel:manage:redemptions, channel:read:hype_train, channel:read:polls, channel:read:redemptions, channel:read:subscriptions, channel:read:vips, chat:edit, chat:read
[20:31:45 Error] BackgroundService failed
System.Text.Json.JsonReaderException: The JSON object contains a trailing comma at the end which is not supported in this mode. Change the reader options. LineNumber: 27 | BytePositionInLine: 2.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ConsumeNextTokenUntilAfterAllCommentsAreSkipped(Byte marker)
   at System.Text.Json.Utf8JsonReader.ConsumeNextToken(Byte marker)
   at System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollback(Byte marker)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.JsonDocument.Parse(ReadOnlySpan`1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack)
   at System.Text.Json.JsonDocument.ParseUnrented(ReadOnlyMemory`1 utf8Json, JsonReaderOptions readerOptions, JsonTokenType tokenType)
   at System.Text.Json.JsonDocument.ParseValue(ReadOnlyMemory`1 json, JsonDocumentOptions options)
   at xyz.yewnyx.SubLink.TwitchService.ValidateOrUpdateAccessToken()
   at xyz.yewnyx.SubLink.TwitchService.Start()
   at xyz.yewnyx.SubLink.SubLinkService`3.ExecuteAsync(CancellationToken stoppingToken)
   at xyz.yewnyx.SubLink.SubLinkService`3.ExecuteAsync(CancellationToken stoppingToken)
   at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[20:31:45 Fatal] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.Text.Json.JsonReaderException: The JSON object contains a trailing comma at the end which is not supported in this mode. Change the reader options. LineNumber: 27 | BytePositionInLine: 2.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ConsumeNextTokenUntilAfterAllCommentsAreSkipped(Byte marker)
   at System.Text.Json.Utf8JsonReader.ConsumeNextToken(Byte marker)
   at System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollback(Byte marker)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.JsonDocument.Parse(ReadOnlySpan`1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack)
   at System.Text.Json.JsonDocument.ParseUnrented(ReadOnlyMemory`1 utf8Json, JsonReaderOptions readerOptions, JsonTokenType tokenType)
   at System.Text.Json.JsonDocument.ParseValue(ReadOnlyMemory`1 json, JsonDocumentOptions options)
   at xyz.yewnyx.SubLink.TwitchService.ValidateOrUpdateAccessToken()
   at xyz.yewnyx.SubLink.TwitchService.Start()
   at xyz.yewnyx.SubLink.SubLinkService`3.ExecuteAsync(CancellationToken stoppingToken)
   at xyz.yewnyx.SubLink.SubLinkService`3.ExecuteAsync(CancellationToken stoppingToken)
   at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[20:31:45 Debug] Hosting stopping
[20:31:45 Debug] Hosting stopped
LauraRozier commented 10 months ago

image whoops, my fault. There is a bad comma here. Thanks for letting us know!