From time to time we also encountered this issue. By trial-and-error we found it to be caused by caching.
What we did was disabled caching, ran the application (and it ran fine then) and enabled caching again (and it ran fine again).
Its a really lame solution and may not work for you but please give it a try. Other thing you could do is delete the cacheclusterconfigs blob container in local storage emulator. Using a combination of these 2 usually resulted in the problem getting resolved.