Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Issue when creating a new Edge Device #1373

Closed
audserraCGI opened this issue Oct 18, 2022 · 0 comments · Fixed by #1379
Closed

Bug: Issue when creating a new Edge Device #1373

audserraCGI opened this issue Oct 18, 2022 · 0 comments · Fixed by #1379
Assignees
Labels
bug Something isn't working
Milestone

Comments

@audserraCGI
Copy link
Contributor

There seems to be a database issue when creating a new Edge Device.

Here's the error:

  "TraceId": "00-b08d31adb3f74984a5c61806617306e2-2e3a14d165c5970a-00",
  "ExceptionDetails": [
    {
      "Message": "23502: null value in column \"Scope\" of relation \"EdgeDevices\" violates not-null constraint\n\nDETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.",
      "Type": "Npgsql.PostgresException",
      "Raw": "Npgsql.PostgresException (0x80004005): 23502: null value in column \"Scope\" of relation \"EdgeDevices\" violates not-null constraint\n\nDETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.\n   at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|215_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)\n   at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)\n   at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)\n   at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)\n   at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)\n  Exception data:\n    Severity: ERROR\n    SqlState: 23502\n    MessageText: null value in column \"Scope\" of relation \"EdgeDevices\" violates not-null constraint\n    Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.\n    SchemaName: public\n    TableName: EdgeDevices\n    ColumnName: Scope\n    File: execMain.c\n    Line: 1883\n    Routine: ExecConstraints",
      "StackFrames": [
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|215_0(NpgsqlConnector connector, bool async, DataRowLoadingMode dataRowLoadingMode, bool readingNotifications, bool isReadingPrependedMessage)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Npgsql.NpgsqlDataReader.NextResult(bool async, bool isConsuming, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, bool async, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, bool async, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        }
      ]
    },
    {
      "Message": "An error occurred while saving the entity changes. See the inner exception for details.",
      "Type": "Microsoft.EntityFrameworkCore.DbUpdateException",
      "Raw": "Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.\n ---> Npgsql.PostgresException (0x80004005): 23502: null value in column \"Scope\" of relation \"EdgeDevices\" violates not-null constraint\n\nDETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.\n   at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|215_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)\n   at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)\n   at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)\n   at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)\n   at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)\n  Exception data:\n    Severity: ERROR\n    SqlState: 23502\n    MessageText: null value in column \"Scope\" of relation \"EdgeDevices\" violates not-null constraint\n    Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.\n    SchemaName: public\n    TableName: EdgeDevices\n    ColumnName: Scope\n    File: execMain.c\n    Line: 1883\n    Routine: ExecConstraints\n   --- End of inner exception stack trace ---\n   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)\n   at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)\n   at AzureIoTHub.Portal.Infrastructure.UnitOfWork`1.SaveAsync() in C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal.Infrastructure\\UnitOfWork.cs:line 31\n   at AzureIoTHub.Portal.Server.Services.EdgeDevicesService.CreateEdgeDeviceInDatabase(IoTEdgeDevice device) in C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal\\Server\\Services\\EdgeDevicesService.cs:line 170",
      "StackFrames": [
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable<ModificationCommandBatch> commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable<ModificationCommandBatch> commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable<ModificationCommandBatch> commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList<IUpdateEntry> entriesToSave, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, bool acceptAllChangesOnSuccess, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync<TState, TResult>(TState state, Func<DbContext, TState, CancellationToken, Task<TResult>> operation, Func<DbContext, TState, CancellationToken, Task<ExecutionResult<TResult>>> verifySucceeded, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(bool acceptAllChangesOnSuccess, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(bool acceptAllChangesOnSuccess, CancellationToken cancellationToken)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": "C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal.Infrastructure\\UnitOfWork.cs",
          "FileName": "C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal.Infrastructure\\UnitOfWork.cs",
          "Function": "AzureIoTHub.Portal.Infrastructure.UnitOfWork<TContext>.SaveAsync()",
          "Line": 31,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": "C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal\\Server\\Services\\EdgeDevicesService.cs",
          "FileName": "C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal\\Server\\Services\\EdgeDevicesService.cs",
          "Function": "AzureIoTHub.Portal.Server.Services.EdgeDevicesService.CreateEdgeDeviceInDatabase(IoTEdgeDevice device)",
          "Line": 170,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        }
      ]
    },
    {
      "Message": "Unable to create the device Demo789",
      "Type": "AzureIoTHub.Portal.Domain.Exceptions.InternalServerErrorException",
      "Raw": "AzureIoTHub.Portal.Domain.Exceptions.InternalServerErrorException: Unable to create the device Demo789\n ---> Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.\n ---> Npgsql.PostgresException (0x80004005): 23502: null value in column \"Scope\" of relation \"EdgeDevices\" violates not-null constraint\n\nDETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.\n   at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|215_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)\n   at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)\n   at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)\n   at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)\n   at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)\n  Exception data:\n    Severity: ERROR\n    SqlState: 23502\n    MessageText: null value in column \"Scope\" of relation \"EdgeDevices\" violates not-null constraint\n    Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.\n    SchemaName: public\n    TableName: EdgeDevices\n    ColumnName: Scope\n    File: execMain.c\n    Line: 1883\n    Routine: ExecConstraints\n   --- End of inner exception stack trace ---\n   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)\n   at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)\n   at AzureIoTHub.Portal.Infrastructure.UnitOfWork`1.SaveAsync() in C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal.Infrastructure\\UnitOfWork.cs:line 31\n   at AzureIoTHub.Portal.Server.Services.EdgeDevicesService.CreateEdgeDeviceInDatabase(IoTEdgeDevice device) in C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal\\Server\\Services\\EdgeDevicesService.cs:line 170\n   --- End of inner exception stack trace ---\n   at AzureIoTHub.Portal.Server.Services.EdgeDevicesService.CreateEdgeDeviceInDatabase(IoTEdgeDevice device) in C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal\\Server\\Services\\EdgeDevicesService.cs:line 176\n   at AzureIoTHub.Portal.Server.Services.EdgeDevicesService.CreateEdgeDevice(IoTEdgeDevice edgeDevice) in C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal\\Server\\Services\\EdgeDevicesService.cs:line 160\n   at AzureIoTHub.Portal.Server.Controllers.V10.EdgeDevicesController.CreateEdgeDeviceAsync(IoTEdgeDevice edgeDevice) in C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal\\Server\\Controllers\\v1.0\\EdgeDevicesController.cs:line 117\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)\n   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\n   at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)\n   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\n   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\n   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\n   at NetEscapades.AspNetCore.SecurityHeaders.SecurityHeadersMiddleware.Invoke(HttpContext context) in /_/src/NetEscapades.AspNetCore.SecurityHeaders/SecurityHeadersMiddleware.cs:line 68\n   at Hellang.Middleware.ProblemDetails.ProblemDetailsMiddleware.Invoke(HttpContext context)",
      "StackFrames": [
        {
          "FilePath": "C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal\\Server\\Services\\EdgeDevicesService.cs",
          "FileName": "C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal\\Server\\Services\\EdgeDevicesService.cs",
          "Function": "AzureIoTHub.Portal.Server.Services.EdgeDevicesService.CreateEdgeDeviceInDatabase(IoTEdgeDevice device)",
          "Line": 176,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": "C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal\\Server\\Services\\EdgeDevicesService.cs",
          "FileName": "C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal\\Server\\Services\\EdgeDevicesService.cs",
          "Function": "AzureIoTHub.Portal.Server.Services.EdgeDevicesService.CreateEdgeDevice(IoTEdgeDevice edgeDevice)",
          "Line": 160,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": "C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal\\Server\\Controllers\\v1.0\\EdgeDevicesController.cs",
          "FileName": "C:\\Users\\audrey.serra\\source\\repos\\azure-iot-hub-portal\\src\\AzureIoTHub.Portal\\Server\\Controllers\\v1.0\\EdgeDevicesController.cs",
          "Function": "AzureIoTHub.Portal.Server.Controllers.V10.EdgeDevicesController.CreateEdgeDeviceAsync(IoTEdgeDevice edgeDevice)",
          "Line": 117,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor+TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, object controller, object[] arguments)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "System.Threading.Tasks.ValueTask<TResult>.get_Result()",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "System.Runtime.CompilerServices.ValueTaskAwaiter<TResult>.GetResult()",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": "/_/src/NetEscapades.AspNetCore.SecurityHeaders/SecurityHeadersMiddleware.cs",
          "FileName": "SecurityHeadersMiddleware.cs",
          "Function": "NetEscapades.AspNetCore.SecurityHeaders.SecurityHeadersMiddleware.Invoke(HttpContext context)",
          "Line": 68,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        },
        {
          "FilePath": null,
          "FileName": null,
          "Function": "Hellang.Middleware.ProblemDetails.ProblemDetailsMiddleware.Invoke(HttpContext context)",
          "Line": null,
          "PreContextLine": null,
          "PreContextCode": null,
          "ContextCode": null,
          "PostContextCode": null
        }
      ]
    }
  ],
  "title": "Internal Server Error",
  "status": 500,
  "detail": "Unable to create the device Demo789"
}```
@audserraCGI audserraCGI added the bug Something isn't working label Oct 18, 2022
@audserraCGI audserraCGI moved this to 📝 Todo in IoT Hub Portal Oct 18, 2022
@Sben65 Sben65 self-assigned this Oct 19, 2022
@Sben65 Sben65 added this to the S43 milestone Oct 19, 2022
@Sben65 Sben65 moved this from 📝 Todo to 🚧 In Progress in IoT Hub Portal Oct 19, 2022
@Sben65 Sben65 moved this from 🚧 In Progress to 💬 Ready for Review in IoT Hub Portal Oct 19, 2022
@Sben65 Sben65 moved this from 💬 Ready for Review to 🚀 Ready in IoT Hub Portal Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🚀 Ready
Development

Successfully merging a pull request may close this issue.

2 participants