# Troubleshooting

## pyodide.ffi.JsException: NetworkError: A network error occurred.

Most likely, you’re running into a CORS issue, see [Web API Requests](web-requests.md)

## Error initializing application: undefined is not an object (evaluating ‘editorInstance.setScrollPosition’)

Your browser engine (“WebView”), which powers modern Excel add-ins like xlwings Lite, is too old.

- For the best experience, use a perpetual version of Office no older than Office 2021 or an up-to-date version of Microsoft 365.
- On macOS, Ventura is the oldest version that is supported as the OS alone determines the version of WKWebView.
- On Windows, Office 2019 is supported under [certain conditions](https://learn.microsoft.com/en-us/office/dev/add-ins/concepts/browsers-used-by-office-web-add-ins).

In any case, you can always use xlwings Lite by going to [https://office.com](https://office.com) with a reasonably modern browser (this also works with the free online version of Excel).

## Unexpected error: SSL is not supported

With Pyodide 0.27.5 only: Add `ssl` explicitly to `requirements.txt`.

## The cell shows `#NAME?` when using custom functions

Clear your Office cache, see [Clear your Office cache]()

## Clear your Office cache

### Windows

1. Go to `File` > `Options` > `Trust Center` > `Trust Center Settings` > `Trusted Add-in Catalogs`
2. Activate the checkbox `Next time Office starts, clear all previously-started web add-ins cache.`, then click `OK`.
3. Restart Excel

Alternatively:

1. Close Excel
2. Delete the following folder:

```text
%LOCALAPPDATA%\Microsoft\Office\16.0\Wef
```

### macOS

- Close Excel via `Cmd+Q`
- Run the following commands in a Terminal:

```text
rm -rf ~/Library/Containers/com.microsoft.Excel/Data/Library/Caches/
rm -rf ~/Library/Containers/com.microsoft.Excel/Data/Library/Application
rm -rf ~/Library/Containers/com.microsoft.Office365ServiceV2/Data/Caches/com.microsoft.Office365ServiceV2/
rm -rf ~/Library/Containers/com.microsoft.Office365ServiceV2/Data/Library/Caches/com.microsoft.Office365ServiceV2/
rm -rf ~/Library/Containers/com.microsoft.Excel/Data/Library/Application\ Support/Microsoft/Office/16.0/Wef/
```

See also: [https://learn.microsoft.com/en-us/office/dev/add-ins/testing/clear-cache](https://learn.microsoft.com/en-us/office/dev/add-ins/testing/clear-cache)
