AUR0006
Unable to autoregister dependency: [yyyy]
Error message
Unable to autoregister dependency: [yyyy
]
Parameters
List of registering parameters
Error explanation
This error occurs when the DI container attempts to register dependencies recursively and exceeds a depth of 100. This is a safeguard to prevent infinite or excessively deep registration loops, which usually indicate a problem in your dependency graph or registration logic.
Common causes
Circular or overly complex dependency graphs causing recursive registration.
Accidentally registering the same dependency multiple times in a loop.
Plugins or libraries that register dependencies in a way that causes deep or infinite recursion.
How to fix
Review your dependency graph for cycles or excessive depth.
Refactor your registrations to avoid deep or recursive registration patterns.
Where possible, inject the container and resolve dependencies lazily instead of registering everything up front.
If using plugins, ensure they are not causing recursive registrations.
Debugging tips
Check the stack trace to see where the registration loop is occurring.
Search your codebase for recursive or repeated registration patterns.
If using plugins, try disabling them one at a time to isolate the source.
Please also note that this error could be caused by a plugin and not your application. After ruling out that the error is not being caused by your code, try removing any registered plugins one at a time to see if the error resolves itself.
Last updated
Was this helpful?