[PR #6761] [MERGED] Streamline startup code #11109

Closed
opened 2026-02-07 06:32:38 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/6761
Author: @Bond-009
Created: 11/1/2021
Status: Merged
Merged: 11/3/2021
Merged by: @cvium

Base: masterHead: startup2


📝 Commits (1)

📊 Changes

6 files changed (+123 additions, -143 deletions)

View changed files

📝 Emby.Server.Implementations/ApplicationHost.cs (+72 -78)
📝 Jellyfin.Server/CoreAppHost.cs (+21 -28)
📝 Jellyfin.Server/Program.cs (+21 -20)
📝 MediaBrowser.Common/IApplicationHost.cs (+3 -1)
📝 tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs (+4 -6)
📝 tests/Jellyfin.Server.Integration.Tests/TestAppHost.cs (+2 -10)

📄 Description

Before without web dir set:

[18:58:57] [INF] [1] Main: Jellyfin version: 10.8.0
[18:58:57] [INF] [1] Main: Environment Variables: ["[DOTNET_CLI_TELEMETRY_OPTOUT, 1]", "[DOTNET_ROOT, /home/bond/dotnet]", "[ASPNETCORE_URLS, http://localhost:8096]", "[JELLYFIN_LOG_DIR, /home/bond/.local/share/jellyfin/log]", "[ASPNETCORE_ENVIRONMENT, Development]"]
[18:58:57] [INF] [1] Main: Arguments: ["/home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/jellyfin.dll"]
[18:58:57] [INF] [1] Main: Operating system: Linux
[18:58:57] [INF] [1] Main: Architecture: X64
[18:58:57] [INF] [1] Main: 64-Bit Process: True
[18:58:57] [INF] [1] Main: User Interactive: True
[18:58:57] [INF] [1] Main: Processor count: 16
[18:58:57] [INF] [1] Main: Program data path: /home/bond/.local/share/jellyfin
[18:58:57] [INF] [1] Main: Web resources path: /home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/jellyfin-web
[18:58:57] [INF] [1] Main: Application directory: /home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/
[18:58:57] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /home/bond/.cache/jellyfin
[18:58:57] [FTL] [1] Main: Error while starting server.
System.InvalidOperationException: The server is expected to host the web client, but the provided content directory is either invalid or empty: /home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/jellyfin-web. If you do not want to host the web client with the server, you may set the '--nowebclient' command line flag, or set'hostwebclient=false' in your config settings.
   at Jellyfin.Server.Program.StartApp(StartupOptions options) in /home/bond/dev/jellyfin/Jellyfin.Server/Program.cs:line 179
[18:58:57] [INF] [1] Main: Running query planner optimizations in the database... This might take a while
[18:58:57] [FTL] [1] Main: Unhandled Exception
System.ArgumentNullException: Value cannot be null. (Parameter 'provider')
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
   at Emby.Server.Implementations.ApplicationHost.Resolve[T]() in /home/bond/dev/jellyfin/Emby.Server.Implementations/ApplicationHost.cs:line 415
   at Jellyfin.Server.Program.StartApp(StartupOptions options) in /home/bond/dev/jellyfin/Jellyfin.Server/Program.cs:line 227
   at Jellyfin.Server.Program.<Main>(String[] args)
Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'provider')
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
   at Emby.Server.Implementations.ApplicationHost.Resolve[T]() in /home/bond/dev/jellyfin/Emby.Server.Implementations/ApplicationHost.cs:line 415
   at Jellyfin.Server.Program.StartApp(StartupOptions options) in /home/bond/dev/jellyfin/Jellyfin.Server/Program.cs:line 227
   at Jellyfin.Server.Program.<Main>(String[] args)

After:

[18:49:27] [INF] [1] Main: Jellyfin version: 10.8.0
[18:49:27] [INF] [1] Main: Environment Variables: ["[ASPNETCORE_URLS, http://localhost:8096]", "[ASPNETCORE_ENVIRONMENT, Development]", "[JELLYFIN_LOG_DIR, /home/bond/.local/share/jellyfin/log]", "[DOTNET_ROOT, /home/bond/dotnet]", "[DOTNET_CLI_TELEMETRY_OPTOUT, 1]"]
[18:49:27] [INF] [1] Main: Arguments: ["/home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/jellyfin.dll"]
[18:49:27] [INF] [1] Main: Operating system: Linux
[18:49:27] [INF] [1] Main: Architecture: X64
[18:49:27] [INF] [1] Main: 64-Bit Process: True
[18:49:27] [INF] [1] Main: User Interactive: True
[18:49:27] [INF] [1] Main: Processor count: 16
[18:49:27] [INF] [1] Main: Program data path: /home/bond/.local/share/jellyfin
[18:49:27] [INF] [1] Main: Web resources path: /home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/jellyfin-web
[18:49:27] [INF] [1] Main: Application directory: /home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/
[18:49:27] [ERR] [1] Main: The server is expected to host the web client, but the provided content directory is either invalid or empty: /home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/jellyfin-web. If you do not want to host the web client with the server, you may set the '--nowebclient' command line flag, or set'hostwebclient=false' in your config settings.
[18:49:27] [INF] [2] Main: Received a SIGTERM signal, shutting down

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/6761 **Author:** [@Bond-009](https://github.com/Bond-009) **Created:** 11/1/2021 **Status:** ✅ Merged **Merged:** 11/3/2021 **Merged by:** [@cvium](https://github.com/cvium) **Base:** `master` ← **Head:** `startup2` --- ### 📝 Commits (1) - [`104e36f`](https://github.com/jellyfin/jellyfin/commit/104e36f2f9c6440a7547a4c76d80a69d5af84eea) Streamline startup code ### 📊 Changes **6 files changed** (+123 additions, -143 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/ApplicationHost.cs` (+72 -78) 📝 `Jellyfin.Server/CoreAppHost.cs` (+21 -28) 📝 `Jellyfin.Server/Program.cs` (+21 -20) 📝 `MediaBrowser.Common/IApplicationHost.cs` (+3 -1) 📝 `tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs` (+4 -6) 📝 `tests/Jellyfin.Server.Integration.Tests/TestAppHost.cs` (+2 -10) </details> ### 📄 Description Before without web dir set: ``` [18:58:57] [INF] [1] Main: Jellyfin version: 10.8.0 [18:58:57] [INF] [1] Main: Environment Variables: ["[DOTNET_CLI_TELEMETRY_OPTOUT, 1]", "[DOTNET_ROOT, /home/bond/dotnet]", "[ASPNETCORE_URLS, http://localhost:8096]", "[JELLYFIN_LOG_DIR, /home/bond/.local/share/jellyfin/log]", "[ASPNETCORE_ENVIRONMENT, Development]"] [18:58:57] [INF] [1] Main: Arguments: ["/home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/jellyfin.dll"] [18:58:57] [INF] [1] Main: Operating system: Linux [18:58:57] [INF] [1] Main: Architecture: X64 [18:58:57] [INF] [1] Main: 64-Bit Process: True [18:58:57] [INF] [1] Main: User Interactive: True [18:58:57] [INF] [1] Main: Processor count: 16 [18:58:57] [INF] [1] Main: Program data path: /home/bond/.local/share/jellyfin [18:58:57] [INF] [1] Main: Web resources path: /home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/jellyfin-web [18:58:57] [INF] [1] Main: Application directory: /home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/ [18:58:57] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /home/bond/.cache/jellyfin [18:58:57] [FTL] [1] Main: Error while starting server. System.InvalidOperationException: The server is expected to host the web client, but the provided content directory is either invalid or empty: /home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/jellyfin-web. If you do not want to host the web client with the server, you may set the '--nowebclient' command line flag, or set'hostwebclient=false' in your config settings. at Jellyfin.Server.Program.StartApp(StartupOptions options) in /home/bond/dev/jellyfin/Jellyfin.Server/Program.cs:line 179 [18:58:57] [INF] [1] Main: Running query planner optimizations in the database... This might take a while [18:58:57] [FTL] [1] Main: Unhandled Exception System.ArgumentNullException: Value cannot be null. (Parameter 'provider') at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider) at Emby.Server.Implementations.ApplicationHost.Resolve[T]() in /home/bond/dev/jellyfin/Emby.Server.Implementations/ApplicationHost.cs:line 415 at Jellyfin.Server.Program.StartApp(StartupOptions options) in /home/bond/dev/jellyfin/Jellyfin.Server/Program.cs:line 227 at Jellyfin.Server.Program.<Main>(String[] args) Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'provider') at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider) at Emby.Server.Implementations.ApplicationHost.Resolve[T]() in /home/bond/dev/jellyfin/Emby.Server.Implementations/ApplicationHost.cs:line 415 at Jellyfin.Server.Program.StartApp(StartupOptions options) in /home/bond/dev/jellyfin/Jellyfin.Server/Program.cs:line 227 at Jellyfin.Server.Program.<Main>(String[] args) ``` After: ``` [18:49:27] [INF] [1] Main: Jellyfin version: 10.8.0 [18:49:27] [INF] [1] Main: Environment Variables: ["[ASPNETCORE_URLS, http://localhost:8096]", "[ASPNETCORE_ENVIRONMENT, Development]", "[JELLYFIN_LOG_DIR, /home/bond/.local/share/jellyfin/log]", "[DOTNET_ROOT, /home/bond/dotnet]", "[DOTNET_CLI_TELEMETRY_OPTOUT, 1]"] [18:49:27] [INF] [1] Main: Arguments: ["/home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/jellyfin.dll"] [18:49:27] [INF] [1] Main: Operating system: Linux [18:49:27] [INF] [1] Main: Architecture: X64 [18:49:27] [INF] [1] Main: 64-Bit Process: True [18:49:27] [INF] [1] Main: User Interactive: True [18:49:27] [INF] [1] Main: Processor count: 16 [18:49:27] [INF] [1] Main: Program data path: /home/bond/.local/share/jellyfin [18:49:27] [INF] [1] Main: Web resources path: /home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/jellyfin-web [18:49:27] [INF] [1] Main: Application directory: /home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/ [18:49:27] [ERR] [1] Main: The server is expected to host the web client, but the provided content directory is either invalid or empty: /home/bond/dev/jellyfin/Jellyfin.Server/bin/Debug/net6.0/jellyfin-web. If you do not want to host the web client with the server, you may set the '--nowebclient' command line flag, or set'hostwebclient=false' in your config settings. [18:49:27] [INF] [2] Main: Received a SIGTERM signal, shutting down ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:32:38 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#11109