jellyfin / jellyfin-plugin-vgmdb

VGMdb provider for Jellyfin
GNU General Public License v3.0
17 stars 8 forks source link

Invalid characters in json searching by album ID #22

Open Renari opened 6 months ago

Renari commented 6 months ago
[2024-02-15 00:39:05.328 -05:00] [ERR] [39] MediaBrowser.Providers.Manager.ProviderManager: Provider "VGMdb" failed to retrieve search results
System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 1 | BytePositionInLine: 4.
 ---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 1 | BytePositionInLine: 4.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
   at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonConverter jsonConverter, Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
   at System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, JsonConverter converter, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.ReadAllAsync[TValue](Stream utf8Json, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
   at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, Encoding sourceEncoding, JsonSerializerOptions options, CancellationToken cancellationToken)
   at Jellyfin.Plugin.Vgmdb.VgmdbApi.GetSearchResultsAsync(String name, CancellationToken cancellationToken)
   at Jellyfin.Plugin.Vgmdb.Providers.Info.VgmdbAlbumProvider.GetSearchResults(AlbumInfo searchInfo, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.GetSearchResults[TLookupType](IRemoteSearchProvider`1 provider, TLookupType searchInfo, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.GetRemoteSearchResults[TItemType,TLookupType](RemoteSearchQuery`1 searchInfo, BaseItem referenceItem, CancellationToken cancellationToken)

Occurs when searching for 109974 in the album id field.

Formula-9 commented 6 months ago

I've looked into it a bit after setting up the plugin on my end and getting similar errors, seems to be because VGMdb.info is reporting a high amount of 503 errors, and serves a HTML page when it happens. According to the issues on their GitHub repo, they seem to say that it's likely that they're being rate-limited by VGMdb.net

Renari commented 6 months ago

It looks like this was potentially fixed upstream?

Relevant links: https://github.com/hufman/vgmdb/issues/81

dxman commented 1 month ago

Encountered this same exception when searching for an album artist by ID, so it appears to still be an issue.

Jellyfin v10.9.7, running in Docker, plugin v4.0.0.0

Renari commented 1 month ago

https://github.com/hufman/vgmdb/issues/83