Search code examples
azureazure-cosmosdbazure-emulator

Cosmos DB Emulator:


I have a project that uses the cosmos db project. I upgraded the package, and it said my version of cosmos was off, so I uninstalled my previous cosmos db emulator, and installed the latest version.

However, now the emulator is throwing javascript exceptions and the explorer tab never completes loading.

below are the 4 exceptions I am getting:

enter image description here


Solution

  • I figured out that when I uninstalled my cosmos db emulator, the app data was left behind here: %LocalAppdata%\CosmosDBEmulator

    when the new version of cosmos db was attempting to reach it, it was failing, and returning an unauthorized error (even though the emulator key is the same, no idea why it fails to unauthorized)

    ANYWAYS, all you have to do is

    1. Exit the emulator.
    2. Delete the %LocalAppdata%\CosmosDBEmulator folder
    3. Reboot your emulator.