jellyfin / jellyfin

The Free Software Media System
https://jellyfin.org
GNU General Public License v2.0
33.33k stars 3.04k forks source link

[Issue]: After upgrade to 10.9, the home page is blank #11533

Closed Izumiko closed 4 months ago

Izumiko commented 4 months ago

Please describe your bug

After I upgraded my docker container from 10.8.13 to 10.9.0, I could not view the home page, but the admin page was fine. The /UserViews endpoint reported HTTP 500 status.

BTW, I also created a new container with no config or media from the old container, it didn't report any error. Is this bug caused by migration between two versions?

Reproduction Steps

  1. pull the jellyfin/jellyfin:latest image
  2. recreate the jellyfin container
  3. open the jellyfin web page

Jellyfin Version

10.8.13

if other:

10.9.0

Environment

- OS: Alpine
- Linux Kernel: 6.8.4
- Virtualization: Docker
- Clients: Jellyfin-Web
- Browser: Firefox 126.0
- FFmpeg Version: 6.0.1-Jellyfin
- Playback Method: Direct
- Hardware Acceleration: Intel QSV
- GPU Model: Intel UHD 630
- Plugins: jellyfin-bangumi
- Reverse Proxy: Caddy / none
- Base URL: /jellyfin
- Networking: Host
- Storage: local

Jellyfin logs

[19:20:37] [ERR] [47] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL GET /UserViews.
System.InvalidOperationException: Failed to compare two elements in the array.
 ---> System.TypeInitializationException: The type initializer for 'ICU4N.Text.Transliterator' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'ICU4N.Globalization.UCultureInfo' threw an exception.
 ---> System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
en is an invalid culture identifier.
   at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
   at ICU4N.Globalization.UCultureInfo..cctor()
   --- End of inner exception stack trace ---
   at ICU4N.Globalization.UCultureInfo.get_CurrentCulture()
   at ICU4N.Impl.ICUResourceBundle.GetBundleInstance(String baseName, String localeID, Assembly root, OpenType openType)
   at ICU4N.Impl.ICUResourceBundle.GetBundleInstance(String baseName, String localeID, Assembly root, Boolean disableFallback)
   at ICU4N.Util.UResourceBundle.<>c__DisplayClass25_0.<GetRootType>b__0(String key)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at ICU4N.Util.UResourceBundle.GetRootType(String baseName, Assembly root)
   at ICU4N.Util.UResourceBundle.InstantiateBundle(String baseName, String localeName, Assembly root, Boolean disableFallback)
   at ICU4N.Util.UResourceBundle.GetBundleInstance(String baseName, String localeName, Assembly root, Boolean disableFallback)
   at ICU4N.Util.UResourceBundle.GetBundleInstance(String baseName, String localeName, Assembly root)
   at ICU4N.Text.Transliterator..cctor()
   --- End of inner exception stack trace ---
   at ICU4N.Text.Transliterator.GetInstance(String id)
   at Jellyfin.Extensions.StringExtensions.<>c.<.cctor>b__8_0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
--- End of stack trace from previous location ---
   at System.Lazy`1.CreateValue()
   at Jellyfin.Extensions.StringExtensions.Transliterated(String text)
   at MediaBrowser.Controller.Entities.BaseItem.ModifySortChunks(ReadOnlySpan`1 name)
   at MediaBrowser.Controller.Entities.BaseItem.CreateSortName()
   at MediaBrowser.Controller.Entities.BaseItem.get_SortName()
   at Emby.Server.Implementations.Sorting.SortNameComparer.Compare(BaseItem x, BaseItem y)
   at System.Linq.EnumerableSorter`2.CompareAnyKeys(Int32 index1, Int32 index2)
   at System.Collections.Generic.ArraySortHelper`1.InsertionSort(Span`1 keys, Comparison`1 comparer)
   at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer)
   at System.Collections.Generic.ArraySortHelper`1.Sort(Span`1 keys, Comparison`1 comparer)
   --- End of inner exception stack trace ---
   at System.Collections.Generic.ArraySortHelper`1.Sort(Span`1 keys, Comparison`1 comparer)
   at System.Linq.EnumerableSorter`2.QuickSort(Int32[] keys, Int32 lo, Int32 hi)
   at System.Linq.OrderedEnumerable`1.ToList()
   at Emby.Server.Implementations.Library.UserViewManager.GetUserViews(UserViewQuery query)
   at Jellyfin.Api.Controllers.UserViewsController.GetUserViews(Nullable`1 userId, Nullable`1 includeExternalContent, Nullable`1[] presetViews, Boolean includeHidden)
   at lambda_method1113(Closure, Object, Object[])
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   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)

FFmpeg logs

No response

Please attach any browser or client logs here

图片

Please attach any screenshots here

No response

Code of Conduct

jellyfin-bot commented 4 months ago

Hi, it seems like your issue report has the following item(s) that need to be addressed:

This is an automated message, currently under testing. Please file an issue here if you encounter any problems.

joshuaboniface commented 4 months ago

Can you try a force refresh and/or clearing browser cache then reloading the page? It's possibly trying to fetch an older version. Nevermind, that's an API endpoint. We haven't seen that in testing unstables, so needs investigation.

crobibero commented 4 months ago

https://github.com/jellyfin/jellyfin/issues/11528#issuecomment-2105568202

Can you check if your container has the env variable DOTNET_SYSTEM_GLOBALIZATION_INVARIANT set to true or 1 ? This is a wrong configuration for 10.9 now and if it does you need to change it to 0 or just remove this env variable.

Izumiko commented 4 months ago

#11528 (comment)

Can you check if your container has the env variable DOTNET_SYSTEM_GLOBALIZATION_INVARIANT set to true or 1 ? This is a wrong configuration for 10.9 now and if it does you need to change it to 0 or just remove this env variable.

DOTNET_SYSTEM_GLOBALIZATION_INVARIANT is 1. I delete the container then create again, the env has disappeared and Jellyfin runs with no error.

Thanks!

joshuaboniface commented 4 months ago

We've also added a note in the release blog post's "Key Release Notes/Breaking Changes" section mentioning this issue.

gummykage commented 4 months ago

This fixed it.

terrorhai commented 4 months ago

Had the same problem with some libraries not displaying the media in it. I just deleted DOTNET_SYSTEM_GLOBALIZATION_INVARIANT in Portainer -> Env, redeployed the container and it works fine now. Thanks!

kingbecher commented 3 months ago

Mine was no new Series could be added. It works now when i delete the env. Many Thanks !!

beelze-bob commented 3 months ago

It was not scanning libraries/adding new titles. Stopping the container changing DOTNET_SYSTEM_GLOBALIZATION_INVARIANT to 0 in the settings and restarting the container fixed this. Thank you

jfbesto commented 3 months ago

DOTNET_SYSTEM_GLOBALIZATION_INVARIANT

Thank you, had the same issue and didnt know how to fix.

DOTNET_SYSTEM_GLOBALIZATION_INVARIANT from 1 to 0 fixed it.

Im so happy.

GabrielFleury commented 2 weeks ago

On my end only my Music folder was blank so it was a frustrating fix to find. The logs would say:

Library folder "/config/data/playlists" is inaccessible or empty, skipping

then it would throw the invalid culture exception. If it's linked to special characters it's possible that my filenames for music are more exotic than my other media.

It seems to have been caused by using Portainer on a Synology NAS to update to Jellyfin 10.9, the DOTNET_SYSTEM_GLOBALIZATION_INVARIANT environment variable carried over the installation. To get rid of it I had to edit it out in Container Manager (Docker), not in Portainer or it comes back because of this issue.