Dashboard and Automation scripts not working after upgrade to 2.0.1

Hello,

After updating to version 2.0.1, my Automation scripts and my Dashboard failed to run.

The PowerShell Universal service is running as another user. The rights are still OK and have not changed since version 2.0.

Here are the logs if that helps:

2021-06-07T10:14:39.2870361+02:00  [DBG] Hosting started (e6def423)
2021-06-07T10:14:39.4113329+02:00  [DBG] Agent Output: The native method "grpcsharp_batch_context_recv_status_on_client_error_string" does not exist (9ec84bd6)
2021-06-07T10:14:39.4465643+02:00  [INF] Job 182 started. (0cde8118)
2021-06-07T10:14:39.5800722+02:00  [DBG] Job 182 bound to port 50613. (b4ecc08f)
2021-06-07T10:14:39.5808078+02:00  [DBG] Starting C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe with command line  -NoProfile -Command "& { [System.Reflection.Assembly]::LoadFrom('C:\Program Files (x86)\Universal\Host-v5\Host.dll') | Out-Null; [UniversalHost.AgentService]::StartJob(50613, 3996, $True) }" (00dcdce8)
2021-06-07T10:14:39.5808245+02:00  [INF] Starting job using Process. (4d0a5a43)
2021-06-07T10:14:40.2809882+02:00  [DBG] Agent Output:  (06fd9dc3)
2021-06-07T10:14:40.2855260+02:00  [INF] Job 180 started. (476a48f9)
2021-06-07T10:14:40.3038199+02:00  [DBG] Job 180 bound to port 50614. (024dfaff)
2021-06-07T10:14:40.3040725+02:00  [DBG] Starting C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe with command line  -NoProfile -Command "& { [System.Reflection.Assembly]::LoadFrom('C:\Program Files (x86)\Universal\Host-v5\Host.dll') | Out-Null; [UniversalHost.AgentService]::StartJob(50614, 3996, $True) }" (59e5462e)
2021-06-07T10:14:40.3040818+02:00  [INF] Starting job using Process. (4d0a5a43)
2021-06-07T10:14:41.3020227+02:00  [INF] Job 181 started. (fdcfe35c)
2021-06-07T10:14:41.3209156+02:00  [DBG] Job 181 bound to port 50615. (14276418)
2021-06-07T10:14:41.3212260+02:00  [DBG] Starting C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe with command line  -NoProfile -Command "& { [System.Reflection.Assembly]::LoadFrom('C:\Program Files (x86)\Universal\Host-v5\Host.dll') | Out-Null; [UniversalHost.AgentService]::StartJob(50615, 3996, $True) }" (f22f6770)
2021-06-07T10:14:41.3212568+02:00  [INF] Starting job using Process. (4d0a5a43)
2021-06-07T10:14:42.2897943+02:00  [INF] Job 183 started. (cb532308)
2021-06-07T10:14:42.3291561+02:00  [DBG] Job 183 bound to port 50616. (c16d43f4)
2021-06-07T10:14:42.3294380+02:00  [DBG] Starting C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe with command line  -NoProfile -Command "& { [System.Reflection.Assembly]::LoadFrom('C:\Program Files (x86)\Universal\Host-v5\Host.dll') | Out-Null; [UniversalHost.AgentService]::StartJob(50616, 3996, $True) }" (375bc7b7)
2021-06-07T10:14:42.3294509+02:00  [INF] Starting job using Process. (4d0a5a43)
2021-06-07T10:14:42.8819711+02:00  [DBG] Agent Output:  (06fd9dc3)
2021-06-07T10:14:42.8820091+02:00  [DBG] Agent Output:  (06fd9dc3)
2021-06-07T10:14:42.8820755+02:00  [DBG] Agent Output:  (06fd9dc3)
2021-06-07T10:14:42.8820867+02:00  [DBG] Agent Output:  (06fd9dc3)
2021-06-07T10:14:42.8914581+02:00  [DBG] Connection id ""0HM99HH6UHF4E"" accepted. (b16f4713)
2021-06-07T10:14:42.8923092+02:00  [DBG] Connection id ""0HM99HH6UHF4F"" accepted. (b16f4713)
2021-06-07T10:14:42.8924957+02:00  [DBG] Connection id ""0HM99HH6UHF4G"" accepted. (b16f4713)
2021-06-07T10:14:42.8931517+02:00  [DBG] Connection id ""0HM99HH6UHF4E"" started. (1426b994)
2021-06-07T10:14:42.9193984+02:00 0HM99HH6UHF4E:00000002 [INF] Request starting HTTP/1.1 GET http://localhost:5000/api/v1/accessible - - (ca22a1cb)
2021-06-07T10:14:42.9214614+02:00 0HM99HH6UHF4E:00000002 [DBG] Wildcard detected, all requests with hosts will be allowed. (af1c1e85)
2021-06-07T10:14:42.9521290+02:00 0HM99HH6UHF4E:00000002 [DBG] AuthenticationScheme: "Cookies" was successfully authenticated. (1805f3b3)
2021-06-07T10:14:42.9729504+02:00 0HM99HH6UHF4E:00000002 [DBG] The request path "/api/v1/accessible" does not match a supported file type (4910e68e)
2021-06-07T10:14:42.9918674+02:00 0HM99HH6UHF4E:00000002 [DBG] The request path "" does not match the path filter (c4ce145c)
2021-06-07T10:14:43.0056116+02:00  [DBG] Dashboard framework already exists. (f14ac959)
2021-06-07T10:14:43.0056307+02:00  [DBG] Loading framework in: C:\Program Files (x86)\Universal\UniversalDashboard\Frameworks\v3 (1f215349)
2021-06-07T10:14:43.0348689+02:00 0HM99HH6UHF4E:00000002 [DBG] 1 candidate(s) found for the request path '"/api/v1/accessible"' (9406aaa8)
2021-06-07T10:14:43.0398275+02:00 0HM99HH6UHF4E:00000002 [DBG] Endpoint '"UniversalAutomation.AliveController.Accessible (UniversalAutomation)"' with route pattern '"api/v1/accessible"' is valid for the request path '"/api/v1/accessible"' (430aaaf2)
2021-06-07T10:14:43.0401552+02:00 0HM99HH6UHF4E:00000002 [DBG] Request matched endpoint '"UniversalAutomation.AliveController.Accessible (UniversalAutomation)"' (cbf60c4b)
2021-06-07T10:14:43.0743406+02:00 0HM99HH6UHF4E:00000002 [DBG] AuthenticationScheme: "Cookies" was successfully authenticated. (1805f3b3)
2021-06-07T10:14:43.0858169+02:00 0HM99HH6UHF4E:00000002 [DBG] AuthenticationScheme: "Bearer" was not authenticated. (1152f827)
2021-06-07T10:14:43.0877669+02:00 0HM99HH6UHF4E:00000002 [INF] Authorization was successful. (0d575a54)
2021-06-07T10:14:43.0883836+02:00 0HM99HH6UHF4E:00000002 [INF] Executing endpoint '"UniversalAutomation.AliveController.Accessible (UniversalAutomation)"' (500cc934)
2021-06-07T10:14:43.0941445+02:00 0HM99HH6UHF4E:00000002 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"] (5a801ab3)
2021-06-07T10:14:43.1062969+02:00 0HM99HH6UHF4E:00000002 [INF] Route matched with "{action = \"Accessible\", controller = \"Alive\"}". Executing controller action with signature "Microsoft.AspNetCore.Mvc.IActionResult Accessible()" on controller "UniversalAutomation.AliveController" ("UniversalAutomation"). (122b2fdf)
2021-06-07T10:14:43.1073125+02:00 0HM99HH6UHF4E:00000002 [DBG] Execution plan of "authorization" filters (in the following order): ["None"] (6a7aea5c)
2021-06-07T10:14:43.1074156+02:00 0HM99HH6UHF4E:00000002 [DBG] Execution plan of "resource" filters (in the following order): ["Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter"] (6a7aea5c)
2021-06-07T10:14:43.1074678+02:00 0HM99HH6UHF4E:00000002 [DBG] Execution plan of "action" filters (in the following order): ["Microsoft.AspNetCore.Mvc.Filters.ControllerActionFilter (Order: -2147483648)", "Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)"] (6a7aea5c)
2021-06-07T10:14:43.1075064+02:00 0HM99HH6UHF4E:00000002 [DBG] Execution plan of "exception" filters (in the following order): ["None"] (6a7aea5c)
2021-06-07T10:14:43.1075376+02:00 0HM99HH6UHF4E:00000002 [DBG] Execution plan of "result" filters (in the following order): ["Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter"] (6a7aea5c)
2021-06-07T10:14:43.1081757+02:00 0HM99HH6UHF4E:00000002 [DBG] Executing controller factory for controller "UniversalAutomation.AliveController" ("UniversalAutomation") (9650b6ae)
2021-06-07T10:14:43.1085295+02:00 0HM99HH6UHF4E:00000002 [DBG] Executed controller factory for controller "UniversalAutomation.AliveController" ("UniversalAutomation") (65418032)
2021-06-07T10:14:43.1093710+02:00 0HM99HH6UHF4E:00000002 [INF] Returning user information (f14d189f)
2021-06-07T10:14:43.1151967+02:00 0HM99HH6UHF4E:00000002 [INF] Executing JsonResult, writing value of type '"<>f__AnonymousType0`4[[System.String, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String[], System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[<>f__AnonymousType1`1[[PowerShellUniversal.AccessControlType, PowerShellUniversal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], UniversalAutomation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"'. (2f513669)
2021-06-07T10:14:43.1263536+02:00 0HM99HH6UHF4E:00000002 [DBG] The response will be compressed with '"gzip"'. (468e3546)
2021-06-07T10:14:43.1375828+02:00 0HM99HH6UHF4E:00000002 [INF] Executed action "UniversalAutomation.AliveController.Accessible (UniversalAutomation)" in 23.9283ms (afa2e885)
2021-06-07T10:14:43.1379733+02:00 0HM99HH6UHF4E:00000002 [INF] Executed endpoint '"UniversalAutomation.AliveController.Accessible (UniversalAutomation)"' (99874f2b)
2021-06-07T10:14:43.1397219+02:00 0HM99HH6UHF4E:00000002 [DBG] Connection id ""0HM99HH6UHF4E"" completed keep alive response. (9784cde9)
2021-06-07T10:14:43.1403576+02:00 0HM99HH6UHF4E:00000002 [INF] Request finished HTTP/1.1 GET http://localhost:5000/api/v1/accessible - - - 200 - application/json;+charset=utf-8 223.9502ms (791a596a)
2021-06-07T10:14:43.7997231+02:00  [DBG] Connection id ""0HM99HH6UHF4F"" started. (1426b994)
2021-06-07T10:14:43.8039597+02:00 0HM99HH6UHF4F:00000002 [INF] Request starting HTTP/1.1 POST http://localhost:5000/notificationhub/negotiate?negotiateVersion=1 text/plain;charset=UTF-8 0 (ca22a1cb)
2021-06-07T10:14:43.8050983+02:00 0HM99HH6UHF4F:00000002 [DBG] AuthenticationScheme: "Cookies" was successfully authenticated. (1805f3b3)
2021-06-07T10:14:43.8068098+02:00 0HM99HH6UHF4F:00000002 [DBG] The request has an origin header: '"http://localhost:5000"'. (e0d3e4a6)
2021-06-07T10:14:43.8070132+02:00 0HM99HH6UHF4F:00000002 [INF] CORS policy execution failed. (09b6f179)
2021-06-07T10:14:43.8070361+02:00 0HM99HH6UHF4F:00000002 [INF] Request origin "http://localhost:5000" does not have permission to access the resource. (a03d560b)
2021-06-07T10:14:43.8074063+02:00 0HM99HH6UHF4F:00000002 [DBG] "POST" requests are not supported (1c759b4c)
2021-06-07T10:14:43.8074844+02:00 0HM99HH6UHF4F:00000002 [DBG] "POST" requests are not supported (1c759b4c)
2021-06-07T10:14:43.8084143+02:00 0HM99HH6UHF4F:00000002 [DBG] 1 candidate(s) found for the request path '"/notificationhub/negotiate"' (9406aaa8)
2021-06-07T10:14:43.8084874+02:00 0HM99HH6UHF4F:00000002 [DBG] Request matched endpoint '"/notificationhub/negotiate"' (cbf60c4b)
2021-06-07T10:14:43.8100566+02:00 0HM99HH6UHF4F:00000002 [INF] Executing endpoint '"/notificationhub/negotiate"' (500cc934)
2021-06-07T10:14:43.8112831+02:00 0HM99HH6UHF4F:00000002 [DBG] New connection "WgJBOQIAKaqcr7UKaxw2xg" created. (6fadaaee)
2021-06-07T10:14:43.8222382+02:00 0HM99HH6UHF4F:00000002 [DBG] Sending negotiation response. (898972b7)
2021-06-07T10:14:43.8225708+02:00 0HM99HH6UHF4F:00000002 [DBG] The response will be compressed with '"gzip"'. (468e3546)
2021-06-07T10:14:43.8230709+02:00 0HM99HH6UHF4F:00000002 [INF] Executed endpoint '"/notificationhub/negotiate"' (99874f2b)
2021-06-07T10:14:43.8232933+02:00 0HM99HH6UHF4F:00000002 [DBG] Connection id ""0HM99HH6UHF4F"" completed keep alive response. (9784cde9)
2021-06-07T10:14:43.8235125+02:00 0HM99HH6UHF4F:00000002 [INF] Request finished HTTP/1.1 POST http://localhost:5000/notificationhub/negotiate?negotiateVersion=1 text/plain;charset=UTF-8 0 - 200 - application/json 19.5000ms (791a596a)
2021-06-07T10:14:43.8237447+02:00  [DBG] Connection id ""0HM99HH6UHF4G"" started. (1426b994)
2021-06-07T10:14:43.8773941+02:00  [DBG] Connection id ""0HM99HH6UHF4H"" accepted. (b16f4713)
2021-06-07T10:14:43.8781602+02:00  [DBG] Connection id ""0HM99HH6UHF4H"" started. (1426b994)
2021-06-07T10:14:43.8809931+02:00 0HM99HH6UHF4H:00000002 [INF] Request starting HTTP/1.1 GET http://localhost:5000/notificationhub?id=8cg6GNjeQul5AVHHs9sM8Q - - (ca22a1cb)
2021-06-07T10:14:43.8858269+02:00 0HM99HH6UHF4H:00000002 [DBG] AuthenticationScheme: "Cookies" was successfully authenticated. (1805f3b3)
2021-06-07T10:14:43.8861945+02:00 0HM99HH6UHF4H:00000002 [DBG] The request has an origin header: '"http://localhost:5000"'. (e0d3e4a6)
2021-06-07T10:14:43.8862236+02:00 0HM99HH6UHF4H:00000002 [INF] CORS policy execution failed. (09b6f179)
2021-06-07T10:14:43.8862366+02:00 0HM99HH6UHF4H:00000002 [INF] Request origin "http://localhost:5000" does not have permission to access the resource. (a03d560b)
2021-06-07T10:14:43.8863946+02:00 0HM99HH6UHF4H:00000002 [DBG] The request path "/notificationhub" does not match a supported file type (4910e68e)
2021-06-07T10:14:43.8869362+02:00 0HM99HH6UHF4H:00000002 [DBG] The request path "" does not match the path filter (c4ce145c)
2021-06-07T10:14:43.8869998+02:00 0HM99HH6UHF4H:00000002 [DBG] 1 candidate(s) found for the request path '"/notificationhub"' (9406aaa8)
2021-06-07T10:14:43.8870234+02:00 0HM99HH6UHF4H:00000002 [DBG] Request matched endpoint '"/notificationhub"' (cbf60c4b)
2021-06-07T10:14:43.8894582+02:00 0HM99HH6UHF4H:00000002 [INF] Executing endpoint '"/notificationhub"' (500cc934)
2021-06-07T10:14:43.8957964+02:00 0HM99HH6UHF4H:00000002 [DBG] Establishing new connection. (6a968e45)
2021-06-07T10:14:43.9311809+02:00 0HM99HH6UHF4H:00000002 [DBG] Socket opened using Sub-Protocol: 'null'. (021bc393)
2021-06-07T10:14:43.9483932+02:00 0HM99HH6UHF4H:00000002 [DBG] OnConnectedAsync started. (d90d43b4)
2021-06-07T10:14:43.9590159+02:00 0HM99HH6UHF4H:00000002 [DBG] Found protocol implementation for requested protocol: "json". (c5c3bb54)
2021-06-07T10:14:43.9607638+02:00 0HM99HH6UHF4H:00000002 [DBG] Completed connection handshake. Using HubProtocol '"json"'. (421947a1)
2021-06-07T10:14:44.0694313+02:00  [DBG] Dashboard framework already exists. (f14ac959)
2021-06-07T10:14:44.0696450+02:00  [DBG] Loading component in: C:\Program Files (x86)\Universal\UniversalDashboard\Components\UniversalDashboard.Charts (eb57509a)
2021-06-07T10:14:44.2402243+02:00  [DBG] Dashboard component already exists. (4cfe4bd7)
2021-06-07T10:14:44.2402546+02:00  [DBG] Loading component in: C:\Program Files (x86)\Universal\UniversalDashboard\Components\UniversalDashboard.CodeEditor (39043934)
2021-06-07T10:14:44.4207292+02:00  [DBG] Dashboard component already exists. (4cfe4bd7)
2021-06-07T10:14:44.4207529+02:00  [DBG] Loading component in: C:\Program Files (x86)\Universal\UniversalDashboard\Components\UniversalDashboard.Map (157c8e84)
2021-06-07T10:14:44.5571194+02:00  [DBG] Dashboard component already exists. (4cfe4bd7)
2021-06-07T10:14:44.5571407+02:00  [DBG] Loading component in: C:\Program Files (x86)\Universal\UniversalDashboard\Components\UniversalDashboard.Style (1bba9d8d)
2021-06-07T10:14:44.6003567+02:00  [INF] Error executing job 182: Did not receive port from client process.    at UniversalAutomation.Services.GrpcExecutionService.ExecuteScript(Job job, ExecutionEnvironment environment, executeScriptRequest request, ExecutionCallback executionCallback) in D:\a\universal\universal\src\UniversalAutomation\Services\Automation\GrpcExecutionService.cs:line 62
   at UniversalAutomation.ExecutionService.ExecutePowerShell(Script script, IEnumerable`1 parameters, Job job, Schedule schedule, ExecutionCallback callback) in D:\a\universal\universal\src\UniversalAutomation\Services\Automation\ExecutionService.cs:line 574
   at UniversalAutomation.ExecutionService.TryExecute(Job job, Schedule schedule) in D:\a\universal\universal\src\UniversalAutomation\Services\Automation\ExecutionService.cs:line 311
   at UniversalAutomation.ExecutionService.Execute(Job job, Schedule schedule) in D:\a\universal\universal\src\UniversalAutomation\Services\Automation\ExecutionService.cs:line 180 System.Exception (b97392ab)

Thanks for your help

Product: PowerShell Universal
Version: 2.0.1

Can you enable job debugging for me? You’ll find a setting named JobDebugging. Set that to true. It will cause psu.x.txt files to be created in the %TEMP% directory. These will contain the raw output from the job processes that are failing to communicate back.