Open MattHarrisUltima opened 1 year ago
I have also reviewed the debug logs and can find the following error entries:
'''
2022-12-07 11:01:06.638 +00:00 [ERR] Failed to groom.
System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source) at PowerShellUniversal.MemoryTable
1.First() in C:\actions-runner_work\universal\universal\src\PowerShellUniversal\MemoryTable.cs:line 45
at UniversalAutomation.GroomService.GroomIdleTerminals() in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\GroomService.cs:line 56
at UniversalAutomation.GroomService.Groom() in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\GroomService.cs:line 263
2022-12-07 11:24:12.633 +00:00 [ERR] Error when dispatching 'OnDisconnectedAsync' on hub.
System.NullReferenceException: Object reference not set to an instance of an object.
at UniversalDashboard.TerminalHub.OnDisconnectedAsync(Exception exception) in C:\actions-runner_work\universal\universal\src\Universal.Server\Hubs\TerminalHub.cs:line 67
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher1.OnDisconnectedAsync(HubConnectionContext connection, Exception exception) at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher
1.OnDisconnectedAsync(HubConnectionContext connection, Exception exception)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.HubOnDisconnectedAsync(HubConnectionContext connection, Exception exception)
2022-12-07 11:24:12.804 +00:00 [DBG] The request has an origin header: 'https://scrubbed.scrubbed.io'. 2022-12-07 11:24:12.804 +00:00 [INF] CORS policy execution failed. 2022-12-07 11:24:12.804 +00:00 [INF] Request origin https://scrubbed.scrubbed.io does not have permission to access the resource.
2022-12-07 11:24:13.295 +00:00 [INF] Request starting HTTP/1.1 GET http://scrubbed.scrubbed.io/terminalhub?id=JzaNQaAr-R6BhwsnxqG5vg - - 2022-12-07 11:24:13.304 +00:00 [DBG] The request has an origin header: 'https://scrubbed.scrubbed.io'. 2022-12-07 11:24:13.305 +00:00 [INF] CORS policy execution failed. 2022-12-07 11:24:13.305 +00:00 [INF] Request origin https://scrubbed.scrubbed.io does not have permission to access the resource. 2022-12-07 11:24:13.305 +00:00 [DBG] The request path /terminalhub does not match a supported file type 2022-12-07 11:24:13.305 +00:00 [DBG] The request path does not match the path filter 2022-12-07 11:24:13.306 +00:00 [DBG] 1 candidate(s) found for the request path '/terminalhub'
2022-12-07 11:50:24.843 +00:00 [ERR] Failed disposing connection AuzyVb5GsTxlI-JSxKgA9g.
System.NullReferenceException: Object reference not set to an instance of an object.
at UniversalDashboard.TerminalHub.OnDisconnectedAsync(Exception exception) in C:\actions-runner_work\universal\universal\src\Universal.Server\Hubs\TerminalHub.cs:line 70
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher1.OnDisconnectedAsync(HubConnectionContext connection, Exception exception) at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher
1.OnDisconnectedAsync(HubConnectionContext connection, Exception exception)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler1.HubOnDisconnectedAsync(HubConnectionContext connection, Exception exception) at Microsoft.AspNetCore.SignalR.HubConnectionHandler
1.RunHubAsync(HubConnectionContext connection)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler1.OnConnectedAsync(ConnectionContext connection) at Microsoft.AspNetCore.SignalR.HubConnectionHandler
1.OnConnectedAsync(ConnectionContext connection)
at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionContext.ExecuteApplication(ConnectionDelegate connectionDelegate)
at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionContext.WaitOnTasks(Task applicationTask, Task transportTask, Boolean closeGracefully)
at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionContext.DisposeAsync(Boolean closeGracefully)
at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager.DisposeAndRemoveAsync(HttpConnectionContext connection, Boolean closeGracefully)
2022-12-07 11:50:24.861 +00:00 [ERR] Error when dispatching 'OnDisconnectedAsync' on hub.
System.NullReferenceException: Object reference not set to an instance of an object.
at UniversalDashboard.TerminalHub.OnDisconnectedAsync(Exception exception) in C:\actions-runner_work\universal\universal\src\Universal.Server\Hubs\TerminalHub.cs:line 70
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher1.OnDisconnectedAsync(HubConnectionContext connection, Exception exception) at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher
1.OnDisconnectedAsync(HubConnectionContext connection, Exception exception)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.HubOnDisconnectedAsync(HubConnectionContext connection, Exception exception)
2022-12-07 11:50:24.866 +00:00 [DBG] OnConnectedAsync ending.
2022-12-07 11:56:41.280 +00:00 [ERR] Failed to groom.
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
---> System.ComponentModel.Win32Exception (258): Unknown error 258
at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParserStateObject.ThrowExceptionAndWarning(Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error) at Microsoft.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync() at Microsoft.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket() at Microsoft.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer() at Microsoft.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value) at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData() at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource
1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)
at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.Enumerator.InitializeReader(Enumerator enumerator) at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.<>c__DisplayClass31_0
2.3 operation, Func
3 verifySucceeded, TState state)
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func
3 verifySucceeded)
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.Enumerator.MoveNext() at System.Collections.Generic.List
1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)
at PowerShellUniversal.SQL.SqlTable1.ToList() in C:\actions-runner\_work\universal\universal\src\PowerShellUniversal.SQL\Database.cs:line 606 at UniversalAutomation.GroomService.ScriptLevelGroom() in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GroomService.cs:line 140 at UniversalAutomation.GroomService.Groom() in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GroomService.cs:line 276 ClientConnectionId:5ac560fa-c63e-44d3-8bbf-1cf7961e05b1 Error Number:-2,State:0,Class:11 2022-12-07 11:56:41.302 +00:00 [INF] Finished groom job. 2022-12-07 11:56:41.416 +00:00 [WRN] Failed to process the job '489178': an exception occurred. Retry attempt 1 of 10 will be performed in 00:00:25. Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (258): Unknown error 258 at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction)
at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at Microsoft.Data.SqlClient.TdsParserStateObject.ThrowExceptionAndWarning(Boolean callerHasConnectionLock, Boolean asyncClose)
at Microsoft.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at Microsoft.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
at Microsoft.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
at Microsoft.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
at Microsoft.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()
at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method) at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable
1.Enumerator.InitializeReader(Enumerator enumerator)
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.<>c__DisplayClass31_0`2.3 operation, Func
3 verifySucceeded, TState state)
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func
3 verifySucceeded)
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.Enumerator.MoveNext() at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable
1 source, Boolean& found)
at lambda_method895(Closure , QueryContext )
at PowerShellUniversal.SQL.SqlTable`1.FirstOrDefault() in C:\actions-runner_work\universal\universal\src\PowerShellUniversal.SQL\Database.cs:line 562
at PowerShellUniversal.GitSettingsService.GetSettings() in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\GitSettingsService.cs:line 74
at UniversalAutomation.GitSyncService.Sync(Boolean force) in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 117
ClientConnectionId:8db9ab9b-fe12-45c4-a410-64794f4ee949
Error Number:-2,State:0,Class:11
2022-12-07 12:35:23.699 +00:00 [ERR] Connection id "0HMMO89D4RANF", Request id "0HMMO89D4RANF:00000002": An unhandled exception was thrown by the application.
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
---> System.ComponentModel.Win32Exception (258): Unknown error 258
at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParserStateObject.ThrowExceptionAndWarning(Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error) at Microsoft.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync() at Microsoft.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket() at Microsoft.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer() at Microsoft.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value) at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData() at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource
1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)
at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.Enumerator.InitializeReader(Enumerator enumerator) at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.<>c__DisplayClass31_0
2.3 operation, Func
3 verifySucceeded, TState state)
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func
3 verifySucceeded)
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.Enumerator.MoveNext() at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable
1 source, Boolean& found)
at lambda_method773(Closure , QueryContext )
at PowerShellUniversal.SQL.SqlTable`1.Exists() in C:\actions-runner_work\universal\universal\src\PowerShellUniversal.SQL\Database.cs:line 546
at Universal.Server.Startup.<>c.1.Invoke(HttpContext context) in C:\actions-runner\_work\universal\universal\src\AspNetCoreRateLimit\Middleware\RateLimitMiddleware.cs:line 109 at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication
1 application)
ClientConnectionId:753d2b69-1480-47b9-bc84-3952cdbb62d8
Error Number:-2,State:0,Class:11
'''
Full Log files attached
The following behaviour has been observed in 3.6.0
Steps to Reproduce
We are currently experiencing several bugs in PowerShell Universal 3.5.5 and are unsure if they are related
We are receiving intermittent error messages while navigating PSU and running a get-module command as an api call: "TypeError: Cannot read properties of undefined (reading 'startsWith')":
These have been observed when navigating the main menu.
Unable to call modules in a terminal
We are attempting to integrate key vault into PSU. We have imported az.accounts and az.keyvault however our connection scripts do not work or generate stderr outputs. When we try to run connect-azaccounts manually, we receive errors informing us this can not be loaded:
Requests blocked by CORS policy.
We are receiving HTTP 500 errors when trying to log into our environments. A F12 inspect shows the following errors:
We are unsure if these are linked or separate issues, however we are experiencing them across more than 1 subscription. Further repository stored logs or container logs are available on request
Expected behavior
Actual behavior
Environment data
PSU 3.5.5
Visuals
No response