Grpc.Core.Internal.PlatformApis Error after upgrade 5.0.5 -> 5.1.1

Hello, seeing the following error when trying to change Endpoints from integrated to any other environment type available. We are running on IIS.

Error Invalid configuration: endpoints.ps1 The type initializer for ‘Grpc.Core.Internal.PlatformApis’ threw an exception.

at Grpc.Core.Internal.PlatformApis.get_IsXamarinIOS()
at Grpc.Core.GrpcEnvironment.get_IsNativeShutdownAllowed()
at Grpc.Core.GrpcEnvironment.GrpcNativeInit()
at Grpc.Core.GrpcEnvironment…ctor()
at Grpc.Core.GrpcEnvironment.AddRef()
at Grpc.Core.Server…ctor(IEnumerable1 options) at Universal.Server.Services.ApiGrpc.StartAsync(ExecutionEnvironment environment) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\API\ApiGrpc.cs:line 38 at Universal.Server.Services.ApiService.GetOrCreateProxy(Endpoint endpoint) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\API\ApiService.cs:line 186 at Universal.Server.Services.ApiService.RemoveEndpointAsync(Endpoint endpoint) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\API\ApiService.cs:line 302 at UniversalAutomation.Services.EndpointService.UpdateAsync(ModelOperationContext1 context) in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\Configuration\Endpoints.cs:line 265
at UniversalAutomation.Services.ConfigurationScript`1.ReadAsync(SyncContext syncContext) in C:\actions-runner_work\universal\universal\src\PowerShellUniversal\ConfigurationScript.cs:line 456

Product: PowerShell Universal
Version: 5.1.1

As a follow up, even after doing a “clean” install of 5.1.1(Delete DB and Repo) . I am still seeing this error when switching from Integrated to either other default environment.

This is likely an assembly binding issue. Can you let me know what version of Windows you are running? This could be a result of a conflict with a module or some other .NET assembly.

I would also recommend ensuring you have the latest .NET Hosting bundle installed. Download .NET 8.0 (Linux, macOS, and Windows)

We ship the .NET runtime with the PSU but the hosting bundle is required for IIS.

Can you share how your environments are configured? Are they default?

Just ran the repair on the .NET 8.0 bundle and still same issues. Having said that, your comment made me look further into the environment and found what could possibly be the culprit. We tested a 3rd party vendor’s discovery software some time ago on this Dev box, and it appears that there are still some traces of it in our system.

Going to dig a bit deeper into it.

Additional details

dotnet --list-runtimes
Microsoft.AspNetCore.App 8.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

dotnet --list-sdks
8.0.404 [C:\Program Files\dotnet\sdk]

Ok. Let me know if you dig anything up. I’ve tried 5.1.1 on quite a few different machines and have never seen this issue so it’s hard for me to provide a workaround without knowing what’s causing it.