# Cannot read properties of null (reading addEventListener)

## Environment

<table>
    <tbody>
        <tr>
            <td>Product</td>
            <td>UI for Blazor</td>
        </tr>
        <tr>
            <td>Blazor application type</td>
            <td>WebAssembly</td>
        </tr>
    </tbody>
</table>

## Description

JSInterop (JavaScript) error in the browser devtools console:

`Cannot read properties of null (reading 'addEventListener')`

## Steps to Reproduce

The error can occur in WebAssembly (WASM) projects after updating UI for Blazor to a new version.

## Error Message

```JS.skip-repl
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
  Unhandled exception rendering component: Cannot read properties of null (reading 'addEventListener')
  TypeError: Cannot read properties of null (reading 'addEventListener')
```

```JS.skip-repl
Microsoft.JSInterop.JSException: Cannot read properties of null (reading 'addEventListener')
TypeError: Cannot read properties of null (reading 'addEventListener')
```

## Possible Cause

The error indicates that the app is still using the old version of our `telerik-blazor.js` file.

## Solution

To resolve the error:

* (if using [CDN](https://www.telerik.com/blazor-ui/documentation/common-features/cdn)) Update the `telerik-blazor.js` file URL to the correct version.
* (if using static assets) Clear the browser cache and [add a cache buster for the Telerik assets](https://www.telerik.com/blazor-ui/documentation/knowledge-base/common-browser-cache-buster).
* (if using a local JS file) Replace the `telerik-blazor.js` file with the new version.

## Notes

The Blazor framework should normally take care of caching issues with static assets, but they might still occur sometimes.

## See Also

* [Telerik UI for Blazor version upgrade steps](https://www.telerik.com/blazor-ui/documentation/upgrade/overview)
* [Troubleshooting JavaScript Errors](https://www.telerik.com/blazor-ui/documentation/troubleshooting/js-errors)
* [Fix styling issues after component version update](https://www.telerik.com/blazor-ui/documentation/knowledge-base/common-upgrade-breaks-css-theme-styles)
