# AUR0018

### **Error message**

Invalid channel name or instance: 'yyyy'.

### **Parameters**

Channel name or instance (string or object)

### Error explanation

This error occurs when you attempt to publish an event using the EventAggregator, but the channel name or instance provided is invalid (e.g., undefined, null, or otherwise not a valid event name or instance). The EventAggregator requires a valid string channel name or a valid instance to publish events.

### Common causes

* Attempting to publish an event with an undefined or null channel name.
* Passing an invalid object or value as the event instance.
* Programming errors where the event name or instance is not set correctly before publishing.

### How to fix

* Ensure you are passing a valid string as the channel name or a valid instance when calling `publish()` on the EventAggregator.
* Check your code for places where the event name or instance might be undefined or null.
* Add validation or error handling to ensure only valid events are published.

### Debugging tips

* Check the stack trace to see where the invalid publish call was made.
* Search your codebase for all calls to `EventAggregator.publish()` and verify the arguments.
* If using plugins, try disabling them one at a time to isolate the source.
