# AUR0719

## Error Message

`AUR0719: Attribute <attribute> has been already registered for <element>`

Where `<attribute>` is the HTML attribute name (e.g., `for`) and `<element>` is the element tag name (e.g., `label` or `*` for all elements).

## Description

This error indicates an internal inconsistency detected by Aurelia's `AttributeMapper`. The `AttributeMapper` is responsible for understanding how HTML attributes should map to component properties (e.g., mapping the `readonly` attribute to a `readOnly` property). This error occurs when the mapper detects that a rule attempting to define such a mapping for a specific HTML attribute and element combination has already been registered.

## Cause

This error is generally **not** caused by standard application configuration like defining `@bindable` properties or using default Aurelia setups. Standard mechanisms handle attribute mapping implicitly. The most likely causes are:

1. **Internal Framework Issue:** A potential bug within Aurelia's `AttributeMapper` or related compilation/configuration services could lead to duplicate registration attempts for the same mapping rule.
2. **Unsupported Internal API Usage:** Advanced or non-standard code directly interacting with and attempting to modify the internal `AttributeMapper` instance during runtime or configuration might inadvertently cause duplicate registrations. Standard application development should not involve direct manipulation of the `AttributeMapper`.
3. **Plugin Conflict (Rare):** In very rare cases, two different plugins attempting low-level manipulation of the `AttributeMapper` could potentially conflict, although well-behaved plugins should avoid this.

## Solution

Since this usually points to an internal issue or unsupported usage:

1. **Update Aurelia Packages:** Ensure you are using the latest compatible versions of all Aurelia packages. The issue might be a known bug that has been fixed.
2. **Remove Internal API Usage:** If you have any code directly accessing or modifying the `AttributeMapper` service, remove it. Rely on standard Aurelia mechanisms like `@bindable` for property mapping.
3. **Check Plugins:** If using plugins, especially those performing low-level framework modifications, try temporarily disabling them to see if the error disappears. If a plugin is identified as the cause, report the issue to the plugin author.
4. **Isolate and Reproduce:** Try to identify the specific component or scenario that triggers the error. Create the smallest possible reproduction case.
5. **Report the Issue:** If you suspect a framework bug after ruling out unsupported API usage and plugin conflicts, report the issue on the Aurelia GitHub repository, providing the minimal reproduction and details about your Aurelia versions.

## Debugging Tips

* Identify the `<attribute>` and `<element>` names from the error message. This tells you which mapping rule is being duplicated.
* Examine the stack trace when the error occurs. This might provide clues about which part of the framework or which plugin is attempting the duplicate registration.
* Review recent changes to your codebase, especially around application startup configuration, plugins, or any potentially non-standard framework interactions.
* Search the Aurelia GitHub issues to see if this specific mapping conflict has been reported or resolved previously.


---

# 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/runtime-html/aur0719.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.
