(100% WORKING SOLUTION): Hi! The problem you’re facing is actually caused when you update some plugin or your WordPress core software, but your browser is still getting served the old invalid cache files. Even though the WordPress caching plugins do not usually serve cache to logged in users, but your CDN (like Cloudflare) and your host do serve the old cache. Even your browser stores some of the old and invalid cache.
Thus, to fix this issue, all you need to do is, delete your site’s cache from all those places, that is, from your browser, your WordPress caching plugin, your CDN and from your Host. That will surely fix the issue. You can check out the detailed article that I wrote. It is very easy to follow and will surely solve your issue. Here’s the article: (FIXED) The Editor Has Encountered An Unexpected Error WordPress