RuntimeException: Recursive router rebuild detected
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3556048. --> Reported by: [mandclu](https://www.drupal.org/user/52136) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>I was recently working on a site, and kept getting fatal errors whenever I tried to install a module. I noticed that modeler_api was mentioned in the output, and remembered installing it before the problems began. I uninstalled it, and the problems went away.</p> <p>The full error output is:</p> <pre>RuntimeException: Recursive router rebuild detected. in Drupal\Core\Routing\RouteBuilder-&gt;rebuild() (line 121 of core/lib/Drupal/Core/Routing/RouteBuilder.php).<br>Drupal\Core\ProxyClass\Routing\RouteBuilder-&gt;rebuild() (Line: 67)<br>Drupal\Core\Routing\RouteProviderLazyBuilder-&gt;getRouteProvider() (Line: 83)<br>Drupal\Core\Routing\RouteProviderLazyBuilder-&gt;getRouteByName() (Line: 541)<br>Drupal\modeler_api\Api-&gt;getRouteByName() (Line: 336)<br>Drupal\modeler_api\Hook\EntityHooks-&gt;systemInfoAlter() (Line: 474)<br>Drupal\Core\Extension\ModuleHandler-&gt;alter() (Line: 322)<br>Drupal\Core\Extension\ExtensionList-&gt;doList() (Line: 155)<br>Drupal\Core\Extension\ModuleExtensionList-&gt;doList() (Line: 284)<br>Drupal\Core\Extension\ExtensionList-&gt;getList() (Line: 408)<br>Drupal\Core\Extension\ExtensionList-&gt;recalculateInfo() (Line: 368)<br>Drupal\Core\Extension\ExtensionList-&gt;getAllAvailableInfo() (Line: 396)<br>Drupal\Core\Extension\ExtensionList-&gt;getAllInstalledInfo() (Line: 437)<br>Drupal\node\NodeViewsData-&gt;getNodeAccessImplementations() (Line: 99)<br>Drupal\node\NodeViewsData-&gt;getViewsData() (Line: 167)<br>Drupal\views\Hook\ViewsViewsHooks-&gt;viewsData() (Line: 219)<br>Drupal\views\ViewsData-&gt;Drupal\views\{closure}() (Line: 357)<br>Drupal\Core\Extension\ModuleHandler-&gt;invokeAllWith() (Line: 218)<br>Drupal\views\ViewsData-&gt;getData() (Line: 142)<br>Drupal\views\ViewsData-&gt;get() (Line: 94)<br>Drupal\views\Plugin\Derivative\ViewsEntityRow-&gt;getDerivativeDefinitions() (Line: 101)<br>Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator-&gt;getDerivatives() (Line: 87)<br>Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator-&gt;getDefinitions() (Line: 340)<br>Drupal\Core\Plugin\DefaultPluginManager-&gt;findDefinitions() (Line: 216)<br>Drupal\Core\Plugin\DefaultPluginManager-&gt;getDefinitions() (Line: 25)<br>Drupal\Core\Plugin\DefaultPluginManager-&gt;getDefinition() (Line: 16)<br>Drupal\Core\Plugin\Factory\ContainerFactory-&gt;createInstance() (Line: 85)<br>Drupal\Component\Plugin\PluginManagerBase-&gt;createInstance() (Line: 827)<br>Drupal\views\Plugin\views\display\DisplayPluginBase-&gt;getPlugin() (Line: 133)<br>Drupal\views\Plugin\views\style\StylePluginBase-&gt;init() (Line: 830)<br>Drupal\views\Plugin\views\display\DisplayPluginBase-&gt;getPlugin() (Line: 349)<br>Drupal\rest\Plugin\views\display\RestExport-&gt;collectRoutes() (Line: 119)<br>Drupal\views\EventSubscriber\RouteSubscriber-&gt;routes()<br>call_user_func() (Line: 146)<br>Drupal\Core\Routing\RouteBuilder-&gt;rebuild() (Line: 83)<br>Drupal\Core\ProxyClass\Routing\RouteBuilder-&gt;rebuild() (Line: 246)<br>Drupal\Core\Extension\ModuleInstaller-&gt;install() (Line: 83)<br>Drupal\Core\ProxyClass\Extension\ModuleInstaller-&gt;install() (Line: 508)<br>Drupal\system\Form\ModulesListForm-&gt;submitForm()<br>call_user_func_array() (Line: 105)<br>Drupal\Core\Form\FormSubmitter-&gt;executeSubmitHandlers() (Line: 43)<br>Drupal\Core\Form\FormSubmitter-&gt;doSubmitForm() (Line: 589)<br>Drupal\Core\Form\FormBuilder-&gt;processForm() (Line: 321)<br>Drupal\Core\Form\FormBuilder-&gt;buildForm() (Line: 73)<br>Drupal\Core\Controller\FormController-&gt;getContentResult()<br>call_user_func_array() (Line: 123)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 627)<br>Drupal\Core\Render\Renderer-&gt;executeInRenderContext() (Line: 121)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;wrapControllerExecutionInRenderContext() (Line: 97)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 183)<br>Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw() (Line: 76)<br>Symfony\Component\HttpKernel\HttpKernel-&gt;handle() (Line: 53)<br>Drupal\Core\StackMiddleware\Session-&gt;handle() (Line: 48)<br>Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle() (Line: 28)<br>Drupal\Core\StackMiddleware\ContentLength-&gt;handle() (Line: 116)<br>Drupal\page_cache\StackMiddleware\PageCache-&gt;pass() (Line: 90)<br>Drupal\page_cache\StackMiddleware\PageCache-&gt;handle() (Line: 48)<br>Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle() (Line: 51)<br>Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle() (Line: 53)<br>Drupal\Core\StackMiddleware\AjaxPageState-&gt;handle() (Line: 51)<br>Drupal\Core\StackMiddleware\StackedHttpKernel-&gt;handle() (Line: 716)<br>Drupal\Core\DrupalKernel-&gt;handle() (Line: 19)</pre><p>It's also worth noting that after the error, the modules would show as installed, but would exhibit problems. For example, the menu items would not be visible until after a cache clear, and I would see warnings about entity definition mismatches.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Unfortunately I don't yet know how specifically to reproduce the problem. The site in question had a large number of modules enabled so I suspect there is an incompatibility with one of them.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3>
issue