Product: PowerShell Universal
Version: 2.4.0 upgrade to 2.5.2
Running 2.4.0 installed with the MSI. Snapshotted the server, stopped the service, ran the 2.5.2 MSI to upgrade. After the install completed the service was started, but I couldn’t access the admin console or any of the dashboards. Every time I try and access a page an entry similar to this shows up in the logs
2021-11-11 13:36:38.979 -05:00 [DBG] Connection id "0HMD588PE54E9" accepted.
2021-11-11 13:36:38.981 -05:00 [DBG] Connection id "0HMD588PE54E9" started.
2021-11-11 13:36:39.007 -05:00 [DBG] Connection "0HMD588PE54E9" established using the following protocol: "Tls12"
2021-11-11 13:36:39.044 -05:00 [INF] Request starting HTTP/2 GET https://<SERVER>/ - -
2021-11-11 13:36:39.045 -05:00 [DBG] Wildcard detected, all requests with hosts will be allowed.
2021-11-11 13:36:39.049 -05:00 [ERR] Connection id "0HMD588PE54E9", Request id "0HMD588PE54E9:00000001": An unhandled exception was thrown by the application.
System.NullReferenceException: Object reference not set to an instance of an object.
at Universal.Server.Services.MyAuthenticationSchemeProvider.GetDefaultScheme(SchemeType type) in D:\a\universal\universal\src\Universal.Server\Services\AuthenticationSchemeProvider.cs:line 54
at Universal.Server.Services.MyAuthenticationSchemeProvider.GetDefaultAuthenticateSchemeAsync() in D:\a\universal\universal\src\Universal.Server\Services\AuthenticationSchemeProvider.cs:line 60
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
2021-11-11 13:36:39.060 -05:00 [INF] Request finished HTTP/2 GET https://<SERVER>/ - - - 500 0 - 18.1750ms
I reverted the server snapshot, rebooted the server, then tried the install again with the same results.
I looked at the auth.ps1 file and saw a new auth method in place for SAML2, which is strange since I never set that up. I removed that line, saved the ps1, and the same error appeared in the notifications. Here is a copy of my auth.ps1 file
Also, I’m not sure why your 2.4 snapshot would be affected by the 2.5 install but if you need to get back up and running just remove the -Type parameter from Set-PSUAuthenticationMethod.
Figured out why the snapshot was affected. I have 2 way sync enabled with git, so after the upgrade it sent the new files to my git server, and after reverting it brought them back down.
I did the upgrade to 2.5.2 again and remove those paremeters. Everything seems to be working fine now.
Is there a way to do one way git sync that will only push to git? I want the local copy to be the true source. One way sync seems to be the opposite.