# AUR0017

### **Error message**

Failed to instantiate 'xxxx' via @newInstanceOf/@newInstanceForScope, there's no registration and no default implementation, or the default implementation does not result in factory for constructing the instances.

### **Parameters**

Interface key (string)

### Error explanation

This error occurs when you attempt to instantiate an interface using `@newInstanceOf` or `@newInstanceForScope`, but there is no registration for the interface, no default implementation, or the default implementation does not provide a factory for constructing instances. The DI system cannot create a new instance without a valid registration or factory.

### Common causes

* The interface was not registered with a concrete implementation.
* The default implementation for the interface does not provide a factory.
* There is a typo or mismatch in the interface key used for registration and resolution.
* A plugin or library expected to register the interface did not do so.

### How to fix

* Register the interface with a concrete implementation using the DI container.
* Ensure the default implementation provides a factory for constructing instances.
* Double-check that the interface key used for registration matches the key used for resolution.
* If using plugins or libraries, ensure they are properly configured and registered.

### Debugging tips

* Check the stack trace to see where the instantiation was attempted.
* Search your codebase for all registrations and resolutions of the interface key in question.
* 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/aur0017.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.
