AUR0013
Cannot call resolve yyyy before calling prepare or after calling dispose.
Error message
Cannot call resolve yyyy before calling prepare or after calling dispose.
Parameters
name (string)
Error explanation
This error occurs when InstanceProvider.resolve() is called but no instance has been set. This can happen if you try to resolve before calling prepare(instance), or after the provider has been disposed (which clears the instance).
Common causes
Calling
resolve()on anInstanceProviderbefore callingprepare(instance).The
InstanceProviderwas disposed (viadispose()), clearing the instance before resolve was called.The provider was constructed without an initial instance and
prepare()was never called.
How to fix
Always call
prepare(instance)on theInstanceProviderbefore callingresolve().Alternatively, instantiate the
InstanceProviderwith an initial instance as the second parameter.Avoid calling
resolve()after the provider has been disposed.
Debugging tips
Check the stack trace to see where
resolve()was called without an instance.Search your codebase for all usages of
InstanceProviderand ensureprepare()is called beforeresolve().If using plugins, try disabling them one at a time to isolate the source.
Last updated
Was this helpful?