Product: PowerShell Universal
Version: 4.2.21
Hello,
I was recently attempting to update PowerShell Universal from 2.10.2 to 4.2.21 and have an issue where PowerShell Universal will not start due to an exception being uncaught.
Application: Universal.Server.exe
CoreCLR Version: 7.0.222.60605
.NET Version: 7.0.2
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException: The path is empty. (Parameter 'path')
at System.IO.Path.GetFullPath(String path)
at System.IO.FileInfo..ctor(String originalPath, String fullPath, String fileName, Boolean isNormalized)
at System.IO.FileInfo..ctor(String fileName)
at UniversalAutomation.LiteDBv5Database.SetupTables() in C:\actions-runner\_work\universal\universal\src\UniversalAutomation.LiteDBv5\LiteDBDatabase.cs:line 118
at UniversalAutomation.LiteDBv5Database..ctor(IServiceProvider serviceProvider, String connectionString) in C:\actions-runner\_work\universal\universal\src\UniversalAutomation.LiteDBv5\LiteDBDatabase.cs:line 87
at UniversalAutomation.LiteDBv5.DatabaseFeature.GetDatabase(IServiceProvider serviceProvider, String connectionString) in C:\actions-runner\_work\universal\universal\src\UniversalAutomation.LiteDBv5\Plugin.cs:line 41
at Universal.Server.Services.SystemPluginService.<>c__DisplayClass4_0.<AddDatabase>b__2(IServiceProvider x) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\SystemPluginService.cs:line 83
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at Universal.Server.Program.<>c__DisplayClass3_0.<Main>b__0(Options o) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Program.cs:line 80
at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
at Universal.Server.Program.Main(String[] args) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Program.cs:line 52
The MSI installer did create a new appsettings.json in %ProgramData%\PowerShellUniversal with the following Data settings:
},
"Plugins": [
"UniversalAutomation.LiteDBv5"
],
"Data": {
"RepositoryPath": "%ProgramData%\\UniversalAutomation\\Repository",
"ConnectionString": "Data Source=%ProgramData%\\UniversalAutomation\\database.db"
}
The existing appsettings.json in %ProgramData%\PowerShellUniversal\Server has the following connection string:
"ConnectionString": "filename=%ProgramData%\\UniversalAutomation\\database.db;upgrade=true",
I have tried various iterations of the ConnectionString: without upgrade=true, with Data Source= vs filename= and all result in a similar exception when trying to start the service.
We are not running PSU with IIS and relying on Kestrel for the web/admin UI.
Any help would be greatly appreciated.
Thanks,
Cameron Cox