# AUR0204

## Error Message

`AUR0204: Trying to create a scope with null/undefined binding context`

## Description

This error occurs when Aurelia tries to create a binding scope but the binding context is `null` or `undefined`. This typically indicates a lifecycle/timing issue or a missing view-model/binding context in a composition scenario.

## Common Scenarios

* Creating/binding a view before its view-model is available.
* Manually composing a view with an invalid context.

## Solutions

* Ensure the component/view-model exists before binding begins.
* For async composition, wait for the promise to resolve before starting/binding.

## Troubleshooting

* Check the stack trace for where scope creation is triggered.
* Verify any custom rendering/composition code passes a valid binding context.


---

# 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/0203-to-0227/aur0204.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.
