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 anInstanceProvider
before callingprepare(instance)
.The
InstanceProvider
was 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 theInstanceProvider
before callingresolve()
.Alternatively, instantiate the
InstanceProvider
with 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
InstanceProvider
and ensureprepare()
is called beforeresolve()
.If using plugins, try disabling them one at a time to isolate the source.
Last updated
Was this helpful?