PowerShell Universal 1.5.0 Crashes after upgrade - Can not start

Product: PowerShell Universal
Version: 1.5.0

After completing upgrade from 1.4.6 (MSI) to 1.5.0 (MSI), PowerShell Universal service crashes shortly after starting. Replaced service runas account (reset to local system) back to the service account that was previously running the service.

The following error is logged in the application event log:
Application: Universal.Server.exe
CoreCLR Version: 4.700.19.56402
.NET Core Version: 3.1.0
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.Dictionary2[System.String,LiteDB.BsonValue]' to type 'System.String'. at lambda_method(Closure , Object , Object ) at LiteDB.BsonMapper.DeserializeObject(Type type, Object obj, BsonDocument value) at LiteDB.BsonMapper.Deserialize(Type type, BsonValue value) at LiteDB.BsonMapper.ToObject(Type type, BsonDocument doc) at LiteDB.BsonMapper.ToObject[T](BsonDocument doc) at LiteDB.LiteCollection1.Find(Query query, Int32 skip, Int32 limit)+MoveNext()
at LiteDB.LiteQueryable1.ToEnumerable()+MoveNext() at System.Collections.Generic.LargeArrayBuilder1.AddRange(IEnumerable1 items) at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at LiteDB.LiteQueryable1.ToArray()
at UniversalAutomation.LiteDBTable`1.ToArray() in D:\a\universal\universal\src\UniversalAutomation.LiteDB\LiteDBDatabase.cs:line 508
at UniversalAutomation.LiteDBDatabase.Seed() in D:\a\universal\universal\src\UniversalAutomation.LiteDB\LiteDBDatabase.cs:line 138
at UniversalAutomation.StartupService.StartAsync(CancellationToken cancellationToken) in D:\a\universal\universal\src\Universal.Server\Services\StartupService.cs:line 80
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.Main(String[] args) in D:\a\universal\universal\src\Universal.Server\Program.cs:line 31

No errors are reported in log file:
User profile is available. Using …
Starting sync… (a444e9b8)
Scheduling script …
Scheduling job …

Hi Ray,

We’ve fixed this issue for 1.5.1 (due out soon) but here’s a KB article about what’s happening. https://support.ironmansoftware.com/portal/en/kb/articles/powershell-universal-crashes-after-upgrade-to-1-5

1 Like