immense / Remotely

A remote control and remote scripting solution, built with .NET 8, Blazor, and SignalR.
GNU General Public License v3.0
4.47k stars 1.61k forks source link

Unable to delete script nor script schedule #816

Closed MartinRas closed 7 months ago

MartinRas commented 7 months ago

Hey, when trying to delete a script or a script schedule, I got "Unhandled exception" error. Its impossible for me to get rid of the od script and schedule as well. Would you please check. The issue has been there in previous version for me

Reproduce: go to scripts, choose one, click Delete error appears immediately. In the server log there is "FOREIGN KEY constraint failed" error visible (log attached below)

Remotely Version Server 2024.02.22.1231 Agent 2024.02.22.1231

Expected Behavior Delete the script or script schedule

Screenshots image

image

I am running Remotely in Docker and not on my QNAP, Synology, or Internet Connected Toaster

2024-02-23 09:44:40.327 +00:00 [WRN] Unhandled exception rendering component: An error occurred while saving the entity changes. See the inner exception for details. { EventId: { Id: 100, Name: "ExceptionRenderingComponent" }, SourceContext: "Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer", TransportConnectionId: "EjxG3otcaJcp8Xvbj5XdIw", RequestId: "0HN1KA5KC2FCA:00000001", RequestPath: "/_blazor", ConnectionId: "0HN1KA5KC2FCA", ThreadId: 22 } Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'FOREIGN KEY constraint failed'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Remotely.Server.Services.DataService.DeleteSavedScript(Guid scriptId) in D:\a\1\s\Server\Services\DataService.cs:line 915 at Remotely.Server.Components.Scripts.SavedScripts.DeleteSelectedScript() in D:\a\1\s\Server\Components\Scripts\SavedScripts.razor.cs:line 118 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState) 2024-02-23 09:44:40.333 +00:00 [ERR] Unhandled exception in circuit '8dqtGITc2Cxu8lBdOQzf9RUQyrmLEXNHv72Qq7INSA4'. { EventId: { Id: 111, Name: "CircuitUnhandledException" }, SourceContext: "Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost", TransportConnectionId: "EjxG3otcaJcp8Xvbj5XdIw", RequestId: "0HN1KA5KC2FCA:00000001", RequestPath: "/_blazor", ConnectionId: "0HN1KA5KC2FCA", ThreadId: 22 } Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'FOREIGN KEY constraint failed'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Remotely.Server.Services.DataService.DeleteSavedScript(Guid scriptId) in D:\a\1\s\Server\Services\DataService.cs:line 915 at Remotely.Server.Components.Scripts.SavedScripts.DeleteSelectedScript() in D:\a\1\s\Server\Components\Scripts\SavedScripts.razor.cs:line 118 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

PmPPolska commented 7 months ago

Point is that server try to help get a urs timestamp Ur surf at the sandbox pall...Neet to lathern...

pt., 23 lut 2024, 10:57: MartinRasendorfer @.***> napisał(a):

Hey, when trying to delete a script or a script schedule, I got "Unhandled exception" error. Its impossible for me to get rid of the od script and schedule as well. Would you please check. The issue has been there in previous version for me

Reproduce: go to scripts, choose one, click Delete error appears immediately. In the server log there is "FOREIGN KEY constraint failed" error visible (log attached below)

Remotely Version Server 2024.02.22.1231 Agent 2024.02.22.1231

Expected Behavior Delete the script or script schedule

Screenshots image.png (view on web) https://github.com/immense/Remotely/assets/37659391/ae6f0cdf-e501-42b9-b49d-cbc6a3d670c0

image.png (view on web) https://github.com/immense/Remotely/assets/37659391/9157af55-c273-4579-bcd1-34d0601e7b42

I am running Remotely in Docker and not on my QNAP, Synology, or Internet Connected Toaster

2024-02-23 09:44:40.327 +00:00 [WRN] Unhandled exception rendering component: An error occurred while saving the entity changes. See the inner exception for details. { EventId: { Id: 100, Name: "ExceptionRenderingComponent" }, SourceContext: "Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer", TransportConnectionId: "EjxG3otcaJcp8Xvbj5XdIw", RequestId: "0HN1KA5KC2FCA:00000001", RequestPath: "/_blazor", ConnectionId: "0HN1KA5KC2FCA", ThreadId: 22 } Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'FOREIGN KEY constraint failed'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Remotely.Server.Services.DataService.DeleteSavedScript(Guid scriptId) in D:\a\1\s\Server\Services\DataService.cs:line 915 at Remotely.Server.Components.Scripts.SavedScripts.DeleteSelectedScript() in D:\a\1\s\Server\Components\Scripts\SavedScripts.razor.cs:line 118 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState) 2024-02-23 09:44:40.333 +00:00 [ERR] Unhandled exception in circuit '8dqtGITc2Cxu8lBdOQzf9RUQyrmLEXNHv72Qq7INSA4'. { EventId: { Id: 111, Name: "CircuitUnhandledException" }, SourceContext: "Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost", TransportConnectionId: "EjxG3otcaJcp8Xvbj5XdIw", RequestId: "0HN1KA5KC2FCA:00000001", RequestPath: "/_blazor", ConnectionId: "0HN1KA5KC2FCA", ThreadId: 22 } Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'FOREIGN KEY constraint failed'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Remotely.Server.Services.DataService.DeleteSavedScript(Guid scriptId) in D:\a\1\s\Server\Services\DataService.cs:line 915 at Remotely.Server.Components.Scripts.SavedScripts.DeleteSelectedScript() in D:\a\1\s\Server\Components\Scripts\SavedScripts.razor.cs:line 118 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

— Reply to this email directly, view it on GitHub https://github.com/immense/Remotely/issues/816, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDJKZVDSKCFUGYR4GGGU57LYVBR2JAVCNFSM6AAAAABDWNZCVKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2TANZUHAZDMMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>