I know this is an older post but found this post searching for this same error I ran and though I would share my findings. I had the same error after adding a new package that had its own routes with views. It seems you will get this error when a view is rendered on a route that does not use the theme middleware. Once i added the theme middleware to my routes the exception stopped.