The error commonly occurs if you have installed other PDF viewers, as they may interfere with Edge while opening PDF documents. Also, clearing the cache is important ...
If you're using a recent version of Windows, Microsoft's Edge browser will "helpfully" make itself your default PDF viewer. You might want to change that default ...