[SOLVD] Error with opening swagger.json in last version

I have…

  • [x] Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.

I’m submitting a…

  • [x] Regression (a behavior that stopped working in a new release)
  • [x] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

Error during swagger.json opening

ysynb  {
ysynb    "logLevel": "Error",
ysynb    "message": "An unexpected exception has occurred.",
ysynb    "timestamp": "2021-11-22T18:05:47Z",
ysynb    "app": {
ysynb      "name": "Squidex",
ysynb      "version": "6.2.0.0",
ysynb      "sessionId": "54bd4c6c-344f-483f-97b6-8135858922b8"
ysynb    },
ysynb    "web": {
ysynb      "requestId": "00-40acc3acf56143feb24fdc5e14300f7c-6dda0c39ded6a0b4-01",
ysynb      "requestPath": "/content/gaetano-1/swagger/v1/swagger.json",
ysynb      "requestMethod": "GET",
ysynb      "routeValues": {
ysynb        "area": "Api",
ysynb        "action": "GetOpenApi",
ysynb        "controller": "ContentOpenApi"
ysynb      }
ysynb    },
ysynb    "exception": {
ysynb      "type": "System.NullReferenceException",
ysynb      "message": "Object reference not set to an instance of an object.",
ysynb      "stackTrace": "   at Squidex.Domain.Apps.Entities.AppProviderExtensions.\u003C\u003Ec__DisplayClass0_0.\u003C\u003CGetComponentsAsync\u003Eg__ResolveWithIdsAsync|0\u003Ed.MoveNext() in /src/src/Squidex.Domain.Apps.Entities/AppProviderExtensions.cs:line 29\n--- End of stack trace from previous location ---\n   at Squidex.Domain.Apps.Entities.AppProviderExtensions.\u003C\u003Ec__DisplayClass0_0.\u003C\u003CGetComponentsAsync\u003Eg__ResolveFieldAsync|2\u003Ed.MoveNext() in /src/src/Squidex.Domain.Apps.Entities/AppProviderExtensions.cs:line 75\n--- End of stack trace from previous location ---\n   at Squidex.Domain.Apps.Entities.AppProviderExtensions.\u003C\u003Ec__DisplayClass0_0.\u003C\u003CGetComponentsAsync\u003Eg__ResolveSchemaAsync|3\u003Ed.MoveNext() in /src/src/Squidex.Domain.Apps.Entities/AppProviderExtensions.cs:line 81\n--- End of stack trace from previous location ---\n   at Squidex.Domain.Apps.Entities.AppProviderExtensions.GetComponentsAsync(IAppProvider appProvider, ISchemaEntity schema, CancellationToken ct) in /src/src/Squidex.Domain.Apps.Entities/AppProviderExtensions.cs:line 93\n   at Squidex.Areas.Api.Controllers.Contents.Generator.SchemasOpenApiGenerator.GenerateAsync(HttpContext httpContext, IAppEntity app, IEnumerable\u00601 schemas, Boolean flat) in /src/src/Squidex/Areas/Api/Controllers/Contents/Generator/SchemasOpenApiGenerator.cs:line 75\n   at Squidex.Areas.Api.Controllers.Contents.ContentOpenApiController.GetOpenApi(String app) in /src/src/Squidex/Areas/Api/Controllers/Contents/ContentOpenApiController.cs:line 67\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeActionMethodAsync\u003Eg__Logged|12_1(ControllerActionInvoker invoker)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeNextActionFilterAsync\u003Eg__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\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeInnerFilterAsync\u003Eg__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeNextExceptionFilterAsync\u003Eg__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)"
ysynb    }
ysynb  }

Environment

  • [x] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: 6.2.0.0

Damn it. I have actually seen that and forgotten to fix it :frowning:

Additional information: Error is not cause by last version. It must be some previous version. I found that I have one schema with component without specify “schemes”. I am not sure if I create it like this in UI, or it is created with json editor. Anyway, I think this should not cause 500

It is solved and releases as 6.3.0.0

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.