Question

Photo of Joe Nall

0

restarted Rock, and now /api/docs/index produces the following exception

restarted Rock, and now /api/docs/index produces the following exception

500 : {"Message":"An error has occurred.","ExceptionMessage":"Collection was modified; enumeration operation may not execute.","ExceptionType":"System.InvalidOperationException","StackTrace":" at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)\r\n at System.Collections.Generic.List`1.Enumerator.MoveNextRare()\r\n at System.Linq.Enumerable.<OfTypeIterator>d__95`1.MoveNext()\r\n at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n at System.Web.Http.Description.ApiExplorer.<FlattenRoutes>d__2.MoveNext()\r\n at System.Web.Http.Description.ApiExplorer.InitializeApiDescriptions()\r\n at System.Lazy`1.CreateValue()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Lazy`1.get_Value()\r\n at Swashbuckle.Swagger.SwaggerGenerator.GetApiDescriptionsFor(String apiVersion)\r\n at Swashbuckle.Swagger.SwaggerGenerator.GetSwagger(String rootUrl, String apiVersion)\r\n at Swashbuckle.Application.SwaggerDocsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at System.Web.Http.Cors.CorsMessageHandler.<SendAsync>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.HttpServer.<SendAsync>d__0.MoveNext()"} https://rock.chaseoaks.org:443/api/doc/v1

  • Joe Nall

    Update: This error only occurs when trying to view docs. All of the endpoints that retrive data still work.

  • Photo of Joe Nall

    0

    Latest Update: It's working fine this morning. Have no idea what was causing it. It just healed itself 🙂

  • Photo of Ben Murphy

    0

    Hi Joe! I see that you posted this in chat as well, which is good because you'll get a faster response. I'll post my same questions back to you on this.
    What version of Rock are you on? Did you recently upgrade? It's possible that it's this bug that was fixed in v14.1 maybe after your restart the webserver couldn't handle the load of the api docs page due to this issue.

    https://github.com/SparkDevNetwork/Rock/issues/5210