Upgrade to 5.0 from 4.3.4 failed 3 times

I have a PU 4.3.4 instance installed via MSI locally on my laptop (Windows 11 23H2) for developmental purposes. FYI, i have the UniversalAutomation folder moved to my D drive so the original install is modified from default. I followed the upgrade directions and backed up my existing config and database. Then i ran the MSI install for an upgrade to 5.0. The first two times i ran the MSI just by double clicking it. No UAC prompt. The third time i used command line to run the MSI as administrator. All three times the install failed at starting the PowershellUniversal service.
First question: The install asks for a service account. As i run this locally for development purposes my service runs a local system. First attempt to upgrade i left the service account request blank. Second attempt i entered the local system as the service account user and left password blank. Third attempt (as admin) i left the service acount blank. I have never had to enter the service account before for an upgrade of PU. Is this change in behavior intentional? How do i direct it to run as local system?
Second Question: Why is it failing at starting the service? Since the install fails at this point i checked the logs. The MSI*.log said this: “Error 1923. Service ‘PowerShell Universal’ (PowerShellUniversal) could not be installed. Verify that you have sufficient privileges to install system services.”
Here is what shows in the system logs:
2024-08-23 07:49:45.328 -05:00 [FTL] Fatal error starting PowerShell Universal.
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: ‘table “GitBundles” already exists’.

  • at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)*
  • at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext()*
  • at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()*
  • at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()*
  • at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)*
  • at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()*
  • at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()*
  • at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQuery(RelationalCommandParameterObject parameterObject)*
  • at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)*
  • at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)*
  • at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)*
  • at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.Migrate(DatabaseFacade databaseFacade)*
  • at PowerShellUniversal.SQLite.DatabaseFeature.InitializeDatabase(IConfiguration configuration) in C:\actions-runner_work\universal\universal\src\PowerShellUniversal.SQLite\Plugin.cs:line 53*
  • at Universal.Server.Services.SystemPluginService…ctor(IConfiguration configuration) in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\SystemPluginService.cs:line 55*
  • at Universal.Server.Startup.ConfigureServices(IServiceCollection services) in C:\actions-runner_work\universal\universal\src\Universal.Server\Startup.cs:line 65*
  • at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)*
  • at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)*
  • at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)*
  • at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)*
  • at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services, Object instance)*
  • at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass7_0.b__0(HostBuilderContext context, IServiceCollection services)*
  • at Microsoft.Extensions.Hosting.HostBuilder.InitializeServiceProvider()*
  • at Microsoft.Extensions.Hosting.HostBuilder.Build()*
  • at Universal.Server.Program.Main(String args) in C:\actions-runner_work\universal\universal\src\Universal.Server\Program.cs:line 34*

We released a patch version (5.0.1) this morning to resolve this.

Thank you for the heads up. i will download the new version and try again

1 Like

The 5.0.1 upgrade install worked as expected.