# AUR0013

### **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 an `InstanceProvider` before calling `prepare(instance)`.
* The `InstanceProvider` was disposed (via `dispose()`), 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 the `InstanceProvider` before calling `resolve()`.
* 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 ensure `prepare()` is called before `resolve()`.
* If using plugins, try disabling them one at a time to isolate the source.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aurelia.io/developer-guides/error-messages/0001-to-0023/aur0013.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
