jellyfin-archive / jellyfin-plugin-anime

Anime Metadata Provider for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
58 stars 24 forks source link

[AniDB] Getting metadata broken. SSL error with api.anidb.net #85

Closed StillLoading closed 4 years ago

StillLoading commented 4 years ago

On Jellyfin 10.6.0 and plugin version 9.0.0.0 getting metadata from AniDB looks to be broken. I'm getting lots of these errors.

[2020-07-25 21:59:03.344 +00:00] [ERR] [66] MediaBrowser.Providers.TV.SeriesMetadataService: Error in "AniDB"
System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
 ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsyncInternal(HttpRequestOptions options, HttpMethod httpMethod)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsync(HttpRequestOptions options, HttpMethod httpMethod)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.Get(HttpRequestOptions options)
   at Jellyfin.Plugin.Anime.Providers.AniDB.Metadata.AniDbSeriesProvider.DownloadSeriesData(String aid, String seriesDataPath, String cachePath, IHttpClient httpClient, CancellationToken cancellationToken)
   at Jellyfin.Plugin.Anime.Providers.AniDB.Metadata.AniDbSeriesProvider.GetSeriesData(IApplicationPaths appPaths, IHttpClient httpClient, String seriesId, CancellationToken cancellationToken)
   at Jellyfin.Plugin.Anime.Providers.AniDB.Metadata.AniDbSeriesProvider.GetMetadata(SeriesInfo info, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)

73 Changed all URLs to https but it seems like api.anidb.net is not included in their certificate. I believe this could be the cause for this issue. I'll test and report back.

animegasan commented 4 years ago

On Jellyfin 10.6.0 and plugin version 9.0.0.0 getting metadata from AniDB looks to be broken. I'm getting lots of these errors.

[2020-07-25 21:59:03.344 +00:00] [ERR] [66] MediaBrowser.Providers.TV.SeriesMetadataService: Error in "AniDB"
System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
 ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsyncInternal(HttpRequestOptions options, HttpMethod httpMethod)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsync(HttpRequestOptions options, HttpMethod httpMethod)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.Get(HttpRequestOptions options)
   at Jellyfin.Plugin.Anime.Providers.AniDB.Metadata.AniDbSeriesProvider.DownloadSeriesData(String aid, String seriesDataPath, String cachePath, IHttpClient httpClient, CancellationToken cancellationToken)
   at Jellyfin.Plugin.Anime.Providers.AniDB.Metadata.AniDbSeriesProvider.GetSeriesData(IApplicationPaths appPaths, IHttpClient httpClient, String seriesId, CancellationToken cancellationToken)
   at Jellyfin.Plugin.Anime.Providers.AniDB.Metadata.AniDbSeriesProvider.GetMetadata(SeriesInfo info, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)

73 Changed all URLs to https but it seems like api.anidb.net is not included in their certificate. I believe this could be the cause for this issue. I'll test and report back.

I hope this problem is quickly resolved, because I am very dependent on this pluggin

StillLoading commented 4 years ago

Tested and confirmed. Switching back to http for api.anidb.net solved the issue.

But before we revert this, I'll see if I can get a hold of someone over at anidb.net. Maybe the missing subjectAltName is just a mishap.

animegasan commented 4 years ago

Tested and confirmed. Switching back to http for api.anidb.net solved the issue.

But before we revert this, I'll see if I can get a hold of someone over at anidb.net. Maybe the missing subjectAltName is just a mishap.

will it take long? because I can't play with programming, I certainly can only wait in jellyfin repo :(

StillLoading commented 4 years ago

okay so here is the response from someone over at anidb (see discussion)

deriDIOt: neither the http, nor the udp or tcp api support https so creating a certificate is pointless

So I guess we're stuck with plain http for now.