FinTube icon indicating copy to clipboard operation
FinTube copied to clipboard

The AuthorizationPolicy named: 'DefaultAuthorization' was not found.

Open pgrobelniak opened this issue 1 year ago • 21 comments

Using Jellyfin version 10.9.2. Cannot select target library. Clicking submit does nothing. There is error message in log:

[2024-05-23 09:40:06.011 +00:00] [ERR] Error processing request. URL "GET" "/fintube/libraries".
System.InvalidOperationException: The AuthorizationPolicy named: 'DefaultAuthorization' was not found.
   at Microsoft.AspNetCore.Authorization.AuthorizationPolicy.CombineAsync(IAuthorizationPolicyProvider policyProvider, IEnumerable`1 authorizeData, IEnumerable`1 policies)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

pgrobelniak avatar May 23 '24 09:05 pgrobelniak

Hey, thank you for reporting this issue. I think this issue is from https://github.com/AECX/FinTube/commit/268552087ecc06b1a0a3e821a6d28312c93cf846 - @vincentroyc do you have any idea? I'm personally seeing the same issue in my installation

AECX avatar May 25 '24 10:05 AECX

The same thing is happening for me as well, on Jellyfin 10.9.5 (released yesterday). Maybe it has something to do with this issue? It wasn't happening in this plugin, but the error message is the exact same... :thinking:

alexa-v avatar Jun 06 '24 08:06 alexa-v

I'm also getting this problem. But I've also noticed that the version of FinTube that it says it's installed on Jellyfin is 1.0.0.0 despite trying to install 1.0.1.0. When I try to install 1.0.0.0 from the version dropdown it says it's already installed, and if I try to install 1.0.1.0 it acts like it's installing it but the version will stay as 1.0.0.0. I don't know if this means that the wrong version is actually installed or if it's just labelled incorrectly and I do have 1.0.1.0 installed.

I also use the Trakt and Opensubtitles plugins that use auth keys and I don't have any issues with those.

algorizan avatar Jun 16 '24 02:06 algorizan

Same for me on 10.9.5.... is there a settings file to manually set destination library?

oatmealm avatar Jun 18 '24 10:06 oatmealm

Freshly installed FinTube for the first time, get the same error. Jellyfin 10.9.6, FinTube 1.0.0.0 according to the plugin page.

lamebread avatar Jun 18 '24 12:06 lamebread

Seems like you could try changing to one of the options from https://github.com/jellyfin/jellyfin/blob/v10.9.0/MediaBrowser.Common/Api/Policies.cs. An example is shown in a random other plugin: https://github.com/9p4/jellyfin-plugin-sso/blob/b8e56cefab12b2ad614d5a7b589e7de7b575d76b/SSO-Auth/Api/SSOController.cs#L331 Specifically, file Jellyfin.Plugin.FinTube/Api/FinTubeActivityController.cs#L20 could be:

[Authorize(Policy = "CollectionManagement")]

EDIT: I have not tested this.

bgstack15 avatar Jun 19 '24 12:06 bgstack15

@AECX PR is up : https://github.com/AECX/FinTube/pull/13

In the mean time, my repo can be used for the fix, but be advised that it's a dev repo and I didn't quite understand how to manage the fork sync and the releases so my releases are de synched but this one is working : https://raw.githubusercontent.com/vincentroyc/FinTube/master/manifest.json

vincentroyc avatar Jun 25 '24 00:06 vincentroyc

I have the same issue on jellyfin 10.9.0

aleguizzo avatar Jul 09 '24 08:07 aleguizzo

Same issue (bump) 10.9.11 Jellyfin

100Create avatar Oct 11 '24 23:10 100Create

Seeing this same error with 10.10.1 and a fresh install of FinTube.

guitarer09 avatar Nov 17 '24 23:11 guitarer09

Just to report: I'm seeing this in 10.10.3 of jellyfin also. FinTube reports that it is 1.0.0.0, though that was a fresh install.

[2024-12-01 18:32:27.951 -05:00] [ERR] [24] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "POST" "/fintube/submit_dl".
System.InvalidOperationException: The AuthorizationPolicy named: 'DefaultAuthorization' was not found.
   at Microsoft.AspNetCore.Authorization.AuthorizationPolicy.CombineAsync(IAuthorizationPolicyProvider policyProvider, IEnumerable`1 authorizeData, IEnumerable`1 policies)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

posniewski avatar Dec 01 '24 23:12 posniewski

Also getting this issue. Same exact error.

Aetherinox avatar Dec 29 '24 07:12 Aetherinox

Same error. Jellyfin 10.10.3, FinTube 1.0.0.0.

elazar avatar Jan 12 '25 18:01 elazar

Same error

High-rider avatar Jan 13 '25 11:01 High-rider

Try 1.0.1.0

AECX avatar Jan 30 '25 12:01 AECX

Try 1.0.1.0

I have tried this twice, whenever I install version 1.0.1.0, it initially (till server restart) shows the version as 1.0.1.0 but after the restart it says v1.0.0.0

High-rider avatar Jan 30 '25 12:01 High-rider

Try 1.0.1.0

I have tried this twice, whenever I install version 1.0.1.0, it initially (till server restart) shows the version as 1.0.1.0 but after the restart it says v1.0.0.0

Yeah, same issue here. At first I wasn't even able to uninstall the plugin without an error appearing, no idea why it's so broken.

lamebread avatar Jan 31 '25 14:01 lamebread

Same error. Wouldn't uninstall initially for me either. Had to try couple of time. Now the library dropdown is empty. Looks like permission issue for the api to list library content. Shouldn't the last verb be VirtualLibrary? Was looking what the UI itself was calling.

oatmealm avatar Jan 31 '25 18:01 oatmealm

@AECX this PR is what I have done on and use on my fork and it,s working for me ever since I made the PR and the corrections. You could try it and merge/release if you want so people can still use the official repo. As you wish.

vincentroyc avatar Feb 26 '25 01:02 vincentroyc

Thanks will check it out as soon as I can

AECX avatar Feb 26 '25 02:02 AECX

This error persists. I notice that I install 1.0.1.0 but after restart it shows 1.0.0.0 is installed. It happens every time, updating, reinstalling it, always reverts to 1.0.0.0. Logs state 1.0.1.0 is loaded but the UI does not reflect that. I wonder if that could be why this error persists?

ApexProxy avatar May 23 '25 01:05 ApexProxy

This issue seems to be due to a mismatch between the .dll version and the version specified in manifest.json. Resolved by using build props with 1.0.1.0 version.

ikiovi avatar Jun 14 '25 22:06 ikiovi

Hey, has anyone actually found a fix for updating the version? mine installed 1.0.0.0

RadioFoxProductions avatar Sep 08 '25 21:09 RadioFoxProductions