Tuesday 3 December 2019

Sitecore Commerce 9.2 Business tools error with invalid shop


Problem Description

I was playing with Sitecore Commerce 9.2 recently. installation works perfectly fine it works really well. While playing with it, I was changing a lot of configurations and services to check a few things.
Suddenly I started getting an error on Sitecore Commerce Business tools and not loading any menu on Business tools as shown in the following images.



After a few retries in the loop, we saw for request GetNavigationView() and GetLanguageView() returns 400 Bad requests.

and the response was 

{  "@odata.context":"https://commerceauthoring.commerce.com/Api/$metadata#Sitecore.Commerce.Core.CommandMessage","MessageDate":"2019-12-03T16:37:39.4253344Z","Code":"Error","Text":"Shop 'CommerceEngineDefaultStorefront' does not exist.","CommerceTermKey":"InvalidShop"
}

the similar error I was getting in PostMan request too

{
  "@odata.context""https://localhost:5000/Api/$metadata#Sitecore.Commerce.Core.CommandMessage",
  "MessageDate""2019-12-03T16:26:47.0334391Z",
  "Code""Error",
  "Text""Shop 'CommerceEngineDefaultStorefront' does not exist.",
  "CommerceTermKey""InvalidShop"
}

Solution: 

I have tried  many things but in last in I come to know that Sitecore 9.2 Commerce use Redis cache and if Redis service is not running, you will get above error. So make sure that Redis cache is kept running. As soon as started, Redis cache everything works again. 


Happy commercing..........